XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Matt AdamsSubject: How to insert line breaks/blanks into a resulting XML doc?
Author: Matt Adams
Date: 02 Oct 2004 01:12 PM
When I apply a XSLT stylesheet to a XML document a number of
text lines, tags and values are written to a file/console.

I know that line breaks (control returns under WinXP)
are not relevant/essential for XML document.
But for source viewing of the XML document I would like
to insert occasionally a ControlReturn.

How can I achieve that after a certain output a (physical) line break
is inserted too? E.g that after the true or false result in

<xsl:value-of select="exists(....)" />

a new line starts?

Moreover how could I prepend the boolean result by exactly
5 blanks?

false

Thx
Matt

Posttop
Tony LavinioSubject: How to insert line breaks/blanks into a resulting XML doc?
Author: Tony Lavinio
Date: 04 Oct 2004 01:51 AM
Use <xsl:text></xsl:text> to contain literal white space;
you can even do something clever like <xsl:text>
</xsl:text> to send just a newline, or <xsl:text> </xsl:text>
to send five blanks.

And if you use <xsl:if test=...>, you can send your literal
output based on an arbitrary condition.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.