|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: External Unparsed Entities
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








