[xsl] Displaying Text Nodes

Subject: [xsl] Displaying Text Nodes
From: siarom egrub <egrubs@xxxxxxxxx>
Date: Wed, 4 Mar 2009 11:49:20 -0800 (PST)
Hi All,

I had an issue where document creators would use a lot of line break "<br />"
tags to break up very long product name in our documents. The product name
should display in the document header on all pages except the first. It was
overflowing into the top border (table style doc). I created the XSL template
below to only output text that appears before the first line break "br />"
tag.

The problem that I am having now is that sometimes there are <superscript>
tags in the product names and the text after the <superscript> tag is not
displaying.

Example:
<para>Access<superscript>&#174;</superscript> Ultrasensitive ESTRADIOL QC<br
/>QC1, QC2</para>

Current Output: Access

Required Output: Access. Ultrasensitive ESTRADIOL QC

Can anyone see what I am missing here or doing wrong?

Please let me know if additional information is needed.


<!--XML -->
<ProdName><title>Product Name</title>
<para>Access<superscript>&#174;</superscript> Ultrasensitive ESTRADIOL QC<br
/>QC1, QC2</para>
</ProdName>

<!--XSL-->
<xsl:template match="ProdName/para" mode="ProdName_BR">
     <xsl:value-of select="text()[not(preceding-sibling::br)] "/>
</xsl:template>


Thanks,
Siarom Egrub

Current Thread