You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Jing Tao <ta...@nceas.ucsb.edu> on 2003/10/31 01:49:47 UTC

SAX parser feature for attribute-default-value

Hello, everyone:

I am using xerces 1.4 sax parser to validate a xml document base on a 
schema. In the schema, there are some attributes defined as optional and have default 
value. After parsing the xml document, those attributes having default 
value are added to original xml document even though original xml doesn't 
have the attribute.

For example: element "dataset" has an attribute "scope" is an optional and 
default value is "document".

The orginal xml is:
  <dataset>dataset1</dataset>

After parsing xml is:
  <dataset scope="document">dataset1</dataset>

I don't want the xml will be modified by sax parser. So I am wondering if 
there is a feature can be set to turn off it.

I searched in google and find some constant class have a feature named
http://apache.org/xml/features/validation/default-attribute-values. But I 
tried and it seemed xerces doesn't have it now.

Thanks for your help in advance.

Jing  



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org