Subject: Re: [xsl] applying templates to attribute value From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Mon, 30 Jun 2008 16:24:41 -0400 |
Here is the problem in a nutshell, how can I applying a template to string content in an attributes value.
My specific digital asset management application has HTML formatting in an attribute value that I have to transform into fo formating. I have the formatting templates, but I cannot seem to match them to the attribute value.
XML: ==================================
<TEAMS_ASSET_FILE>
<METADATA>
<UOIS>
<GT_ASSET_REQUEST_MD COVERLETTER_TEXT="This is a <b>test</b> of the line break formatting<br />. Did it work?" />
</UOIS>
</METADATA>
</TEAMS_ASSET_FILE>
XSL: ==================================
<xsl:template match="TEAMS_ASSET_FILE">
<xsl:apply-templates select="./METADATA/UOIS/GT_ASSET_REQUEST_MD/@COVERLETTER_TEXT" />
</xsl:template>
<!-- formatting in the block --> <xsl:template match="//GT_ASSET_REQUEST_MD/@COVERLETTER_TEXT">
<xsl:apply-templates />
</xsl:template> <xsl:template match="br"> <fo:block> </fo:block> </xsl:template> <xsl:template match="b"> <fo:inline font-weight="bold"> <xsl:apply-templates select="*|text()"/>
-- Upcoming XSLT/XSL-FO hands-on courses: Wellington, NZ 2009-01 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] applying templates to attribu, mark bordelon | Thread | Re: [xsl] applying templates to att, mark bordelon |
[xsl] applying templates to attribu, mark bordelon | Date | Re: [xsl] applying templates to att, mark bordelon |
Month |