Hi Migad,
in general, it's better to use the [email protected] mailing
list, so that your question reaches a wider audience and is also a
way to learn for others.
Coming to your question, you don't say which version of Xerces you
are using, and how you are parsing and serializing the XML stream.
Alberto
At 14.08 19/06/2006 +0200, Migad Negib wrote:
Hello Alberto Massari,
I'm sorry to disturb you.
I'm using xsi:types in a schema I use while validating xml stream.
I will try to give a simple example that illustrate my problem.
Here is an XML stream:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<root xmlns="rootNamespace:1.0" xmlns:PRE="urn:this:prefix">
<A>
<B>
<C
xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>http://www.w3.org/2001/XMLSchema-instance
" xsi:type="PRE:AbstractCType1">
<PRE:D>value</PRE:D>
</C>
</B>
</A>
</root>
Then after parsing and serialization I obtain :
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<root xmlns="rootNamespace:1.0">
<A>
<B>
<C
xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>http://www.w3.org/2001/XMLSchema-instance
" xsi:type="PRE:AbstractCType1">
<D xmlns="urn:this:prefix">value</D>
</C>
</B>
</A>
</root>
Then when I try to parse this result, Xerces tells me (while
processing the attribute xsi:type, I suppose)
that the prefix PRE is not defined which is true !
I think the definition is forgotten because during the
serialization, XERCES does not process the attribute node value .
Is there a way to overcome this issue?
I would be very pleased if you can give me a clue.
Thank you.
Migad.