Article View: fr.comp.text.xml
Article #10046Re: unparsed-entity-uri ?
From: Tom.
Date: Mon, 08 Jan 2001 14:08
Date: Mon, 08 Jan 2001 14:08
36 lines
1771 bytes
1771 bytes
In <wy4rza9u6w.fsf@polya.u-strasbg.fr>, Alain Ketterlin wrote:
> J'avoue que la fonction unparsed-entity-uri
> (http://www.w3.org/TR/xslt.html#function-unparsed-entity-uri)
> me laisse un peu perplexe. Quelqu'un aurait-il un exemple de son
> utilisation ?
source tree :
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE foo [
...
<!ELEMENT image EMPTY>
<!ATTLIST image source ENTITY #REQUIRED>
<!NOTATION png SYSTEM "http://www.w3.org/TR/png">
<!ENTITY logo SYSTEM "logo.png" NDATA png>
...
]>
<foo>
...
<image source="logo"/>
...
</foo>
stylesheet tree :
...
<xsl:template match="image">
<img src="{unparsed-entity-uri('png')}"/>
</xsl:template>
...
output tree (en supposant que le document source soit � l'URL
http://example.net/xml/test.xml) :
...
<img src="http://example.net/xml/logo.png"/>
...
Tom.
Technical Details
Message-ID:
<93chl8$1mf$1@wanadoo.fr>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out.usenetserver.com!news.tele.dk!195.25.12.36!oleane.net!oleane!wanadoo.fr!not-for-mailReferences:
<wy4rza9u6w.fsf@polya.u-strasbg.fr>Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,5b4d05e888ae507a X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-01-08 06:18:06 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out.usenetserver.com!news.tele.dk!195.25.12.36!oleane.net!oleane!wanadoo.fr!not-for-mail From: Tom. <ptittom+news@free.fr> Newsgroups: fr.comp.text.xml Subject: Re: unparsed-entity-uri ? Date: Mon, 8 Jan 2001 15:08:41 +0100 Organization: - Lines: 36 Message-ID: <93chl8$1mf$1@wanadoo.fr> References: <wy4rza9u6w.fsf@polya.u-strasbg.fr> NNTP-Posting-Host: adijon-101-1-1-248.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit X-Trace: wanadoo.fr 978962920 1743 193.251.185.248 (8 Jan 2001 14:08:40 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 8 Jan 2001 14:08:40 GMT