- From: <noah_mendelsohn@us.ibm.com>
- Date: Thu, 6 Aug 2009 10:55:26 -0400
- To: bugzilla@wiggum.w3.org
- Cc: www-xml-schema-comments@w3.org, Mukul Gandhi <gandhi.mukul@gmail.com>, "Costello, Roger L." <costello@mitre.org>
Mukul Gandhi writes: > Inherited attributes only exist in the context of a particular descendant > element (but they cannot be psysically present in the descendant elements, if > the descendant element's type is simple). Inherited attribute can be referred > in conditional type alternatives, and I think, also in assertions. > > So is it right to believe, that inheritable attributes are designed in the > spec, to be usable only in conditional type alternatives (CTA), and > assertions? > Or they can have usage, other than these two facilities (CTA and assertions)? I think you are missing the fact that there is also a PSVI contribution associated with inherited attributes [1]. So, in addition to the ability to access them in the schema itself, there is the possibility that parsers would expose them and make them available through some means for downstream processing. So, it would in principle be possible for an API exposing an element: <myText>Four score and seven years ago...</myText> to provide a method to query: "What is the explicit or inherited value of xml:lang for this element?". Of course, if myText is declared to be of simple type, such as xs:string, then there will never be an explicit xml:lang, but there might be an inherited. The PSVI provides that explicit and inherited can be distinguished; so, a parser that follows the PSVI will also indicate the distinction. Noah [1] http://www.w3.org/TR/xmlschema11-1/#Inherited_attributes -------------------------------------- Noah Mendelsohn IBM Corporation One Rogers Street Cambridge, MA 02142 1-617-693-4036 --------------------------------------
Received on Thursday, 6 August 2009 14:53:54 UTC