Question 1 or 2 ?

--------------------------------------------------
From: "Cezar Andrei" <cezar.and...@oracle.com>
Sent: Wednesday, June 09, 2010 7:30 PM
To: <dev@xmlbeans.apache.org>; <xmlbeans-...@xml.apache.org>
Subject: RE: Namespace prefix problem.

Hi Serkan,

Can paste the code that does the saving? Is it using the save method with the xmloptions parameter: XmlObject.save(outputstream|writer|file, XmlOptions) ?

Cezar

-----Original Message-----
From: Serkan Taş [mailto:serkan_...@hotmail.com]
Sent: Wednesday, June 09, 2010 2:11 AM
To: xmlbeans-...@xml.apache.org
Subject: Namespace prefix problem.

Hi,

I am facing with a problem of xml namspace prefix definition.

Question 1 :

I have got an xml below :

<xml-fragment>
 <x_:name xmlns:x_="http://www.hostname.com/XML_common_types"/>
 <x_:surname xmlns:x_="http://www.hostname.com/XML_common_types"/>
 <x_:role xsi:nil="true"
xmlns:x_="http://www.hostname.com/XML_common_types";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
 <x_:userName xmlns:x_="http://www.hostname.com/XML_common_types"/>
</xml-fragment>


If i use XMLOptions and the methods like setSaveSuggestedPrefixes to replace
the prefixes, nothing changes.


Quesiton 2;

If i sent xml bean through Jmx, the resulting xml fragment changes :

On client side before sending :

<xml-fragment xmlns:x_="http://www.hostname.com/XML_common_types";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <x_:name/>
 <x_:surname/>
 <x_:role xsi:nil="true"/>
 <x_:userName/>
</xml-fragment>


On the server side, received xml :

<xml-fragment>
 <x_:name xmlns:x_="http://www.hostname.com/XML_common_types"/>
 <x_:surname xmlns:x_="http://www.hostname.com/XML_common_types"/>
 <x_:role xsi:nil="true"
xmlns:x_="http://www.hostname.com/XML_common_types";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
 <x_:userName xmlns:x_="http://www.hostname.com/XML_common_types"/>
</xml-fragment>

yours,


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: dev-h...@xmlbeans.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: dev-h...@xmlbeans.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: dev-h...@xmlbeans.apache.org

Reply via email to