Return-Path: X-Original-To: apmail-xerces-j-dev-archive@www.apache.org Delivered-To: apmail-xerces-j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CFDE48048 for ; Fri, 12 Aug 2011 03:25:07 +0000 (UTC) Received: (qmail 29245 invoked by uid 500); 12 Aug 2011 03:25:06 -0000 Delivered-To: apmail-xerces-j-dev-archive@xerces.apache.org Received: (qmail 28936 invoked by uid 500); 12 Aug 2011 03:24:56 -0000 Mailing-List: contact j-dev-help@xerces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: j-dev@xerces.apache.org Delivered-To: mailing list j-dev@xerces.apache.org Received: (qmail 28891 invoked by uid 99); 12 Aug 2011 03:24:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2011 03:24:50 +0000 X-ASF-Spam-Status: No, hits=-2000.8 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2011 03:24:48 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9A8F5B8BDA for ; Fri, 12 Aug 2011 03:24:27 +0000 (UTC) Date: Fri, 12 Aug 2011 03:24:27 +0000 (UTC) From: "Michael Glavassevich (JIRA)" To: j-dev@xerces.apache.org Message-ID: <106412116.32003.1313119467629.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (XERCESJ-1113) [GSoC]: Support for xml:id MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/XERCESJ-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13083893#comment-13083893 ] Michael Glavassevich commented on XERCESJ-1113: ----------------------------------------------- Hi Ishara, The xml:id specification says: "The xml:id processor performs ID type assignment on all xml:id attributes, even those that do not satisfy the constraints", so even when the declared type is incorrect you should be setting the type to be ID. > [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.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-unsubscribe@xerces.apache.org For additional commands, e-mail: j-dev-help@xerces.apache.org