[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: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Sat, 21 Apr 2001 21:41:00 +0100
Re:  HTML in XML not getting to my html output.
Hi Robert,

> From what I can tell it's not at the point of the value of. If I
> change that to copy-of it still doesn't print the <b> elements so
> it's something do to with how I'm qualifying the parameter with the
> select="note" I've tried all things to get it to pass the children
> but it didn't work. The only thing that worked for me was using
> disable-output-escape with a CDATA in my HTML around the block
> making it a text node. However, I'd like to know how I can qualify
> the child nodes in the select too so that if I use copy-of I can get
> those nodes across because I don't like have to use a CDATA with
> disabled output escaping.

You can get the child nodes of a node by stepping down to them with
the step:

  child::node()

(or just node(), since the child axis is assumed by default).

So if you want to pass the child nodes of the note element in as the
value of the parameter, then you could use:

  <xsl:with-param name="nodes" select="note/node()" />

Just to clarify, it's not exactly clear what output you want, but I
think your template should look like:

<xsl:template name="separated-list">
   <xsl:param name="nodes"/>
   <xsl:param name="separator"/>
   <xsl:for-each select="$nodes">
       <xsl:copy-of select="."/>
       <xsl:if test="position() != last()">
          <xsl:copy-of select="$separator"/>
       </xsl:if>
   </xsl:for-each>
</xsl:template>

I hope that helps,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 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.