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/08/16 15:26:26 UTC
DO NOT REPLY [Bug 11767] New: -
Fixed value set for Attribute not accessible through XMLAttDef
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=11767>.
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=11767
Fixed value set for Attribute not accessible through XMLAttDef
Summary: Fixed value set for Attribute not accessible through
XMLAttDef
Product: Xerces-C++
Version: 1.7.0
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: SAX/SAX2
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: awez@yahoo.com
I have the following Schema snippet:
<xsd:element name="image">
<xsd:complexType>
<xsd:attribute ref="src" fixed="http://www.xfront.com"/>
</xsd:complexType>
</xsd:element>
<xsd:attribute name="src" type="xsd:anyURI"/>
When I look at the SchemaAttDef setup for 'src' I would expect to get the fixed
value '...xfront.com...' when I call getValue() on the AttDef. Isn't that
right? Currently I don't get any value. I looked in the code in
TraverseSchema.cpp
TraverseSchema::processAttributeDeclRef() (at line 5349)
if (required){
if (fixedVal) {
attDef->setDefaultType(XMLAttDef::Required_And_Fixed);
valueConstraint = fixedVal;
}
else {
attDef->setDefaultType(XMLAttDef::Required);
}
}
fixedVal is only being assigned when required is True. I extended the code by
adding an else to the if(required) condition:
else {
if (fixedVal) {
attDef->setDefaultType(XMLAttDef::Fixed);
valueConstraint = fixedVal;
}
}
I get the fixed value now. Question, is this right? Is there a reason why the
fixed value was left off if not required?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org