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

RE: text output with some significant white space

Subject: RE: text output with some significant white space
From: "Ralof" <ralof@xxxxxxxxxxxx>
Date: Thu, 19 Apr 2001 17:30:23 +0200
RE:  text output with some significant white space
I guess my method for whitespace is not a very good one,
but it is quite simple:

**********<xsl:template match="foo">
*************begin@<xsl:value-of select="name"/><img src="cleardot.gif"
width="4" height="1"/>{<br/>
*************<img src="cleardot.gif" width="12" height="1"/><xsl:value-of
select="body"/><br/>
*************<img src="cleardot.gif" width="12" height="1"/>}
**********</xsl:template>

Please don't laugh :)

Stefan


>
>
> I have xml file and need to transform it to a *text* file that
> will have *no* xml tags it it at all. I *do* need to control
> indention and carriage returns in text file and at same
> time I want the XSLt to be readable with regards to consistent
> indention of say -three spaces. how can I accomplish following
>
> Here is part ofstylesheet XSLT:
> **********<xsl:template match="foo">
> *************begin@<xsl:value-of select="name"/>@{!
> *************@@@<xsl:value-of select="body"/>!
> *************@@@}
> **********</xsl:template>
>
> *=space in style sheet
> @=significant space to place in output
> !=significant carriage return to place in output
>
> Here is XML file
> <foo>
>    <name>bar</name>
>    <body>y=a+b*c;</body>
> </foo>
>
> Here is desired outptu:
> begin foo {
>    y=a+b*c;
>    }
>
> I trid <xsl:text>, <xsl:output method="text">, entities but
> can't find right combination that gives full control of text
> file output for indentation and carriage return. Help?
>


 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.