W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2007

[Bug 5003] Applicability of <alternative> element to xml:lang

From: <bugzilla@wiggum.w3.org>
Date: Fri, 07 Sep 2007 18:13:08 +0000
CC:
To: www-xml-schema-comments@w3.org
Message-Id: <E1ITiKK-0000gB-1L@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5003





------- Comment #4 from noah_mendelsohn@us.ibm.com  2007-09-07 18:13 -------
Mike Kay writes:

> Given that XSDL already augments the Infoset with
> values for defaulted attributes, it seems entirely
> reasonable to me to extend the defaulting
> mechanism to allow the defaulted value to be
> inherited from an ancestor element rather than
> defined as a constant in the schema. (However,
> this reopens the question of whether defaulted
> attribute values are visible to the XPath
> expressions used in CTA.)

Very interesting approach.  I remain opposed to having the XPath's "look"
outside the tree of the element being validated, but I am not necessarily
opposed to saying that the Infoset transform about which I speculated could be
included, perhaps as an option (another point of incompatibility?  Ugh.
Anyway...) in XSD itself.  So then the XSD model would be:

* Augment infoset for defaults and inherited attributes (not sure how we'd
specify which ones inherit, vs. special-casing just xml:lang, which seems very
ugly).  

* State that validation uses the inherited attribute values, either for all
purposes, or specifically for XPath data model construction.

More complexity, but if it makes users happy I might live with it.  One thing I
like about this is that it makes streaming a bit less of a transformative
exercise.  You just inherit the xml:lang values in the Infoset as you go.  If
XPath has an ancestor axis, you need to notice it, and to the sort of things
Fabio's team has proposed to turn it into a forward processing model.

So, I'm not strongly in favor, but not strongly opposed.
Received on Friday, 7 September 2007 18:13:14 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:06 UTC