RE: Action Item: Editors to add a note to the spec about the subset of XPath in XSLT

Hi Christian, all,
 
I do like "caveat" for this section.
 
One note: maybe to make the XPath expression a bit clearer to people not too familiar with XPath, we could replace the elemnt
'verbatim' by 'myElement' or something similar that is clearly not part of the XPath keywords.
 
-ys


  _____  

From: public-i18n-its-request@w3.org [mailto:public-i18n-its-request@w3.org] On Behalf Of Lieske, Christian
Sent: Tuesday, December 19, 2006 3:07 AM
To: Felix Sasaki; public-i18n-its@w3.org
Subject: Action Item: Editors to add a note to the spec about the subset of XPath in XSLT



Hi Felix, 

Here's my suggestion for our action item 

        Editors to add a note to the spec about the subset of XPath in XSLT 

recorded in  <http://www.w3.org/2006/12/13-i18nits-minutes.html> http://www.w3.org/2006/12/13-i18nits-minutes.html 

Let me know what you think. 

I would suggest to add the note to 2.1.2 (Global Approach). On the one hand that's where 
we first extensively talk about "selectors". On the other hand, it is in a non-normative part. 

Cheers, 
Christian 
=== 

Caveat Related to XSLT-based Processing of ITS Selector Attributes 

The values of ITS "selector" attributes are XPath absolute location paths. Accordingly, the 
following is a legitimate value: 

        verbatim/descendant-or-self::*/@* 

Unfortunately, values like this cause trouble when they are used in XSLT-based processing 
of ITS where the values of the ITS "selector" attributes are used as values of "match" attributes 
of XSLT templates. The reason for this is the following: "match" attributes may only contain 
a restriction/subset of XPath expressions, so-called "patterns" (see  <http://www.w3.org/TR/xslt#patterns>
http://www.w3.org/TR/xslt#patterns). 
Basically the following restrictions hold for patterns: 

- only axes "child" or "attribute" allowed 
- "//" or "/" possible 
- id() or key() function possible 
- predicates possible 

Using only XSL patterns in ITS "selector" attributes helps to avoid this issue. In many 
cases, this is possible by using predicates. The value above may for example be 
rewritten as follows 
        
*[self::verbatim]/@* | verbatim//*/@* 

Received on Wednesday, 20 December 2006 13:37:54 UTC