xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Powanda (Commented) (JIRA)" <xerces-j-...@xml.apache.org>
Subject [jira] [Commented] (XERCESJ-1113) [GSoC]: Support for xml:id
Date Tue, 27 Mar 2012 23:16:31 GMT

    [ https://issues.apache.org/jira/browse/XERCESJ-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240050#comment-13240050
] 

Jeff Powanda commented on XERCESJ-1113:
---------------------------------------

Ishara:

I'm very interested in using your Xerces patch to take advantage of xml:id support in Xerces.
Please let me know how I can download or build the patch. Do I need to call Xerces differently?

Regards,
Jeff Powanda
Vocera Communications, Inc.
                
> [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
>            Assignee: Ishara Karunarathna
>              Labels: gsoc2011
>         Attachments: XmlIDhandler(v1.0).zip, 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


Mime
View raw message