Re: [xsl] External Unparsed Entities

Subject: Re: [xsl] External Unparsed Entities
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Wed, 25 Apr 2001 18:12:06 +0100
Hi Brad,

> This may seem elementary, but can someone please tell me why the
> following code(this is only an excerpt from the relevant XML file)
> will not import my JPEG? Is there an XSLT alternative to importing
> the file?

What are you expecting it to do?  In your DTD you say that the entity
LOGO is a JPEG external unparsed entity to be found at 'team.jpg'.  In
the XML you reference that entity, but an XML parser won't do anything
with that in particular, it's just a reference to that image.

If you want to, for example, create some HTML with an img element that
references that same image, then you need the
unparsed-entity-uri() function, which takes a (string) entity name and
gives you the URL for it, so in your case:


will give you the URL


It gives you the absolute URL for the entity.

So you could do:

<xsl:template match="IMAGE">
   <img src="{unparsed-entity-uri(@SOURCE)}" />

to get the XSLT to generate an HTML img element for the relevant

I hope that helps,


Jeni Tennison

 XSL-List info and archive:

Current Thread