neilg 2003/03/10 09:35:14 Modified: java/src/org/apache/xerces/impl/xs/identity Field.java Log: fixing bug 16706 Revision Changes Path 1.10 +15 -1 xml-xerces/java/src/org/apache/xerces/impl/xs/identity/Field.java Index: Field.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/identity/Field.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Field.java 14 Jan 2003 20:21:46 -0000 1.9 +++ Field.java 10 Mar 2003 17:35:14 -0000 1.10 @@ -173,6 +173,20 @@ xpath:"./"+xpath), symbolTable, context); + // verify that only one attribute is selected per branch + for (int i=0;i<fLocationPaths.length;i++) { + int numAttrs = 0; + for(int j=0; j<fLocationPaths[i].steps.length; j++) { + org.apache.xerces.impl.xpath.XPath.Axis axis = + fLocationPaths[i].steps[j].axis; + if (axis.type == axis.ATTRIBUTE) { + numAttrs++; + } + if(numAttrs > 1) { + throw new XPathException("c-fields-xpaths"); + } + } + } } // <init>(String,SymbolTable,NamespacesContext) } // class XPath
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]