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

RE: HTML in XML not getting to my html output.

Subject: RE: HTML in XML not getting to my html output.
From: Meltem Kogelbauer <meltem.kogelbauer@xxxxxxxxxxxxxxxxxx>
Date: Tue, 24 Apr 2001 16:59:26 +0100
bolding html
Here is another(I believe, more practical) solution.
<xsl:template match="/">
	<html>
		<body>

				<xsl:apply-templates select="//notes" />
		</body>
	</html>
</xsl:template>
				
<xsl:template match="notes">
	<xsl:copy-of select="node()" /><hr />
</xsl:template>


Cheers

Meltem



-----Original Message-----
From: Thomas B. Passin [mailto:tpassin@xxxxxxxxxxxx]
Sent: 23 April 2001 3:24 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  HTML in XML not getting to my html output.


All the xsl instructions you used display text content, that's why you don't
see the <b> tags.  Also the xsl:copy-of for the $separator is overkill,
since the separator is just text.  On the other hand, xsl:copy-of is just
what you want to pick up the <b> tags.  Here's a nice compact template that
does what you want:

<xsl:template match='/notes'>
   <xsl:for-each select='note'>
      <xsl:copy-of select='.'/>
      <xsl:if test='position()!=last()'><hr/></xsl:if>
   </xsl:for-each>
</xsl:template>


Cheers,

Tom P

==================================================
Robert Nicholson asked -

> Why when I have
>
> <note>
> <b>Please note that I am a British and Australian citizen who is a green
> card holder as of 12th May, 1999.</b>Also, email is my preferred method of
> correspondence.
> </note>
>
> does the bolding HTML tag not get in my translated html?
>
> This html it outputed thus
>
> <xsl:template match="notes">
> <p>
> <xsl:call-template name="separated-list">
> <xsl:with-param name="nodes" select="note"/>
> <xsl:with-param name="separator">
> <br/><br/>
> </xsl:with-param>
> </xsl:call-template>
> </p>
> </xsl:template>
>
> <xsl:template name="separated-list">
> <xsl:param name="nodes"/>
> <xsl:param name="separator"/>
> <xsl:for-each select="$nodes">
> <xsl:value-of select="normalize-space(.)"/>
> <xsl:if test="position() != last()">
> <xsl:copy-of select="$separator"/>
> </xsl:if>
> </xsl:for-each>
> </xsl:template>
>



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 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.