[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

Subject: A whitespace question, but probably not the same as the other ones
From: "Nice, Kerry A. (LNG-SHEP)" <Kerry.Nice@xxxxxxxxxxxxxx>
Date: Wed, 6 Jun 2001 16:17:23 -0600
as t.h
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&apos; (BOR) 
with the continued performance of his duties.&rdquo; Chancellor Wadlow
accepted
Rice&apos;s recommendation to discharge Sengupta for cause. In her January
19, 1995 decision, she adopted nearly all of Rice&apos;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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.