Re: [XQuery] I18N last call comments qt-2004Feb0415-06]

Martin,

You asked, on behalf of the I18N WG, in [1] item 6,

> [6] How can xml:lang be extracted from data and preserved with a query?
>     How can this be done without littering all elements with unnecessary
>     xml:lang attributes? Other inherited attributes will have the same
>     problem; some better support for inherited attributes seems  
> necessary.

Thank you for your comment.

It is possible to write an XPath expression to select the nearest scoping
xml:lang attribute.

    (ancestor-or-self::*/@xml:lang)[last()]

And it is therefore not necessary to add xml:lang attributes unnecessarily  
to
the source or target data. We believe applications can handle the copying  
over
of the required xml:lang attributes themselves and therefore decline to  
add any
additional mechanisms.

We note that although support for the ancestor-or-self axis is an optional
feature in XQuery, equivalent expressions working downwards from the root  
are
possible even if the ancestor-or-self axis is not supported in a particular
implementation.

Please let us know if this is not a satisfactory response.

Mary, on behalf of the XML Query WG

[1]  
http://lists.w3.org/Archives/Public/public-qt-comments/2004Feb/0415.html

Received on Friday, 22 October 2004 17:52:35 UTC