Re: 'Re: "[xml] How to get elements default values, defined in the schema"'

Does anyone have a ballpark estimate about when the schema default value 
functionality will be implemented ?


Quoting Kasimier Buchcik <kbuchcik 4commerce de>:


on 9/1/2004 9:12 AM Zhamak Dehghani wrote:

I've used xmlSchema functions i.e. "xmlSchemaValidateDoc(...)" to validate
a xml document.
To read an element's content I have used "xmlNodeGetContent(...)"

The schema I use has defined default values for some of the elements i.e. 
"<xsd:element name="AcquirerName" type="xsd:string" default="WESTPAC"

I expected after validating a document against the schema, default values
get loaded into the document nodes
and xmlNodeGetContent to return default values if an element doesn't appear
in the xml document or appear with
an empty content.
However my assumptions don't seem to be correct. xmlNodeGetContent never
returns any values if element
appears with empty content i.e. "<AcquirerName></AcquirerName>"

You refer to the post-schema-validation infoset [1]: this is not 
implemented yet with the XML Schema processor of libxml2. I guess the 
PSVI and its API to create, will be one of the tail ends of the whole 
implementation story; although I admit that default and fixed values 
would be really a nice-to-have as early as possible.

This mail sent using ToadMail -- Web based e-mail @ ToadNet

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