Re: [xsl] HTML in XML not getting to my html output.

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


(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"/>

I hope that helps,


Jeni Tennison

 XSL-List info and archive:

Current Thread