You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by "Martin Desruisseaux (Jira)" <ji...@apache.org> on 2019/08/31 09:53:00 UTC

[jira] [Assigned] (SIS-126) Replace the NamespacePrefixMapper hack by NamespaceContext

     [ https://issues.apache.org/jira/browse/SIS-126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Desruisseaux reassigned SIS-126:
---------------------------------------

    Assignee: Martin Desruisseaux

> Replace the NamespacePrefixMapper hack by NamespaceContext
> ----------------------------------------------------------
>
>                 Key: SIS-126
>                 URL: https://issues.apache.org/jira/browse/SIS-126
>             Project: Spatial Information Systems
>          Issue Type: Improvement
>          Components: Metadata
>    Affects Versions: 0.3, 0.4, 0.5, 0.6, 0.7, 0.8
>            Reporter: Martin Desruisseaux
>            Assignee: Martin Desruisseaux
>            Priority: Minor
>              Labels: JAXB
>             Fix For: 1.0
>
>
> In order to customize the mapping of XML prefix to URI, we currently override the following classes:
> * {{com.sun.xml.bind.marshaller.NamespacePrefixMapper}}
> * {{com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper}}
> Which class is used depends on the environment (standard JDK or Glassfish). However those classes are not public API; they may not be present in other implementations, and their API sometime change.
> It seems that {{javax.xml.namespace.NamespaceContext}} in public API can do the job. We need to specify an instance to {{javax.xml.stream.XMLStreamWriter}} using the {{setNamespaceContext}} method, then to use the {{javax.xml.bind.Marshaller}} method that expect a {{XMLStreamWriter}} argument.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)