xsl-list
[Top] [All Lists]

[xsl] Print parent text

2007-08-23 09:01:03
XSL Experts,

I have section of xsl code that used to work, but now seems to be giving
me problems.  The only thing that has changed is the xmls where updated,
however the format appears to be the same.

What I'm trying to do is bold the text of a child tag, and then print
out the rest of the text from the parent tag.  The tags look like so:

<crossreferecne>
        <para>
                <emphasis>This is to be bolded,</emphasis>
                and this is not!
        </para>
</crossreferecne>

They way I have the xsl setup is like so:

<xsl:template match = "crossreferecne">
        <fo:block>
                <xsl:text>Cross Referecne</xsl:text>
                <xsl:for-each select = "para">
                <fo:block>
                        <xsl:choose>
                                <xsl:when test = "./emphasis">
                                        <fo:inline font-weight = "bold">
                                                <xsl:value-of select = 
"./emphasis"/>
                                        </fo:inline>
                                        <fo:inline>
                                                <xsl:value-of select = 
"./text()"/>
                                        </fo:inline>
                                </xsl:when>
                                <xsl:otherwise>
                                        <fo:inline>
                                                <xsl:value-of select = 
"./text()"/>
                                        </fo:inline>
                                </xsl:otherwise>
                        </xsl:choose>
                </fo:block>
        </xsl:for-each>
</xsl:template>

Currently when this code is run all I'm able to produce is the bold
text.  The none bold text is not shown at all.

Any ideas on how to extract the para text would be greatly appreciated.
As always, thanks in advance for any assistance.  

-Luke

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>