XML Schema 1.1 defaultAttributes 
---------------------------------

                 Key: XERCESJ-1352
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1352
             Project: Xerces2-J
          Issue Type: Bug
          Components: XML Schema 1.1 Structures
    Affects Versions: 2.9.1
            Reporter: John Chan
            Priority: Minor


The defaultAttributes feature does not work properly.   

1. The defaultAttributes schema component is never set in the XSDocumentInfo.  
In the XSDocumentInfo constructor, fDefaultAttributes is set to be the the 
value of the defaultsAttributesApply attribute, which is wrong and would be 
always null.  Instead, it should be set to the value of the defaultAttributes 
attribute.

2. The defaultAttributeGroup is never set.
In XSDHandler.traverseShemas(), the condition statement to check whether or not 
to set currSchemaDoc.fDefaultGroup is incorrect.  It checks whether the 
fDefaultAGroup != null, if so, set it.  But the fDefaultAGroup was never set 
before.

3. The namespace support is not set before validating the schema element's 
attributes.  Thus if the defaultAttributes attribute exist on the schema 
element, the validation of defaultAttributes will fail.  One way around this is 
to in the AttributeChecker.checkAttributes() method, do not try to validate 
defaultAttributes attribute.  After the namespacesuport is set, then try to 
validate the defaultAttributes attribute and set it.  But this is not a 
particularly elegant solution.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to