Author: mrglavas
Date: Sat Apr 22 14:49:47 2006
New Revision: 396167

URL: http://svn.apache.org/viewcvs?rev=396167&view=rev
Log:
Fixing a bug. In a simple type derived by restriction facet annotations
were being lost if the derived type has no additional facets. In such a
case applyFacets() is never called so we must copy the annotations from
the base in the constructor.

Modified:
    xerces/java/trunk/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java

Modified: 
xerces/java/trunk/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java
URL: 
http://svn.apache.org/viewcvs/xerces/java/trunk/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java?rev=396167&r1=396166&r2=396167&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java 
(original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java 
Sat Apr 22 14:49:47 2006
@@ -375,6 +375,20 @@
                fPatternType = fBase.fPatternType;
                fFixedFacet = fBase.fFixedFacet;
                fFacetsDefined = fBase.fFacetsDefined;
+        
+        // always inherit facet annotations in case applyFacets is not called.
+        lengthAnnotation = fBase.lengthAnnotation;
+        minLengthAnnotation = fBase.minLengthAnnotation;
+        maxLengthAnnotation = fBase.maxLengthAnnotation;
+        patternAnnotations = fBase.patternAnnotations;
+        enumerationAnnotations = fBase.enumerationAnnotations;
+        whiteSpaceAnnotation = fBase.whiteSpaceAnnotation;
+        maxExclusiveAnnotation = fBase.maxExclusiveAnnotation;
+        maxInclusiveAnnotation = fBase.maxInclusiveAnnotation;
+        minExclusiveAnnotation = fBase.minExclusiveAnnotation;
+        minInclusiveAnnotation = fBase.minInclusiveAnnotation;
+        totalDigitsAnnotation = fBase.totalDigitsAnnotation;
+        fractionDigitsAnnotation = fBase.fractionDigitsAnnotation;
                
                //we also set fundamental facets information in case 
applyFacets is not called.
                calcFundamentalFacets();



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to