You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2002/07/18 23:34:53 UTC
DO NOT REPLY [Bug 10968] New: -
Default attributes from Schema not restored by removeAttribute
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=10968>.
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=10968
Default attributes from Schema not restored by removeAttribute
Summary: Default attributes from Schema not restored by
removeAttribute
Product: Xerces-C++
Version: 1.6.0
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: DOM
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: jthompson@memgen.com
DOM_Element::removeAttribute is supposed to restore the attribute
with its default value. This works when using a DTD, but not when using
a Schema. (Note that I think this is still a bug in the nightly build of
xerces-c-src_2002-07-14.)
In the following example XML and Schema files, if I remove the
attribute "contr" from the "person", it is not restored.
<?xml version="1.0" encoding="UTF-8"?>
<personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation='personnel.xsd'>
<person salary="100"/>
</personnel>
... and the presonnel.xsd Schema file:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name="personnel">
<xs:complexType>
<xs:sequence>
<xs:element ref="person" minOccurs='1' maxOccurs='unbounded'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="person">
<xs:complexType>
<xs:attribute name="contr" type="xs:string" default="false"/>
<xs:attribute name="salary" type="xs:integer"/>
</xs:complexType>
</xs:element>
</xs:schema>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org