[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Problems with formatting

Subject: Re: Problems with formatting
From: Jörg Heinicke <joerg.heinicke@xxxxxx>
Date: Fri, 16 Nov 2001 22:09:24 +0100
reformating date in csv file
1. <xsl:output method="text"/>

2. Avoid something like:

<xsl:template match="test">
test
</xsl:template>

because you have two linebreaks in this created textnode. Use
<xsl:text>test</xsl:text>.

3. The same in your xml:

If you have

<node>
    test
</node>

use something like <xsl:value-of select="normalize-space(text())"/>.

4. Avoid using built-in templates by <xsl:apply-templates/> (empty
text-nodes will be selected). Specify it more with <xsl:apply-templates
select="*|normalize-space(text())"/> (elements or non-emtpy text-nodes).

Hope this helps,

Joerg


> Hi,
>
> Thanks to those people who replied over my little date-reformatting
problem,
> that's sorted now.
>
> The problem I now face is this: I'm using xalan/xerxes to output a csv
file,
> problem is that because each field's processing is on a new line in the
xsl
> file, the resulting csv carries that formatting and so I've got a csv file
> where the items are strung out down the page. Which will never do.
>
> "Something",
>
>     "like",
>
>     "this",
>
>     "as",
>
>     "I",
>
>     "am",
>
>     "sure",
>
>     "you",
>
>     "understand"
>
>
> I've tried playing with <xsl:strip-space elements="*"/> but I'm sure that
> only affects the source xml document!! And I wasn't able to find anything
> relevant on the web... the problem definitely originates in my xsl file,
but
> short of physically putting the entire template on one line, I can't see a
> solution!!
>
> Any help with this problem will be greatly appreciated!
>
> Thanks,
> Curtis.


 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.