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

XSL and entities

Subject: XSL and entities
From: Bryce Ferguson <Bryce.Ferguson@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 15 May 2000 13:07:49 -0700
xsl figure entity
I have a challenge and I'm not finding any examples that relate to this. The
problem is I have entities in my XML document that identify picture files.
These entities are referenced in the body of the document in an attribute of
the graphic element in a figure element. The goal is to transform the XML
into HTML which means I need to insert the filename into an <IMG> HTML
element. I've included both a short XML fragment and the relevant fragment
of the XSL below.
 
Any pointers are most appreciated.
 
<!-- XML Document Fragment            -->
<!-- note that this fragment is       -->
<!-- NOT valid per the referenced DTD -->
<?xml version="1.0"?>
<!DOCTYPE paper SYSTEM "extremepaper.xml.dtd" [
 <!ENTITY fig01 SYSTEM "picture1.tif" NDATA tiff>
 <!ENTITY fig02 SYSTEM "picture2.tif" NDATA tiff>
]>
<figure id="fig01">
 <caption>
  <para>Activities, Tasks and Dependencies</para>
 </caption>
 <graphic figname="fig01"/>
</figure>
 
<!-- XSL Fragment -->
<xsl:template match="//figure">
 <P><SPAN style="font-size=8pt;">
  <xsl:variable name="imgRef" select="$graphic/@figname" />
  <IMG>
   <xsl:attribute name="SRC">
    <xsl:value-of select="$imgRef"/>
   </xsl:attribute>
   <xsl:attribute name="ALT">
    <xsl:value-of select="$imgRef"/>
   </xsl:attribute>
  </IMG>
 </SPAN></P>
</xsl:template>
 
Thanks in advance for any pointers you can give me.
 

Bryce Ferguson
 
HERRICK DOUGLASS 
TECHNOLOGY DEVELOPMENT, INC.
 
email: bferguson@xxxxxxxx
web: http://www.hdtd.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.