tags 605389 + patch kthxbye Attached is a patch to implement the required behavior to support xml:id.
-- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
diff -ur libxerces2-java.old/src/org/apache/xerces/xpointer/ShortHandPointer.java libxerces2-java-2.9.1/src/org/apache/xerces/xpointer/ShortHandPointer.java
--- libxerces2-java.old/src/org/apache/xerces/xpointer/ShortHandPointer.java 2010-11-29 15:15:28.000000000 +0000
+++ libxerces2-java-2.9.1/src/org/apache/xerces/xpointer/ShortHandPointer.java 2010-11-29 19:35:10.000000000 +0000
@@ -159,7 +159,12 @@
if (normalizedValue != null) {
break;
}
- // 4. No externally determined ID's
+
+ // 4. No externally determined ID's, so use xml:id if it exists.
+ normalizedValue = getXMLID(attributes, i);
+ if (normalizedValue != null) {
+ break;
+ }
}
}
@@ -187,6 +192,23 @@
}
return null;
}
+
+ /**
+ * Returns the value of xml:id
+ *
+ * @param attributes
+ * @param index
+ * @return String
+ * @throws XNIException
+ */
+ public String getXMLID(XMLAttributes attributes, int index)
+ throws XNIException {
+
+ if (attributes.getQName(index).equals("xml:id")) {
+ return attributes.getValue(index);
+ }
+ return null;
+ }
/**
* Returns the schema-determined-ID.
@@ -291,4 +313,4 @@
public void setSchemeData(String schemeData) {
// NA
}
-}
\ No newline at end of file
+}
signature.asc
Description: Digital signature
__ This is the maintainer address of Debian's Java team <http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers>. Please use [email protected] for discussions and questions.

