|
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:
unparsed-entity-uri('LOGO')
will give you the URL
.../team.jpg
It gives you the absolute URL for the entity.
So you could do:
<xsl:template match="IMAGE">
<img src="{unparsed-entity-uri(@SOURCE)}" />
</xsl:template>
to get the XSLT to generate an HTML img element for the relevant
image.
I hope that helps,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] External Unparsed Entities, Williams, Brad | Thread | Re: [xsl] External Unparsed Entitie, David Carlisle |
| [xsl] Query on MSXML js scripting, Walter Torres | Date | Re: [xsl] External Unparsed Entitie, David Carlisle |
| Month |