Re: [xsl] value of NDATA Entities in attributes

Subject: Re: [xsl] value of NDATA Entities in attributes
From: "Drew McLellan" <dru@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Aug 2003 08:50:53 -0700
James Cummings wrote:

>The entities for these are created as:
><!NOTATION FOO SYSTEM 'text/xml'>
><!ENTITY Blort SYSTEM 'Blortfile.xml' NDATA FOO>
><!ENTITY Wibble SYSTEM 'Wibblefile.xml' NDATA FOO>
>(etc.)
>
>Although a little warped this does certainly make sure
>that things are given as <xptr href="Blort" other="attrib" />
>if blort is used instead, it does not validate.
>
>The question is, since the Blort entity is declared as
>NDATA, is it possible to retrieve the string 'Blortfile.xml'.
>
>On the surface you'd think something like:
><xsl:template match="xptr">
><xsl:value-of select="@href"/>
></xsl:template>
>
>when matching <xptr href="Blort" other="attrib" />
>would output 'Blortfile.xml'.  However (probably
>quite sensibly) it instead outputs 'Blort'.

I think this is what the unparsed-entity-uri() function is for. I've been battling with something similar all day.

Let me know if you get it to work, coz I certainly can't!

best,

Drew McLellan
 
             

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread