Hi everyone,

 

Í've just started using generateDS, and am enjoying it so-far. I have,
however, a couple of issues writing an XML file, and I am unsure if I am
doing something wrong, or whether I'm forgetting something. I will list
them below:

 

-          No header / namespace declaration: When I use the
export(file) method on an element it doesn't write any namespace /
header stuff. Ofcourse that is understandable since the element itself
doesn't know it is the root. Now I can append <?xml version="1.0"?> to
the beginning of the file without modifying the generated code, however,
the namespace declarations must be in the root element. Is there a way
to achieve this automatically, or should I subclass the generated code
and modify a specific method?

 

-          Complex-types always written with open/close tag: If I write
an element which has no child-elements, still an open/close tag are
created, my XML validator starts complaining that "Element
'BinaryVariable' must have no character or element information item
[children], because the type's content type is empty." on the generated
XML. Also the indentation is messed up for the closing-tag (since it
apparently expects children?). Maybe my XSD requires a special way of
creating elements with no child-elements allowed?

 

-          Numeric element attributes initialized to -1: When I define
optional attributes of type xs:int the constructor for the element
containing these attributes initializes them to -1. The export function
of the element checks whether or no the attribute-value is None (which
it is not, its -1), so it writes all attribute values being -1. Now I
have to explicitly set all values to a value, or None. It would seem
more logical to me to set the default value of an attribute to None
(unless its required, maybe). Is there a way to accomplish this?

 

Thanks in advance for any insights / help!

 

Regards,

Vincent van Beveren 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to