[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlbeans-cvs
Subject: svn commit: r369575 -
From: radup () apache ! org
Date: 2006-01-16 21:30:43
Message-ID: 20060116213043.63804.qmail () minotaur ! apache ! org
[Download RAW message or body]
Author: radup
Date: Mon Jan 16 13:30:40 2006
New Revision: 369575
URL: http://svn.apache.org/viewcvs?rev=369575&view=rev
Log:
Fix for XMLBEANS-236. If a schema contained a prohibited attribute and types were \
defined inside the attribute then scomp produced an NPE. This is fixed with this \
checkin.
Contributed by Lawrence Jones
Modified:
xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/StscComplexTypeResolver.java
Modified: xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/StscComplexTypeResolver.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/StscComplexTypeResolver.java?rev=369575&r1=369574&r2=369575&view=diff
==============================================================================
--- xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/StscComplexTypeResolver.java \
(original)
+++ xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/StscComplexTypeResolver.java \
Mon Jan 16 13:30:40 2006 @@ -1001,7 +1001,22 @@
}
if (sAttr.getUse() != SchemaLocalAttribute.PROHIBITED)
+ {
result.addAttribute(sAttr);
+ }
+ else
+ {
+ // attribute is prohibited. If it has an anonymous type \
remove + // it from the list (this will prevent inclusion of \
any anonymous + // types defined within the prohibited \
attribute which would + // otherwise attempt to refer to the \
prohibited attribute at + // save() time)
+ SchemaType attrType = sAttr.getType();
+ if (anonymousTypes != null && \
anonymousTypes.contains(attrType)) + {
+ anonymousTypes.remove(attrType);
+ }
+ }
if (sAttr.getDefaultText() != null && !sAttr.isFixed())
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic