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 2007/11/02 21:54:12 UTC
svn commit: r591458 -
/xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
Author: mrglavas
Date: Fri Nov 2 13:54:11 2007
New Revision: 591458
URL: http://svn.apache.org/viewvc?rev=591458&view=rev
Log:
Fixing JIRA Bug #1278:
http://issues.apache.org/jira/browse/XERCESJ-1278
We were forgetting to assign an anonymous type name to the simple type definition
of a complex type derived by restriction from a complex type with simple content.
Modified:
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java?rev=591458&r1=591457&r2=591458&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java Fri Nov 2 13:54:11 2007
@@ -20,6 +20,7 @@
import org.apache.xerces.impl.dv.SchemaDVFactory;
import org.apache.xerces.impl.dv.XSFacets;
import org.apache.xerces.impl.dv.XSSimpleType;
+import org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl;
import org.apache.xerces.impl.xs.SchemaGrammar;
import org.apache.xerces.impl.xs.SchemaSymbols;
import org.apache.xerces.impl.xs.XSAnnotationImpl;
@@ -527,7 +528,11 @@
fixedFacets = fi.fFixedFacets;
}
- fXSSimpleType = schemaFactory.createTypeRestriction(null,schemaDoc.fTargetNamespace,(short)0,baseValidator,null);
+ String name = genAnonTypeName(simpleContentElement);
+ fXSSimpleType = schemaFactory.createTypeRestriction(name,schemaDoc.fTargetNamespace,(short)0,baseValidator,null);
+ if (fXSSimpleType instanceof XSSimpleTypeDecl) {
+ ((XSSimpleTypeDecl)fXSSimpleType).setAnonymous(true);
+ }
try{
fValidationState.setNamespaceSupport(schemaDoc.fNamespaceSupport);
fXSSimpleType.applyFacets(facetData, presentFacets, fixedFacets, fValidationState);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org