[Bug 7198] can inheritable attributes appear, on elements with simple types

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





--- Comment #6 from C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>  2009-08-05 13:32:41 ---
The value of an inherited attribute is taken from the nearest ancestor which
provides a value for an attribute of that name.  So in your example, element Z
will have an inherited attribute named 'a', with the value 1.

For further discussion, interested readers may wish to consult a recent email
exchange on the xmlschema-dev list, beginning with an inquiry from Roger
Costello at 

  http://lists.w3.org/Archives/Public/xmlschema-dev/2009Jun/0044.html

and including a summary of the relevant rules in section 3.3.5.6 by Michael Kay
at 

  http://lists.w3.org/Archives/Public/xmlschema-dev/2009Jul/0002.html

On your other question, I hesitate to answer.  It's certainly the case that
inheritance of attributes was introduced as a way of helping resolve bug 5003,
which concerned a requirement to refer to the attribute xml:lang in conditional
type assignments and/or assertions.  I don't know of any other constructs in
which they will be useful, but I hesitate to make a blanket statement that they
have no other uses, because sometimes ingenious people find ways to use things
that I would not have predicted.  I think, though, that your characterization
is probably correct, because inherited attributes become visible only in the
construction of the XDM instance used to evaluate the XPath expressions of
assertions and conditional type assignment.  If they are not visible or
mentioned elsewhere, it's hard to see how to use them elsewhere.  

Certainly it's safe to say that the WG didn't have any other particular usage
of inherited attributes in contexts other than evaluating assertions and type
alternatives in mind at the time the construct was developed.  At least, there
is no record of it that I can see.  I hope this helps.

The WG has not yet discussed this issue; I am speaking here only for myself.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 5 August 2009 13:32:50 UTC