You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ce...@apache.org on 2010/06/08 23:45:47 UTC
svn commit: r952833 - in /xmlbeans/trunk: ./
src/typeimpl/org/apache/xmlbeans/impl/schema/StscSimpleTypeResolver.java
Author: cezar
Date: Tue Jun 8 21:45:47 2010
New Revision: 952833
URL: http://svn.apache.org/viewvc?rev=952833&view=rev
Log:
Fix for compiling schema that contains complex type with simple content
that has facets defined in the base simple type.
Modified:
xmlbeans/trunk/ (props changed)
xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/StscSimpleTypeResolver.java
Propchange: xmlbeans/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jun 8 21:45:47 2010
@@ -0,0 +1,5 @@
+mytest
+build
+out
+XMLBeans.ipr
+XMLBeans.iws
Modified: xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/StscSimpleTypeResolver.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/StscSimpleTypeResolver.java?rev=952833&r1=952832&r2=952833&view=diff
==============================================================================
--- xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/StscSimpleTypeResolver.java (original)
+++ xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/StscSimpleTypeResolver.java Tue Jun 8 21:45:47 2010
@@ -891,6 +891,15 @@ public class StscSimpleTypeResolver
}
if (myFacets[code] != null)
{
+ SchemaType limitSType = limit.schemaType();
+ if ( limitSType!=null && !limitSType.isSimpleType() &&
+ limitSType.getContentType()==SchemaType.SIMPLE_CONTENT)
+ {
+ // in the case of complex types with simple content that has facets
+ // we need to compare values based on the content type
+ limit = baseImpl.getContentBasedOnType().newValue(facet.getValue());
+ }
+
int comparison = limit.compareValue(myFacets[code]);
if (comparison == 2 || comparison == (ismin ? -1 : 1))
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org