Author: mukulg
Date: Mon Nov 29 01:04:17 2010
New Revision: 1040001

URL: http://svn.apache.org/viewvc?rev=1040001&view=rev
Log:
forgot to commit a necessary file for the previous refactoring changes. i'm 
doing so with this commit.

Modified:
    
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/alternative/Test.java

Modified: 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/alternative/Test.java
URL: 
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/alternative/Test.java?rev=1040001&r1=1040000&r2=1040001&view=diff
==============================================================================
--- 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/alternative/Test.java
 (original)
+++ 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/alternative/Test.java
 Mon Nov 29 01:04:17 2010
@@ -65,11 +65,9 @@ public class Test extends AbstractPsycho
     }
     
     /*
-     * Constructs a "test" for type alternatives. An overloaded constructor,
-     * for PsychoPath XPath processor.
+     * Constructs a "test" for type alternatives. An overloaded constructor, 
for PsychoPath XPath processor.
      */
-    public Test(XPath xpath, XSTypeAlternativeImpl typeAlternative,
-            NamespaceSupport namespaceContext) {
+    public Test(XPath xpath, XSTypeAlternativeImpl typeAlternative, 
NamespaceSupport namespaceContext) {
         fXPath = null;
         fXPathPsychoPath = xpath;
         fTypeAlternative = typeAlternative;
@@ -81,8 +79,8 @@ public class Test extends AbstractPsycho
     }
        
      /*
-      * Returns the test XPath. Return the native XPath expression,
-      * or PsychoPath, whichever is available. 
+      * Returns the test XPath expression object. Return the native Xerces 
XPath object or the PsychoPath XPath object, 
+      * whichever is available. 
       */
     public Object getXPath() {
         Object xpath = null;
@@ -101,7 +99,7 @@ public class Test extends AbstractPsycho
         if (fXPath != null) {
             return fXPath.evaluateTest(element, attributes);
         } else if (fXPathPsychoPath != null) {
-            return evaluateTestWithPsychoPath(element, attributes);  
+            return evaluateTestExprWithPsychoPath(element, attributes);  
         }
         else {
             return false;
@@ -113,19 +111,17 @@ public class Test extends AbstractPsycho
     }
     
     /*
-     * Evaluate the XPath "test" expression on an XDM instance, consisting
-     * of the specified element and its attributes. Using PsychoPath XPath 2.0
-     * engine for the evaluation. 
+     * Evaluate the XPath "test" expression on an XDM instance, consisting of 
the specified element
+     * and its attributes. Uses PsychoPath XPath 2.0 engine for the 
evaluation. 
      */
-    private boolean evaluateTestWithPsychoPath(QName element, XMLAttributes 
attributes) {
+    private boolean evaluateTestExprWithPsychoPath(QName element, 
XMLAttributes attributes) {
        boolean result = false;
        
        try {
-         // construct a DOM document (used by psychopath engine as XPath XDM
-         // instance). A PSVI DOM is constructed, to comply to PsychoPath
-         // architecture. This doesn't seem to affect CTA psychopath 
evaluations.
-         // CTA spec, doesn't require a typed XDM tree.
-         // relook...
+         // construct a DOM document (used by psychopath engine as XPath XDM 
instance). 
+         // A PSVI DOM is constructed, to comply to PsychoPath design. This 
doesn't seem to 
+         // affect CTA psychopath evaluations. CTA spec, doesn't require a 
typed XDM tree.
+         // REVISIT ...
          Document document = new PSVIDocumentImpl();
          
          Element elem = document.createElementNS(element.uri, element.rawname);
@@ -144,9 +140,7 @@ public class Test extends AbstractPsycho
          psychoPathParams.put("XPATH2_NS_CONTEXT", fXPath2NamespaceContext);
          initDynamicContext(null, document, psychoPathParams);
          
-         result = evaluatePsychoPathExpr(fXPathPsychoPath,
-                                fTypeAlternative.fXPathDefaultNamespace,
-                                elem);
+         result = evaluateXPathExpr(fXPathPsychoPath, 
fTypeAlternative.fXPathDefaultNamespace, elem);
        } 
        catch (StaticError ex) {
            result = false; 
@@ -160,6 +154,6 @@ public class Test extends AbstractPsycho
        
        return result;
        
-    } //evaluateTestWithPsychoPath
+    } // evaluateTestWithPsychoPath
     
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to