Thanks to Arne Grimstrup, generateDS.py now supports default values for
attributes and elements that are defined with primitive types (string, int,
float, etc).
Here is an example XML Schema -- Note the definition of default values:
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"
minOccurs="0"/>
<xs:element name="category" type="xs:integer" default="-2"/>
</xs:sequence>
<xs:attribute name="value" default="nobody 'here'" />
</xs:complexType>
</xs:element>
In string types, single quotes are escaped with a back-slash. generateDS.py
also escapes a single back-slash with a double back-slash, but I'm not so sure
this is the correct behavior.
The new version is generateDS-1.11d and you can find it at:
http://www.rexx.com/~dkuhlman/generateDS-1.11d.tar.gz
and also at sourceforge.net.
So, let me know if this is the desired behavior or if you have any other
comments, problems, or suggestions.
And, once again, thank you Arne.
- Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
generateds-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/generateds-users