This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]