Re: [docbook-apps] Renaming processing instructions

From
Bob Stayton <>
Date
2012-10-30T16:11:12+00:00
ID
B712B496AEF64B84921C398ECD54DBAE@totoro
Thread
Re: [docbook-apps] Renaming processing instructions
A PI in the source file:

<?dbfo bgimage="myfile.jpg"?>

Extracting the value:

<xsl:variable name="bgroundimage">
 <xsl:call-template name="dbfo-attribute">
   <xsl:with-param name="pis"
       select="ancestor-or-self::d:abstract/processing-instruction('dbfo')"/>
   <xsl:with-param name="attribute" select="bgimage"/>
 </xsl:call-template>
</xsl:variable>

<xsl:variable name="backgroundimg">
 <xsl:value-of select="concat('url(', $bgroundimage, ')')"/>
</xsl:variable>

and further down, using the value for an output attribute:

<xsl:attribute name="background-image">
 <xsl:value-of select="$backgroundimg"/>
</xsl:attribute>


Bob Stayton
Sagehill Enterprises




From: Xmplar
Sent: Tuesday, October 30, 2012 3:11 AM
To: 
Subject: [docbook-apps] Renaming processing instructions