[xsd-users] Fixed Attributes

Boris Kolpackov boris at codesynthesis.com
Thu Oct 16 16:44:22 EDT 2008


Hi George,

George Vassilakes <george at sbdev.net> writes:

> Is it possible to get the XSD generated classes when serializing to 
> XML to also include the fixed value attributes?

This is the default behavior. All default and fixed attributes are
present in the resulting XML unless you specified the
--omit-default-attributes option.


> If I create instances of the DT_EncryptDiskCmd class and serialise them 
> and load the using the DTMessage.xsd then the serviceName is 
> automatically set by the fixed value.
> However if I parse the XML using the Message.xsd the value is not set as 
> this was not output by the serialization.

I am having a hard time understanding what you mean by "parse the XML 
using the Message.xsd". Can you provide a small but compilable example
(i.e., a schema, sample XML file, and a test driver) that demonstrates
the problem you are observing?

Boris




More information about the xsd-users mailing list