I am trying to get the value marked as fixed for the attribute in following schema excerpt using xerces grammar model. Using xerces 2.8 <xsd:element name="MyRef"> <xsd:complexType> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attribute name="MyAttr" type="xsd:string" fixed="MyFixedValue"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> </xsd:element>
Following is code snippet of what I'm using XSAttributeDeclaration* const attrDecl; // This is initialized by traversing through XSAttributeUseList assert(attrDecl->getConstraintType() == XSConstants::VALUE_CONSTRAINT_FIXED); const XMLCh* attrVal = attrDecl->getConstraintValue(); getConstraintType() always returns 0. attrVal is always 0. Note that other parameters in attrDecl seem to be OK.