Author: knoaman
Date: Fri Sep 9 14:03:58 2011
New Revision: 1167179
URL: http://svn.apache.org/viewvc?rev=1167179&view=rev
Log:
Handle min/maxVersion on <xs:schema> - Jira issue 1528
https://issues.apache.org/jira/browse/XERCESJ-1528
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java?rev=1167179&r1=1167178&r2=1167179&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java
Fri Sep 9 14:03:58 2011
@@ -256,7 +256,7 @@ public class SchemaDOMParser extends Def
// perform conditional exclusion checks for schema versioning
namespace
// (does not apply to <schema> element).
- if (fDepth > 0) {
+ if (fDepth > -1) {
checkVersionControlAttributes(element, attributes);
if (fIgnoreDepth > -1) {
return;
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=1167179&r1=1167178&r2=1167179&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Fri Sep 9 14:03:58 2011
@@ -2686,13 +2686,18 @@ public class XSDHandler {
private Element getSchemaDocument0(XSDKey key, String schemaId, Element
schemaElement) {
// now we need to store the mapping information from system id
// to the document. also from the document to the system id.
- if (key != null) {
- fTraversed.put(key, schemaElement);
+ if (schemaElement != null) {
+ if (key != null) {
+ fTraversed.put(key, schemaElement);
+ }
+ if (schemaId != null) {
+ fDoc2SystemId.put(schemaElement, schemaId);
+ }
+ fLastSchemaWasDuplicate = false;
}
- if (schemaId != null) {
- fDoc2SystemId.put(schemaElement, schemaId);
+ else {
+ fLastSchemaWasDuplicate = true;
}
- fLastSchemaWasDuplicate = false;
return schemaElement;
} // getSchemaDocument0(XSDKey, String, Element): Element
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]