You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2012/09/04 08:31:10 UTC
svn commit: r1380456 -
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java
Author: mrglavas
Date: Tue Sep 4 06:31:09 2012
New Revision: 1380456
URL: http://svn.apache.org/viewvc?rev=1380456&view=rev
Log:
JIRA Issue #1583: https://issues.apache.org/jira/browse/XERCESJ-1583. Fixing an NPE. Before processing the 'inheritable' attribute first check that we're in XML Schema 1.1 mode.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java?rev=1380456&r1=1380455&r2=1380456&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java Tue Sep 4 06:31:09 2012
@@ -140,11 +140,16 @@ class XSDAttributeTraverser extends XSDA
attrUse.fDefault.normalizedValue = defaultAtt;
}
- if (attrDecl.getAttributeNode(SchemaSymbols.ATT_INHERITABLE) != null) {
- attrUse.fInheritable = inheritableAtt.booleanValue();
+ if (fSchemaHandler.fSchemaVersion >= Constants.SCHEMA_VERSION_1_1) {
+ if (attrDecl.getAttributeNode(SchemaSymbols.ATT_INHERITABLE) != null) {
+ attrUse.fInheritable = inheritableAtt.booleanValue();
+ }
+ else {
+ attrUse.fInheritable = attribute.getInheritable();
+ }
}
else {
- attrUse.fInheritable = attribute.getInheritable();
+ attrUse.fInheritable = false;
}
// Get the annotation associated with the local attr decl
@@ -386,7 +391,7 @@ class XSDAttributeTraverser extends XSDA
boolean inheritable = false;
if (inheritableAtt != null) {
- inheritable = inheritableAtt.booleanValue();
+ inheritable = inheritableAtt.booleanValue();
}
attribute.setValues(nameAtt, tnsAtt, attrType, constraintType, scope,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org