[xsl] using entities

Subject: [xsl] using entities
From: "Furst, Tom" <tom.furst@xxxxxxxx>
Date: Wed, 17 Aug 2011 07:50:07 -0400
I am trying to figure out how I can make use of enitity declarations when
using XSL/XSL-FO to generate PDFs. In the XML I am using each file has a
declaration similar to this:

<!ENTITY ICN-LJ200-A-J344405-A-24210-00002-A-001-01 SYSTEM
"ICN-LJ200-A-J344405-A-24210-00002-A-001-01.cgm" NDATA cgm>

In my XML where there is a graphic I have the following markup:
<figure id="F0001">
<title>Radio Altimeter Antenna</title>
<graphic id="gra001"
infoEntityIdent="ICN-LJ200-A-J344405-A-24210-00002-A-001-01"></graphic>
</figure>

The attribute infoEntityIdent matches the entity name at the beginning of the
file. To get the graphic in the PDF this in the XSL:

<xsl:for-each select="./graphic">
            <xsl:variable name="graphFile" select="./@infoEntityIdent"/>
            <xsl:variable name="gFileDir"
select="concat($graphFile,'.cgm')"/>
.
      <fo:external-graphic src="url('{$gFileDir}')" display-align="center"
content-height="21cm"/>
</xsl:for-each>

I want to find out if it's possible to use the entity declaration to get the
filename, as it may not always be a .cgm (or any other format for that matter)
graphic.

Thanks for the help,

Tom

Current Thread