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

RE: mixture of XML and HTML in result

Subject: RE: mixture of XML and HTML in result
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Thu, 8 Jan 2004 15:24:13 -0000
RE:  mixture of XML and HTML in result
> I need to build a page containing both html and xml.  In 
> order for the proper xml to be built, I must use the xsl 
> output of xml.  However, I also need non-breaking spaces 
> within the html sections.  What I can't determine is how to 
> litterally emit &#160; in the result. 
> <xsl:text>&#160;</xsl:text> works fine only when the output 
> method is html. Thoughts? Larry

Just use &#160; in your stylesheet - although you can't see the 6
characters '& # 1 6 0 ;' in your output, the character that the
character reference references :) is still there.  HTML doesn't
normalize this kind of white space, so its ok.

For example, try:

<xsl:template match="/">
  Tree here<br/>
  &#160;grandparent<br/>
  &#160;&#160;parent<br/>
  &#160;&#160;&#160;child<br/>
</xsl:template> 

You will see that the text is indented as you intended.

cheers
andrew

 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.