[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: External Unparsed Entities

Subject: Re: External Unparsed Entities
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Wed, 25 Apr 2001 18:12:06 +0100
external entitie
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.