You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Dan Hwang <sa...@gmail.com> on 2008/04/10 22:04:41 UTC
A bug with inst2xsd tool
Hi,
I believe there is a bug in RussianDollStrategy class which is causing
inst2xsd tool to break.
In the processElementsInComplexType() method, there is a check to
compare QName of two elements.
Currently, it's doing it like the following:
...
if(currentElem.getName() == child.getName())
...
This is causing the script to assign wrong type for the element.
I think it should be something like:
...
if (currentElem.getName() != null &&
currentElem.getName().equals(child.getName()))
...
I first ran into this problem when I was using the attached xml schema
to generate xsd.
When I patched the RussianDollStrategy class, everything seems to be working.
Could anyone confirm this??
Should I enter a bug in the jira??
Thanks,
Dan
============XML-SCHEMA===============
<?xml version="1.0" encoding="UTF-8"?>
<rail_v2>
<keyword>
<first/>
<second/>
<third/>
</keyword>
<relationships>
<displayType/>
<relationship>
<type/>
<content/>
</relationship>
<relationship/>
</relationships>
<component>
<sequence/>
<name/>
<header>
<graphic>
<image/>
<altText/>
<URL/>
</graphic>
<html>
<text/>
<URL/>
</html>
</header>
<subcomponents>
<subcomponent>
<sequence/>
</subcomponent>
<subcomponent/>
</subcomponents>
</component>
</rail_v2>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org