[
https://issues.apache.org/jira/browse/XMLBEANS-190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jacob Danner closed XMLBEANS-190.
---------------------------------
Resolution: Won't Fix
XmlBeans does not modify namespace prefixes from string representations. If you
need it modified try XmlCursor.
> Namespaces in QName is not preserved after copy of the XMLBeans from one tree
> to anoter.
> ----------------------------------------------------------------------------------------
>
> Key: XMLBEANS-190
> URL: https://issues.apache.org/jira/browse/XMLBEANS-190
> Project: XMLBeans
> Issue Type: Bug
> Affects Versions: Version 2.1
> Reporter: daryoush mehrtash
> Attachments: CopyTest.java
>
>
> I parse a schema file to XMLBeans, the schema defines the "impl" namespace.
> I then parse another document, which is also a schema file that uses "impl"
> namespace but is set to a different namespace than the orignial schema.
> WHen I copy the XMLObjects from one schema to the other, the QNames of the
> schema objects are not updated to reflect the new namespaces.
> I have attached a simple program to reproduce the problem. Notice that the
> Person element in the "s2" uses <xsd:element name=\"addr\"
> type=\"impl:Address\"/> after it is copied to the "s1" i expect the "impl"
> be changed to "tns1" but it remains "impl" which is not the correct
> namespace in the target schema.
> The output of my attached code is:
> After add the schema: <xsd:schema elementFormDefault="qualified"
> targetNamespace="http://byXmlBeanNS"
> xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://web"
> xmlns:intf="http://web" xmlns:tns1="http://byXmlBeanNS"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:element name="Person">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="name" type="xsd:string"/>
> <xsd:element name="addr" type="impl:Address"/>
> <---------------------
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> But I expected
> After add the schema: <xsd:schema elementFormDefault="qualified"
> targetNamespace="http://byXmlBeanNS"
> xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://web"
> xmlns:intf="http://web" xmlns:tns1="http://byXmlBeanNS"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:element name="Person">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="name" type="xsd:string"/>
> <xsd:element name="addr" type="tns1:Address"/>
> <------------------
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]