Return-Path: Delivered-To: apmail-xerces-j-dev-archive@www.apache.org Received: (qmail 90258 invoked from network); 8 Aug 2009 10:24:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Aug 2009 10:24:32 -0000 Received: (qmail 54717 invoked by uid 500); 8 Aug 2009 10:24:40 -0000 Delivered-To: apmail-xerces-j-dev-archive@xerces.apache.org Received: (qmail 54626 invoked by uid 500); 8 Aug 2009 10:24:39 -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 54613 invoked by uid 99); 8 Aug 2009 10:24:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Aug 2009 10:24:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Aug 2009 10:24:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ED276234C044 for ; Sat, 8 Aug 2009 03:24:14 -0700 (PDT) Message-ID: <82499110.1249727054970.JavaMail.jira@brutus> Date: Sat, 8 Aug 2009 03:24:14 -0700 (PDT) From: "Mukul Gandhi (JIRA)" To: j-dev@xerces.apache.org Subject: [jira] Commented: (XERCESJ-1391) XML Schema 1.1, inheritable attributes implementation In-Reply-To: <238362964.1249536854883.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/XERCESJ-1391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740868#action_12740868 ] Mukul Gandhi commented on XERCESJ-1391: --------------------------------------- I recently, raised a clarification to the XML Schema WG (after I posted this JIRA issue). I am told, that inheritable attributes are not required for assertions. But they will be needed by CTA. So, we have to modify the XDM construction for CTA to include inheritable attributes. No changes will be required for assertions, for the inherited attributes. I think, I should be able to do the inherited attributes changes for CTA. It shouldn't be much complex, I believe. In case, I need help, I might ask Hiranya (the original author of CTA in Xerces-J) or perhaps other members, of the xerces-dev community. I am looking forward, to some kind of feedback to this patch. Regards, Mukul > XML Schema 1.1, inheritable attributes implementation > ----------------------------------------------------- > > Key: XERCESJ-1391 > URL: https://issues.apache.org/jira/browse/XERCESJ-1391 > Project: Xerces2-J > Issue Type: New Feature > Components: XML Schema 1.1 Structures > Affects Versions: 2.9.1 > Reporter: Mukul Gandhi > Attachments: inhr_attr_patch.txt, test.xml, test.xsd > > > Hi all, > I have written an implementation, for XML Schema 1.1 inheritable attributes. I am creating this JIRA issue for inheritable > attributes, with a patch. > I think, that a review of these changes would be good before we commit these changes to SVN server. This will help to ensure the correctness of implementation, and better quality of the code. > I request, that this JIRA issue be assigned to the appropriate reviewer. > Below are some implementation details, and a bit of design thinking I have in mind, for inherited attributes implementation. > This patch has all the implementation for attribute traversal changes, and also some changes in XMLSchemaValidator.java > (which are currently not finalized, but I plan to use these changes in CTA and assertions enhancements, for inheritable > attributes). > I am also attaching a dummy XML and XSD files, which I used to verify the attribute traversal changes. The attached XML is > valid, for the given XSD, using the current XML Schema 1.1 code in SVN, plus this patch that I have written. > As mentioned above, apart from attribute traversal changes (which are working fine, and tested at my end), the following code has been written in XMLSchemaValidator.java, which I plan to use to enhance CTA and assertions implementation, for inherited attributes: > I have written a new method, saveInheritableAttributes(..) in XMLSchemaValidator.java, which I am invoking from, > handleStartElement method. > [1] CTA (conditional type assignment) changes > I plan to enhance CTA implementation as following, to be able to use inherited attributes: > In XMLSchemaValidator.java, I plan to modify the code fragment for CTA (the fragment, //process type alternatives). I'll add > inherited attributes from the list, fInheritableAttrMap (using the element level information, which is the key to this map > object) to the "attributes (of type XMLAttributes)" list. > Rest of the code for CTA will remain same. The statement, > if (test != null && test.evaluateTest(element, attributes)) { > would use the new list of attributes (attributes, which are physically present on this element, plus the inherited attributes). > After the CTA processing is complete (i.e after a type from CTA is assigned to the element), I'll remove the inherited > attributes from the "attributes" list, so the original set of attributes is used by code after CTA processing. > I think, these are all the changes that are required to enhance CTA implementation, to be able to use inherited attributes. > [2] Assertion enhancements > I plan to enhance assertions implementation as following, to be able to use inherited attributes: > In the, handleStartElement method, I'll pass the inherited attributes as well to the assertions interface. > To do this, I think following: > addAssertsForEvaluation(element, attributes); > would change to something like, > addAssertsForEvaluation(element, attributes, inheritedattributes); > In XMLAssertPsychopathImpl.java, I'll add the inherited attributes as well in the XDM tree to all descendant elements. > I think, these changes would be sufficient, to implement inherited attributes, on assertions. > I have just outlined the logic to enhance CTA and assertions, for inherited attributes. The final code, might look a bit > different, than the specifics I have mentioned here. > I would be thankful, if you could send me the feedback to this patch, and confirmation (and feedback) that CTA and assertions design changes, look ok. > After I recieve the feedback to this patch, and to CTA and assertions design changes, I'll do the suggested modifications. > I would appreciate, feedback from any member of the xerces-dev community, as well. > Regards, > Mukul -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org For additional commands, e-mail: j-dev-help@xerces.apache.org