Re: [xsl] Re: Search and Replace to add HTML tags

Subject: Re: [xsl] Re: Search and Replace to add HTML tags
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 06 Jul 2009 10:38:38 -0400
At 2009-07-06 10:26 -0400, Sharon_Harris@xxxxxxxxxxxxxxxxxxxx wrote:
I am trying to achieve the same result using XSLT-FO. Unfortunately I am
not getting the desired results. What is happening is that the entire
output for the node is displayed in bold instead of the specific words

You don't say which XSL-FO processor you are using, but a visual inspection of your code indicates it should only be adding the TextBold attributes to the matched string and not to the block.


and
then the string is repeated but without the bold, and the urls are not
active hyperlinks.

This is often a problem "up-stream" where you are inadvertently doing two <xsl:apply-templates/> without realizing it ... perhaps because of engaging a built-in template rule. I've also seen messed up table contents when the table structures themselves are not properly nested.


For both situations it will help to visually inspect the resulting XSL-FO markup. Perhaps due to property-to-trait inheritance some ancestral setting of values is being picked up.

If the XSL-FO instance is too dense, then use an indenting stylesheet (example below) to create a version that is easier to read.

I hope this helps ... looking at your code quickly nothing seems obvious to me. Perhaps if you created a working stylesheet with just these template rules and run it on the data the results may be obvious. If not then you can post the mini working environment so that volunteers don't have to recreate it each time.

. . . . . . . . . . . . . Ken

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                version="1.0">

<xsl:output indent="yes"/>

<xsl:template match="/"><xsl:copy-of select="."/></xsl:template>

</xsl:stylesheet>


-- Possible July/August XSLT/XQuery/XSL-FO training in Oakland/CA/USA Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal

Current Thread