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

Felix Sasaki wrote:
> 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
>   
why not just

concat( namespace-uri(),'#',local-name())

and have done with it?

But some namespaces end in #, so thats not a wise choice of separator. might
be better to say

concat('{', namespace-uri(),'}',local-name())
 

-- 
Sebastian Rahtz      

Information Manager, Oxford University Computing Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431

OSS Watch: JISC Open Source Advisory Service
http://www.oss-watch.ac.uk

Received on Thursday, 18 January 2007 15:52:53 UTC