You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mu...@apache.org on 2022/01/08 12:55:20 UTC
svn commit: r1896836 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs: XMLAssertXPath2EngineImpl.java assertion/XSAssertionXPath2Value.java assertion/XSAssertionXPath2ValueImpl.java
Author: mukulg
Date: Sat Jan 8 12:55:20 2022
New Revision: 1896836
URL: http://svn.apache.org/viewvc?rev=1896836&view=rev
Log:
xercesj commit : minor refactoring and improvements to comments
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertXPath2EngineImpl.java
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2Value.java
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertXPath2EngineImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertXPath2EngineImpl.java?rev=1896836&r1=1896835&r2=1896836&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertXPath2EngineImpl.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertXPath2EngineImpl.java Sat Jan 8 12:55:20 2022
@@ -324,8 +324,8 @@ public class XMLAssertXPath2EngineImpl e
/*
- * 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 an XML instance validation episode.
+ * Method to evaluate all relevant XML Schema 1.1 assertions, for an XML document instance
+ * element tree.
*/
private void processAllAssertionsOnElement(QName element, List assertions, Augmentations augs) throws Exception {
@@ -334,7 +334,7 @@ public class XMLAssertXPath2EngineImpl e
// determine "string value" of XPath2 context variable $value
ElementPSVI elemPsvi = (ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI);
- String value = computeStringValueOf$value(fCurrentAssertDomNode, elemPsvi);
+ String value = getStringValueOf$value(fCurrentAssertDomNode, elemPsvi);
// evaluate assertions
if (assertions instanceof XSObjectList) {
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2Value.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2Value.java?rev=1896836&r1=1896835&r2=1896836&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2Value.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2Value.java Sat Jan 8 12:55:20 2022
@@ -37,7 +37,7 @@ public interface XSAssertionXPath2Value
/*
* Determine "string value" of XPath 2.0 context variable $value.
*/
- public String computeStringValueOf$value(Element rootNodeOfAssertTree, ElementPSVI pElemPSVI) throws DOMException;
+ public String getStringValueOf$value(Element rootNodeOfAssertTree, ElementPSVI pElemPSVI) throws DOMException;
/*
* Given a string value, this method sets an XPath 2.0 typed value for variable "$value" in XPath dynamic context. This method may
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java?rev=1896836&r1=1896835&r2=1896836&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java Sat Jan 8 12:55:20 2022
@@ -44,7 +44,7 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
/**
- * This class defines a set of methods to work with XPath 2.0 dynamic context
+ * This class defines methods to work with XPath 2.0 dynamic context
* variable "$value", that is needed for XSD assertions evaluation.
*
* @xerces.internal
@@ -61,7 +61,7 @@ public class XSAssertionXPath2ValueImpl
/*
* Determine "string value" of XPath 2.0 context variable $value.
*/
- public String computeStringValueOf$value(Element rootNodeOfAssertTree, ElementPSVI pElemPSVI) throws DOMException {
+ public String getStringValueOf$value(Element rootNodeOfAssertTree, ElementPSVI pElemPSVI) throws DOMException {
String strValueOf$value = "";
XSTypeDefinition typeDef = pElemPSVI.getTypeDefinition();
@@ -79,7 +79,7 @@ public class XSAssertionXPath2ValueImpl
StringBuffer textValueContents = new StringBuffer();
final int childListLength = childNodeList.getLength();
int textChildCount = 0;
- // we are only interested in text & element nodes. store count of them in this variable.
+ // we're only interested in text and element nodes here. store count of them in this variable.
int effectiveChildNodeCount = 0;
for (int childNodeIndex = 0; childNodeIndex < childListLength; childNodeIndex++) {
Node node = childNodeList.item(childNodeIndex);
@@ -95,7 +95,7 @@ public class XSAssertionXPath2ValueImpl
}
if (textChildCount == effectiveChildNodeCount) {
- // the DOM tree we are inspecting has simple content. therefore we can find the desired string value.
+ // the DOM tree we're working with just now has simple content. therefore we can find the desired string value.
if ((pElemPSVI.getTypeDefinition()).derivedFrom(SchemaSymbols.URI_SCHEMAFORSCHEMA,
SchemaSymbols.ATTVAL_STRING,
XSConstants.DERIVATION_RESTRICTION)) {
@@ -112,7 +112,7 @@ public class XSAssertionXPath2ValueImpl
return strValueOf$value;
- } // computeStringValueOf$value
+ } // getStringValueOf$value
/*
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org