- Package:
- libxerces2-java
- Source:
- libxerces2-java
- Submitter:
- "brian m. carlson"
- Date:
- 2011-08-24 22:39:24 UTC
- Severity:
- normal
Xerces supports XInclude with the "element" XPointer, which refers to an ID. However, while this works fine with ID attributes that are defined in a DTD, it does not work if the IDs are declared using xml:id. This makes the "element" syntax useless for including documents that do not contain a DOCTYPE declaration, which includes many useful XML formats (e.g. XHTML5). It would be nice if Xerces would support this.
Hi Brian, Can you confirm that your issue is the same one reported upstream here: https://issues.apache.org/jira/browse/XERCESJ-1113 It looks similar; unfortunately upstream has passed on this for 4 years now... Thank you, Tony
tags 605389 + patch kthxbye Attached is a patch to implement the required behavior to support xml:id.
Hey. If you want the submitter to see your reply, you need to use -submitter or CC him/her directly; the BTS does not do it by default. Yes. My implementation does not verify the constraints required by the xml:id specification, and it does not do additional normalization for types of ID. I'm happy to modify it so that it does. I believe that should be sufficient to handle xml:id in a conforming way with XInclude. I can look into creating a specific feature for enabling xml:id processing, if that's what upstream wants, as long as (1) they'll accept a reasonable implementation, (2) they specify what URI they want to use to refer to xml:id processing (e.g., for SAX), and (3) it is enabled by default. You can feel free to forward this to them; I have an Apache bugzilla account, but not a JIRA account, and I'm not particularly interested in creating one. (Having two separate BTSes is silly, IMO.)
According to the upstream bug[0], it looks like Xerces will likely gain some decent xml:id support soon. If it is not enabled by default, there will need to be some way to tell ant to turn it on when parsing XML for Xalan. [0] https://issues.apache.org/jira/browse/XERCESJ-1113