Re: XML Schema default attributes

2008-05-15 Thread Michael Glavassevich
Hi Jeff, Discarding non-specified attributes is also the default behaviour of the DOM L3 LSerializer. This can be turned off by setting the "discard-default-content" parameter [1] to false. Thanks. [1] http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html#parameter-discard-default

Re: XML Schema default attributes

2008-05-15 Thread Jeff Greif
Michael, Thanks for the info. I confirmed, by modifying the ParserAPIUsage sample, that indeed that defaulted attributes are inserted in the DOM if they're not present in the instance document. (They're also inserted if they are fixed.) It turned out that there was some pilot error involved in

Re: XML Schema default attributes

2008-05-14 Thread Michael Glavassevich
Hi Jeff, Attributes defaulted from the schema are unconditionally added to the document by the schema validator. They should appear in the DOM returned by the parser. I just confirmed that this is working with the latest version (2.9.1) but don't recall that there was any issue with 2.8.1. Perhap

Re: XML Schema default attributes

2008-05-14 Thread Jeff Greif
Thanks for the suggestion. I knew about accessing the PSVI, but I don't think it can easily be used to solve the particular issue I'm facing. I'm dealing with a custom object deserialization method in which the deserialization code requires that a type attribute and a version attribute be pre

Re: XML Schema default attributes

2008-05-13 Thread Nathan Beyer
Check out the PSVI API [1] - Post-Schema-Validation-Infoset [1] http://xerces.apache.org/xerces2-j/faq-xs.html On Tue, May 13, 2008 at 2:56 PM, Jeff Greif <[EMAIL PROTECTED]> wrote: > How can the Xerces parser be directed to insert attributes, specified > in XML Schema to have default values, in