To emphasize Daniel's point: Compare this to the way a schema compiler (JAXB's xjc) deals with a default attribute: The generated getter method substitutes this whenever the field in an object created from the SAX/DOM parsed document tree contains null, i.e., is absent.
>From this it seems that it is generally accepted that substituting defaults is up to the *interpreation* of unmarshalled XML content. -W -----Original Message----- Date: Wed, 2 Dec 2009 14:08:15 +0100 From: Daniel Veillard <[email protected]> To: Philippe BOINOT <[email protected]> Cc: [email protected] Subject: Re: [xml] How to get default value attribute defined in xsd ? [libxml2-2.7.6] Message-ID: <[email protected]> Content-Type: text/plain; charset=us-ascii [ posting again due to a mail error ] On Sat, Nov 28, 2009 at 08:53:53AM +0100, Philippe BOINOT wrote: > Hi, > > I would like to get default attribute value defined by following xsd. > I'm using reader API and > set XML_SCHEMA_VAL_VC_I_CREATE value but it doesn't work. > > What's wrong in my code ? I don't think that works with the Reader. Just when validating a existing full document, then those will be added. Daniel _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
