You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by lm...@apache.org on 2001/10/23 21:42:20 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/impl/v2/identity Selector.java
lmartin 01/10/23 12:42:20
Modified: java/src/org/apache/xerces/impl/v2/identity Selector.java
Log:
1. Changed startDocumentFragment to remove context arg - it wasn't used, and resulted in the method not being reached by the validator. 2. Changed start and end element calls to take an element decl, instead of a schema grammar
Revision Changes Path
1.4 +11 -10 xml-xerces/java/src/org/apache/xerces/impl/v2/identity/Selector.java
Index: Selector.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/v2/identity/Selector.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Selector.java 2001/10/10 15:14:42 1.3
+++ Selector.java 2001/10/23 19:42:20 1.4
@@ -65,6 +65,7 @@
import org.apache.xerces.xni.XMLAttributes;
import org.apache.xerces.util.SymbolTable;
import org.apache.xerces.impl.v2.XSElementDecl;
+import org.apache.xerces.impl.v2.XSAttributeGroupDecl;
import org.xml.sax.SAXException;
@@ -72,7 +73,7 @@
* Schema identity constraint selector.
*
* @author Andy Clark, IBM
- * @version $Id: Selector.java,v 1.3 2001/10/10 15:14:42 neilg Exp $
+ * @version $Id: Selector.java,v 1.4 2001/10/23 19:42:20 lmartin Exp $
*/
public class Selector {
@@ -135,7 +136,7 @@
* Schema identity constraint selector XPath expression.
*
* @author Andy Clark, IBM
- * @version $Id: Selector.java,v 1.3 2001/10/10 15:14:42 neilg Exp $
+ * @version $Id: Selector.java,v 1.4 2001/10/23 19:42:20 lmartin Exp $
*/
public static class XPath
extends org.apache.xerces.impl.v2.xpath.XPath {
@@ -204,8 +205,8 @@
// XMLDocumentFragmentHandler methods
//
- public void startDocumentFragment(NamespaceContext context, SymbolTable symbolTable)
- throws Exception {
+ public void startDocumentFragment(SymbolTable symbolTable)
+ throws XNIException {
super.startDocumentFragment(symbolTable);
//super.startDocumentFragment(context, symbolTable);
fElementDepth = 0;
@@ -219,13 +220,13 @@
*
* @param element The name of the element.
* @param attributes The element attributes.
- * @param grammar: the SchemaGrammar that all this is being validated by
+ * @param elementDecl: The element declaration
*
* @throws SAXException Thrown by handler to signal an error.
*/
public void startElement(QName element, XMLAttributes attributes,
- SchemaGrammar grammar) throws XNIException {
- super.startElement(element, attributes, grammar);
+ XSElementDecl elementDecl) throws XNIException {
+ super.startElement(element, attributes, elementDecl);
fElementDepth++;
// activate the fields, if selector is matched
@@ -236,14 +237,14 @@
for (int i = 0; i < count; i++) {
Field field = fIdentityConstraint.getFieldAt(i);
XPathMatcher matcher = fFieldActivator.activateField(field);
- matcher.startElement(element, attributes, grammar);
+ matcher.startElement(element, attributes, elementDecl);
}
}
} // startElement(QName,XMLAttrList,int)
- public void endElement(QName element, XSElementDecl eDecl, SchemaGrammar grammar) {
- super.endElement(element, eDecl, grammar);
+ public void endElement(QName element, XSElementDecl eDecl) {
+ super.endElement(element, eDecl);
if (fElementDepth-- == fMatchedDepth) {
fMatchedDepth = -1;
fFieldActivator.endValueScopeFor(fIdentityConstraint);
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org