Re: Action Item: rework 4.1.4 (cf. http://www.w3.org/2007/05/30-i18nits-minutes.html#action06)

Hi Christian,

looks good to me.

Some language related remarks:
not sure if "obfuscation" and "pertains" are the appropriate terms, but 
I don't know more appropriate ones ...

The best free tutorial I know is available at ZVON 
http://www.zvon.org/xxl/XPathTutorial/General/examples.html .

The difference between two XPath expressions at the end of your proposal 
is that //del/descendant-or-self::*/@* has 3 steps
//del
//descendant-or-self::*
/@*

whereas //@*[ancestor::del] has only one step and a predicate
//@*
[ancestor::del]

which is less effort to compute. Maybe we should add such an explanation 
to the example (without the detailed steps).

Cheers,

Felix

Lieske, Christian wrote:
> Dear all,
>
> I worked on my action item related to the XPath expressions (cf.
> http://www.w3.org/2007/05/30-i18nits-minutes.html#action06).
>
> Please find my suggestions below. 
>
> Please note that the suggested text contains an empty slot for which I need
> some input:
>
> - related to XPath Best Practices/Tutorial
>
> A paragraph which may need a better or additional examples:
>
> - related to obfuscation (the example pertains to a change we did during the
> F2F)
>
> I look forward to your feedback. 
>  
> Cheers,
> Christian
> ===
>
> 4.1.4 Create your XPath Expressions with Care
>
> ITS uses XPath expressions in several contexts to identify nodes. The most
> prominent contexts are selectors, and pointer attributes such as
>
>  <its:translateRule selector="//term" translate="no"/>
>
> or
>
>  <its:locNoteRule locNoteType="description" selector="//msg/data"
> locNotePointer="../notes"/>
>
> When writing ITS-related XPath expressions like the one above, the follwing
> general dimensions should be considered:
>
> 1. ITS XPath expressions pertain to XPath 1.0 or its successor
> 2. The values of ITS selector attributes are XPath absolute location paths
> 3. The values of ITS pointer attributes are XPath relative location paths
>
> In environments, where XSL is used to process ITS-related XPath expressions,
> it is important to know about the subset of XPath which is termed "XSLT
> patterns" (see note in
> http://www.w3.org/TR/its/#basic-concepts-selection-global). Using only XSLT
> patterns in ITS selector attributes helps to avoid issues which may arise
> with respect to the "match" attribute in XSL "template" elements.
>
> In addition to these general dimensions, best practices related to writing
> XPath expressions should be taken into account (see <TODO: reference to such
> a best practice or a good XPath tutorial>).
>
> The best practice of avoiding obfuscation may for example prompt you to
> prefer
>
>  <its:translateRule selector="//@*[ancestor::del]" translate="no"/>"
>
> over
>
>  <its:translateRule selector="//del/descendant-or-self::*/@*"
> translate="no"/>
>  
> ===
> Christian Lieske
> MultiLingual Technology Solutions (MLT)
> SAP Language Services (SLS)
> SAP Globalization Services
> SAP AG
> Dietmar-Hopp-Allee 16
> D-69190 Walldorf
> Germany
> T   +49 (62 27) 7 - 6 13 03
> F   +49 (62 27) 7 – 2 54 18
> christian.lieske@sap.com <blocked::mailto:christian.lieske@sap.com> 
> http://www.sap.com <blocked::http://www.sap.com/> 
>
> Sitz der Gesellschaft/Registered Office: Walldorf, Germany
>
> Vorstand/SAP Executive Board: Henning Kagermann (Sprecher/CEO), Léo
> Apotheker (stellvertretender Sprecher/Deputy CEO), Werner Brandt, Claus
> Heinrich, Gerhard Oswald, Peter Zencke
>
> Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory Board:
> Hasso Plattner 
>
> Registergericht/Commercial Register Mannheim No HRB 350269
>
>  
>
> Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige
> vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich
> erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine
> Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.
>
> Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
> Vielen Dank.
>
>  
>
> This e-mail may contain trade secrets or privileged, undisclosed, or
> otherwise confidential information. If you have received this e-mail in
> error, you are hereby notified that any review, copying, or distribution of
> it is strictly prohibited. Please inform us immediately and destroy the
> original transmittal. Thank you for your cooperation.
>
>   

Received on Monday, 11 June 2007 10:04:30 UTC