This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29920 - [XSLT30] (editorial) What does "target attribute" mean?
Summary: [XSLT30] (editorial) What does "target attribute" mean?
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 editorial
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-06 22:51 UTC by Abel Braaksma
Modified: 2016-10-13 19:40 UTC (History)
0 users

See Also:


Attachments

Description Abel Braaksma 2016-10-06 22:51:57 UTC
The meaning of the term "target attribute" can be inferred from its context, however, it is not immediately clear. I propose to create a definition for it.

Its first usage is in the following sentence: "The shadow attribute has a name that is the same as the name of the target attribute...".

The term is not explained there. I propose something like:

A *target attribute* is a no-namespace attribute on an element in the XSLT namespace with the same name as its shadow attribute after its leading underscore is removed from the name.

(I'm sure someone else can do better)
Comment 1 Michael Kay 2016-10-13 14:58:02 UTC
Yes, "target" is one of those words that can easily slip into a spec because it looks precise when actually it has no definition. Unfortunately, when we try to define it more formally we hit another problem, which is that the target attribute may or may not exist (and it's hard to speak rigorously when referring to a node that doesn't exist).

Perhaps:

Wherever a no-namespace attribute name N is permitted to appear on an element in the XSLT namespace (provided that N does not start with an underscore), then a value V can be supplied for N in one of two ways:

1. The conventional way is for an attribute node with name N and value V to appear in the XDM representation of the element node in the stylesheet tree.

2. As an alternative, a shadow attribute may be supplied allowing the value V to be statically computed during the preprocessing phase. The shadow attribute has a name  that is the same as the name N prefixed with an underscore, and the value of the shadow attribute is a value template in which all expressions enclosed between curly braces must be static expressions. The value V is the result of evaluating the value template. If a shadow attribute is present, then any attribute node with name N on its parent element is ignored.

Then move the sentence "If a shadow attribute and its corresponding target attribute are both present in the stylesheet, the non-shadow attribute is ignored." into the following Note, where we are allowed to use less formal language.
Comment 2 Michael Kay 2016-10-13 19:40:28 UTC
The change was agreed and has been applied.