You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "daryoush mehrtash (JIRA)" <xm...@xml.apache.org> on 2005/08/12 20:47:56 UTC
[jira] Created: (XMLBEANS-190) Namespaces in QName is not preserved after copy of the XMLBeans from one tree to anoter.
Namespaces in QName is not preserved after copy of the XMLBeans from one tree to anoter.
----------------------------------------------------------------------------------------
Key: XMLBEANS-190
URL: http://issues.apache.org/jira/browse/XMLBEANS-190
Project: XMLBeans
Type: Bug
Versions: Version 2.1
Reporter: daryoush mehrtash
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.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[jira] Closed: (XMLBEANS-190) Namespaces in QName is not preserved
after copy of the XMLBeans from one tree to anoter.
Posted by "Jacob Danner (JIRA)" <xm...@xml.apache.org>.
[ 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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[jira] Updated: (XMLBEANS-190) Namespaces in QName is not preserved after copy of the XMLBeans from one tree to anoter.
Posted by "daryoush mehrtash (JIRA)" <xm...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XMLBEANS-190?page=all ]
daryoush mehrtash updated XMLBEANS-190:
---------------------------------------
Attachment: CopyTest.java
> Namespaces in QName is not preserved after copy of the XMLBeans from one tree to anoter.
> ----------------------------------------------------------------------------------------
>
> Key: XMLBEANS-190
> URL: http://issues.apache.org/jira/browse/XMLBEANS-190
> Project: XMLBeans
> Type: Bug
> 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.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org