You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by je...@locus.apache.org on 2000/09/12 05:44:22 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/validators/datatype IDREFDatatypeValidator.java
jeffreyr 00/09/11 20:44:22
Modified: java/src/org/apache/xerces/validators/datatype
IDREFDatatypeValidator.java
Log:
Bug reported by Mikael Staldal.
Failed to validated the following:
<?xml version="1.0"?>
<!DOCTYPE root [
<!ELEMENT root (idEl|idrefEl)*>
<!ELEMENT idEl EMPTY>
<!ATTLIST idEl
id ID #REQUIRED>
<!ELEMENT idrefEl EMPTY>
<!ATTLIST idrefEl
ref IDREF #REQUIRED>
]>
<root>
<idrefEl ref="abc"/>
<idEl id="abc"/>
</root>
Revision Changes Path
1.12 +1 -6 xml-xerces/java/src/org/apache/xerces/validators/datatype/IDREFDatatypeValidator.java
Index: IDREFDatatypeValidator.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/validators/datatype/IDREFDatatypeValidator.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- IDREFDatatypeValidator.java 2000/08/17 00:49:04 1.11
+++ IDREFDatatypeValidator.java 2000/09/12 03:44:21 1.12
@@ -74,7 +74,7 @@
* standalone code as well as plugins to the validator architecture.
*
* @author Jeffrey Rodriguez-
- * @version $Id: IDREFDatatypeValidator.java,v 1.11 2000/08/17 00:49:04 jeffreyr Exp $
+ * @version $Id: IDREFDatatypeValidator.java,v 1.12 2000/09/12 03:44:21 jeffreyr Exp $
*/
public class IDREFDatatypeValidator extends AbstractDatatypeValidator {
private DatatypeValidator fBaseValidator = null;
@@ -133,7 +133,6 @@
if (state!= null){
message = (StateMessageDatatype) state;
if (message.getDatatypeState() == IDREFDatatypeValidator.IDREF_CLEAR ){
- //System.out.println("Received a IDREF Clear" );
if ( this.fTableOfId != null ){
fTableOfId.clear(); //This is pass to us through the state object
}
@@ -142,11 +141,9 @@
}
return null;
} else if ( message.getDatatypeState() == IDREFDatatypeValidator.IDREF_VALIDATE ){
- //System.out.println("Call to Validate" );
this.checkIdRefs();//Validate that all keyRef is a keyIds
} else if ( message.getDatatypeState() == IDREFDatatypeValidator.IDREF_STORE ) {
this.fTableOfId = (Hashtable) message.getDatatypeObject();
- //System.out.println("Conte Be Validated= >>" + content + "<<" );
if (!XMLCharacterProperties.validName(content)) {//Check if is valid key
InvalidDatatypeValueException error = new InvalidDatatypeValueException( "IDREF is not valid" );//Need Message
@@ -263,8 +260,6 @@
private void checkIdRefs() throws InvalidDatatypeValueException {
- //System.out.println("Tab Ids = " + this.fTableOfId );
- //System.out.println("Tab refs = " + this.fTableIDRefs );
if ( this.fTableIDRefs == null)
return;