OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: RE: DOCBOOK-APPS: How to insert an entity via XSL

use the unparsed-entity-uri() function from XSL.  To use this function, the
entity must be declared with the NDATA notation:

<!ENTITY company_logo SYSTEM "graphics\logo.gif" NDATA GIF>

Then, in your source, "company_logo" must be the value of an attribute
declared as type "ENTITY".  The DocBook graphic, inlinegraphic, imagedata,
etc. tags have an "entityref" attribute, so:

<graphic entityref="company_logo">

could be the source.

A basic XSL template for graphic (to HTML) would be:

<xsl:template match="graphic">
  <xsl:attribute name="src">
   <xsl:value-of select="unparsed-entity-uri(@entityref)"/>

This is actually really nice, because the parser will make the relative path
in the entity file into an absolute path.


-----Original Message-----
From: Rasmussen Claus-CCLR001 [mailto:claus.rasmussen@motorola.com]
Sent: Wednesday, August 21, 2002 10:19 AM
To: 'docbook-apps@lists.oasis-open.org'
Subject: DOCBOOK-APPS: How to insert an entity via XSL

Hi folks,

I'm using ArborText Epic with our custom DTD to create XML files. Instead of
inserting file system references to graphics it takes all paths and create
entities for each of those. These entities are then used to identify the

So, I'm writing some XSL, but I can only get the entity _names_ from the
elements. How do I insert the value of the entity in the output stream.
Theoretically, I'm looking for something like:

<xsl:entity name="entityname"/>

I know this is sort of off-topic on a DocBook list, but this is where I've
found the most XSL skill.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC