[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] A whitespace question, but probably not the same as th
I don't know if I posted this twice. They changed my email address here since I signed up for the list, so I think the original post might have bounced. If not, sorry for double posting. Ok, I've looked through the faq and can't figure this one out. I have some nodes that I handle directly, so putting normalize-space into a value-of fixes the problem like: <xsl:if test="@typestyle='un'"> {\ul <xsl:value-of select="normalize-space(.)"/>} </xsl:if> Except I have a bunch of screwy XML (I didn't design it, I just take what my process gets), that I had to handle with this template match="*" node that a helpful person on this list suggested previously. Basically, there are <nl/> tags scattered randomly throughout the document. I hope this is enough information. The end product is a RTF document. The basic problem is for nodes like <p>, I can't figure out where to put a normalize-space, so I end up with output like: ... accepted Rice's ... which ends up as: ... acceptedRice's ... when you look at the resulting document in Word. excerpt of XSL: <xsl:template match="p"> \par<xsl:apply-templates/> </xsl:template> <xsl:template match="nl"> \par </xsl:template> <!-- this section picks up matches for nodes nl and footnote --> <xsl:template match="*"> <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> </xsl:template> excerpt of XML: <p id="i13">The pre-termination hearing, authorized by Board of Regents' (BOR) with the continued performance of his duties.” Chancellor Wadlow accepted Rice's recommendation to discharge Sengupta for cause. In her January 19, 1995 decision, she adopted nearly all of Rice's findings of fact and conclusions of law.</p> The resulting output: \par The pre-termination hearing, authorized by Board of Regents' (BOR) with the continued performance of his duties. Chancellor Wadlow accepted Rice's recommendation to discharge Sengupta for cause. In her January 19, 1995 decision, she adopted nearly all of Rice's findings of fact and conclusions of law. the end result in Word: The pre-termination hearing, authorized by Board of Regents' (BOR) with the continued performance of his duties. Chancellor Wadlow acceptedRice's recommendation to discharge Sengupta for cause. In her January19, 1995 decision, she adopted nearly all of Rice's findings of factand conclusions of law. Thanks, Kerry. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|