What should I get when I use the org.eclipse.wst.xml.core.internal.contentmode.DOMContentBuilderImpl [message #504855] |
Tue, 22 December 2009 19:56  |
Eclipse User |
|
|
|
Hi all,
I writed a class that extends the org.eclipse.wst.xml.core.internal.contentmode.DOMContentBuil derImpl to generate xml content based on a xsd.
But the xsd is like:
<element name="HelloWorldResponse">
<complexType>
<sequence>
<element name="result" type="string"/>
</sequence>
</complexType>
</element>
I can get the one which I want:
<tns:HelloWorldResponse xmlns:tns="http://HelloWorld" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:result></tns:result>
</tns:HelloWorldResponse>
If the xsd is like:
<element name="HelloWorldResponse">
<complexType>
<sequence>
<element minOccurs='0' name="result" type="string"/>
</sequence>
</complexType>
</element>
I can get the one which I don't want:
<tns:HelloWorldResponse xmlns:tns="http://HelloWorld" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</tns:HelloWorldResponse>
The two xsd has a difference:
<element minOccurs='0' name="result" type="string"/>
if there is the attribue minOccurs='0', the generate xml has no result sub-element.
How can I get the first one when I use the second xsd?
Or this is a bug of the org.eclipse.wst.xml.core.internal.contentmode.DOMContentBuil derImpl?
Thanks!
Grid
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.28466 seconds