Thanks, Yang. I have opened TUSCANY-830 to track this improvement. Yang ZHONG <[EMAIL PROTECTED]> wrote: XSD prefixes are *not* parts of the definitions. It may be nice for XML to use the original prefixes, however different ones must be used instead if ever conflicted. "_1" may be ugly, but it doesn't disconform to the XSD.
Do you want to change "bug" to "improvement"? On 10/11/06, Fuhwei Lwo wrote: > > I just found out XMLHelper.save() method always uses the > dataobject's namespace URI to derive its namespace prefix even the prefix > was defined in the XSD. > > For example, I modify "xmlns:nsPrefix=nsURI" in the simple.xsd located in > the resource folder under sdo/impl project from xmlns:simple=" > http://www.example.com/simple" to xmlns:simple=" > http://www.example.com/simple/1.0" then modify SimpleDynamicTestCase.javato > display its serialization output. Here are the XSD and the serialization > output: > > *simple.xsd* > > > targetNamespace="http://www.example.com/simple/1.0" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:simple="http://www.example.com/simple/1.0"> > > > > > > > > > > > > > > > minOccurs="0" maxOccurs="unbounded"/> > > > > > > *Serialization output* > > > <_1:stockQuote xmlns:_1="http://www.example.com/simple/1.0"> > fbnt > FlyByNightTechnology > 1000.0 > 1000.0 > 1000.0 > 1000.0 > 1000.0 > > 2000.0 > > > > Is this expected behaviour? > > -- Yang ZHONG
