xsl-list
[Top] [All Lists]

[xsl] Displaying Text Nodes

2009-03-04 14:49:49

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





--~------------------------------------------------------------------
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>