W3C home > Mailing lists > Public > public-i18n-its@w3.org > January to March 2007

Re: Namespace compare issue (Was: Re: Teleconference Minutes 2007-01-17)

From: Felix Sasaki <fsasaki@w3.org>
Date: Fri, 19 Jan 2007 00:30:33 +0900
Message-ID: <45AF9299.2060206@w3.org>
To: Sebastian Rahtz <sebastian.rahtz@oucs.ox.ac.uk>
Cc: Yves Savourel <ysavourel@translate.com>, public-i18n-its@w3.org

This gets messy ...

Here is another try, see again
http://www.w3.org/International/its/tests/test3/Translate1-result.xml as
an example . I now avoid numbering, but use the following for the
generation of the path attribute (see the template <XSL:template
match="*|@*" mode="get-full-path"> at
http://www.w3.org/International/its/tests/test3/datacats2xsl.xsl  :
    <XSL:if test="count(. | ../@*) = count(../@*)">@</XSL:if>
    <XSL:choose>
     <XSL:when test="namespace-uri(.)">
      <XSL:value-of
       select="concat(namespace-uri(.),'#',local-name())"/>
     </XSL:when>
     <XSL:otherwise>
      <XSL:value-of
       select="name()"/>
     </XSL:otherwise>
    </XSL:choose>
This expandes the namespace-uri if there is one before the local name.
Prefixes are not used. Note the difference between elements and attributes.
It looks ugly but seems to work. Would that be fine with you?

Felix


Sebastian Rahtz wrote:
> Felix Sasaki wrote:
>> That's fine as well. See e.g. again
>> http://www.w3.org/International/its/tests/test3/Translate1-result.xml .
>> Is it o.k. with you, Yves? Note that we have to be careful about
>> counting attributes, since they are not an ordered set. Let's hope our
>> implementations do the same ...
>>
>>   
> hmm. mine returns 0 from <xsl:number level="any"> applied to an attribute.
> How did you calculate the "a" attribute?
> 
> What I actually meant was a relative count for attributes, so
> 
> <o:node n="1" path="/myMetaDoc">
>      <o:output o:translate="yes"/>
>    </o:node>
>    <o:node a="1" n="1" path="/myMetaDoc/@its:translate">
>      <o:output o:translate="no"/>
>    </o:node>
> 
> 
> indicating that @its:translate is the first attribute of the first element.
> 
Received on Thursday, 18 January 2007 15:30:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:12:48 GMT