[ https://issues.apache.org/jira/browse/XERCESJ-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ishara Karunarathna updated XERCESJ-1113: ----------------------------------------- Attachment: xmlIDHandler.zip Hi Michael, Here I have attached the current code for the xmlID handler component and to configure Pipeline. XmlIDHandler class is the class file I created to Process xml:id attribute. I modified configurePipeline() method in org.apache.xerces.parsers.XML11Configuration class to add xml:id handler component to pipe line. And I add /** xml:id processing feature ("xml:id"). */ public static final String XMLID_FEATURE = "xmlid"; to the org.apache.xerces.impl.Constants.java class. Can you let me know what's left to do and improve. Thank you. > [GSoC]: Support for xml:id > -------------------------- > > Key: XERCESJ-1113 > URL: https://issues.apache.org/jira/browse/XERCESJ-1113 > Project: Xerces2-J > Issue Type: New Feature > Components: XInclude 1.0 > Affects Versions: 2.7.1 > Environment: All > Reporter: George Cristian Bina > Labels: gsoc2011 > Attachments: xmlIDHandler.zip > > > Hi, > The XInclude ID support should handle xml:id. This is useful for instance > with DocBook or TEI that use Relax NG schemas for validation and also need > XInclude support. > Here it is a patch that adds support for handling xml:id attributes as > attributes of ID type. > Index: > C:/george/workspace/xerces/src/org/apache/xerces/xpointer/ShortHandPointer.java > =================================================================== > --- > C:/george/workspace/xerces/src/org/apache/xerces/xpointer/ShortHandPointer.java > (revision 344362) > +++ > C:/george/workspace/xerces/src/org/apache/xerces/xpointer/ShortHandPointer.java > (working copy) > @@ -162,6 +162,17 @@ > } > } > > + if (normalizedValue == null && attributes != null) { > + // Try to see if we can get an xml:id > + for (int i = 0; i < attributes.getLength(); i++) { > + if ("xml".equals(attributes.getPrefix(i)) && > + > "id".equals(attributes.getLocalName(i))) { > + normalizedValue = attributes.getValue(i); > + break; > + } > + } > + } > + > if (normalizedValue != null > && normalizedValue.equals(fShortHandPointer)) { > return true; > Best Regards, > George -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: j-dev-h...@xerces.apache.org