Author: mukulg
Date: Wed Sep 8 06:58:59 2010
New Revision: 993634
URL: http://svn.apache.org/viewvc?rev=993634&view=rev
Log:
committing few improvements again to javadocs. sorry if this was inconvenient
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/AbstractPsychoPathImpl.java
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/AbstractPsychoPathImpl.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/AbstractPsychoPathImpl.java?rev=993634&r1=993633&r2=993634&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/AbstractPsychoPathImpl.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/AbstractPsychoPathImpl.java
Wed Sep 8 06:58:59 2010
@@ -49,8 +49,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
/**
- * A base class providing common services for XPath 2.0 expression evaluation,
- * with "PsychoPath XPath 2.0" engine.
+ * A base class providing common services for XPath expression evaluation,
+ * with 'PsychoPath XPath 2.0' engine.
*
* @xerces.internal
*
@@ -64,7 +64,7 @@ public class AbstractPsychoPathImpl {
/*
- * Initialize the PsychoPath XPath 2 dynamic context.
+ * Initialize the 'PsychoPath XPath 2' dynamic context.
*/
protected DynamicContext initDynamicContext(XSModel schema,
Document document,
@@ -72,7 +72,7 @@ public class AbstractPsychoPathImpl {
fDynamicContext = new DefaultDynamicContext(schema, document);
- // populate the PsychoPath XPath 2.0 static context, with namespace
+ // populate the 'PsychoPath XPath 2' static context, with namespace
// bindings derived from the XML Schema document.
NamespaceSupport xpath2NamespaceContext = (NamespaceSupport)
psychoPathParams.get("XPATH2_NS_CONTEXT");
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java?rev=993634&r1=993633&r2=993634&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java
Wed Sep 8 06:58:59 2010
@@ -63,13 +63,13 @@ import org.w3c.dom.NodeList;
/**
* An implementation of the XPath interface, for XML Schema 1.1 'assertions'
- * evaluation. This class interfaces with the "PsychoPath XPath 2.0" engine.
+ * evaluation. This class interfaces with the 'PsychoPath XPath 2.0' engine.
*
- * This class constructs Xerces PSVI enabled DOM trees for assertions
- * evaluation, from XNI event calls. The DOM trees constructed in this class,
- * are mapped by "PsychoPath XPath 2.0" engine to an XPath 2.0 XDM
- * representation. XML Schema 1.1 assertions are evaluated on these XPath tree
- * instances, in a bottom up fashion.
+ * This class constructs Xerces PSVI enabled DOM trees (for typed XDM instance
+ * support) for assertions evaluation, from XNI event calls. The DOM trees
+ * constructed in this class, are mapped by PsychoPath engine to an 'XPath 2'
+ * XDM representation. XML Schema assertions are evaluated on these XPath
+ * tree instances, in a bottom up fashion.
*
* @xerces.internal
*
@@ -115,9 +115,7 @@ public class XMLAssertPsychopathImpl ext
* Class constructor.
*/
public XMLAssertPsychopathImpl(Map assertParams) {
- // initializing the class variables.
- // we use a PSVI enabled DOM implementation, to be able to have typed
- // XDM nodes.
+ // initializing the class variables
this.fAssertDocument = new PSVIDocumentImpl();
this.fAssertRootStack = new Stack();
this.fAssertListStack = new Stack();
@@ -252,9 +250,9 @@ public class XMLAssertPsychopathImpl ext
/*
- * Method to evaluate all of assertions for an element tree. This is the
- * root method, which evaluates all assertions within Xerces XML Schema 1.1
- * implementation.
+ * Method to evaluate all of XML schema 1.1 assertions for an element tree.
+ * This is the root method, which evaluates all XML schema assertions, in
+ * a given XML instance validation episode.
*/
private void processAllAssertionsOnElement(QName element,
XSSimpleTypeDefinition itemType,
@@ -726,8 +724,8 @@ public class XMLAssertPsychopathImpl ext
}
// determine the PsychoPath XML schema 'typed value', given the Xerces
- // type code as an API method argument(few of the input type code
- // constants are PsychoPath specific).
+ // schema 'type code' as an API method argument(few of the input schema
+ // 'type code' constants are PsychoPath specific).
AnyType psychoPathType = SchemaTypeValueFactory.newSchemaTypeValue
(xsdTypecode, value);
@@ -739,16 +737,21 @@ public class XMLAssertPsychopathImpl ext
/*
- Find the built-in "XML Schema" Xerces 'type code' for XPath2 variable,
- $value. This function recursively searches the XSD type hierarchy
- navigating up the base types, to find the needed built-in type.
+ Find the built-in Xerces schema 'type code' for XPath2 variable,
+ $value. This function recursively searches the XML schema type
+ hierarchy navigating up the base types, to find the needed built-in
+ type.
*/
private short getXSDTypeCodeOf$Value(XSTypeDefinition elementType) {
if (Constants.NS_XMLSCHEMA.equals(elementType.getNamespace())) {
short typeCode = -100; // dummy initializer
- boolean isxsd11Type = false;
+ boolean isxsd11Type = false;
+
+ // the below 'if else' clauses are written to process few special
+ // cases, handling few of schema types, within PsychoPath XPath
+ // engine.
if ("dayTimeDuration".equals(elementType.getName())) {
typeCode = PsychoPathTypeHelper.DAYTIMEDURATION_DT;
isxsd11Type = true;
@@ -854,7 +857,7 @@ public class XMLAssertPsychopathImpl ext
/*
- * Determine if a "string value" is valid for a given simpleType
+ * Determine if a 'string value' is valid for a given simpleType
* definition. Using Xerces 'XSSimpleType.validate' API for this need.
*/
private boolean isValueValidForASimpleType(String value, XSSimpleType
@@ -867,7 +870,8 @@ public class XMLAssertPsychopathImpl ext
ValidatedInfo validatedInfo = new ValidatedInfo();
ValidationContext validationState = new ValidationState();
- // attempt to validate the value with the simpleType
+ // attempt to validate the 'string value' with a simpleType
+ // instance.
simplType.validate(value, validationState, validatedInfo);
}
catch(InvalidDatatypeValueException ex){
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]