Re: [xml] How to get default value attribute defined in xsd ?

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.


-----Original Message-----
Date: Wed, 2 Dec 2009 14:08:15 +0100
From: Daniel Veillard <veillard redhat com>
To: Philippe BOINOT <philippe boinot pertimm com>
Cc: xml gnome org
Subject: Re: [xml] How to get default value attribute defined in xsd ?
Message-ID: <20091202130815 GC23641 redhat com>
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:

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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]