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 bu...@apache.org on 2002/04/23 16:54:06 UTC

DO NOT REPLY [Bug 8420] New: - DOM does not contain default values for attributes after parsing.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8420>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8420

DOM does not contain default values for attributes after parsing.

           Summary: DOM does not contain default values for attributes after
                    parsing.
           Product: Xerces2-J
           Version: 2.0.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: XML Schema Structures
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: Rikus.Grobler@Valtech.co.uk


I define a schema containing an attribute with a default value:
<xs:attribute name="TestAttribute" type="xs:string" default="TestDefault"/>

I then use Xerces (validating against my schema) to parse a XML document that 
does not contain the attribute "TestAttribute". I expect the parser to insert 
the default, but it does not.

I use the following feature setting on Xerces:
"http://xml.org/sax/features/validation", true
"http://apache.org/xml/features/validation/schema", true
"http://apache.org/xml/features/validation/schema/element-default", true
"http://apache.org/xml/features/validation/schema-full-checking", true
"http://apache.org/xml/features/validation/schema/normalized-value", true

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