Author: ajith
Date: Mon Mar 24 11:05:08 2008
New Revision: 640487
URL: http://svn.apache.org/viewvc?rev=640487&view=rev
Log:
1. Adding a comment about redefine handling
This seems to be an issue we need to discuss in the mailing list. I'm thinking
that the behavior of the schema object model should not be validating and if
the redefine is missing the parent then the object model should not be
generating faults. However it would be convenient (just as in the case of
getElement/Type) to have at least some utility methods that allows one to
search through the full import/include/redefine hierarchy.
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java?rev=640487&r1=640486&r2=640487&view=diff
==============================================================================
---
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
(original)
+++
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
Mon Mar 24 11:05:08 2008
@@ -254,6 +254,13 @@
return notation;
}
+ /**
+ * Handle redefine
+ * @param schema
+ * @param redefineEl
+ * @param schemaEl
+ * @return
+ */
private XmlSchemaRedefine handleRedefine(XmlSchema schema,
Element redefineEl, Element schemaEl) {
@@ -269,8 +276,14 @@
redefine.schemaLocation, validator);
}
-
-
+ /*
+ * FIXME - This seems not right. Since the redefine should take
into account
+ * the attributes of the original element we cannot just build
the type
+ * defined in the redefine section - what we need to do is to
get the original type
+ * object and modify it. However one may argue (quite
reasonably) that the purpose
+ * of this object model is to provide just the representation
and not the validation
+ * (as it has been always the case)
+ */
for (Element el = XDOMUtil.getFirstChildElementNS(redefineEl,
XmlSchema.SCHEMA_NS); el != null; el = XDOMUtil
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]