[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Updated: (XMLBEANS-190) Namespaces in QName is not preserved after copy of the XMLBeans from
From:       "daryoush mehrtash (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2005-08-12 18:49:59
Message-ID: 296066908.1123872599139.JavaMail.jira () ajax ! apache ! org
[Download RAW message or body]

     [ 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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic