xsl-list
[Top] [All Lists]

Re: copy-of / value-of

2002-09-02 12:33:38

Jan Theofel wrote:

Jarno(_dot_)Elovirta(_at_)nokia(_dot_)com schrieb:


You probably want

  <xsl:copy-of select="special/node()" />



Jan Theofel wrote:

The problem with the copy-of is, that the <xsl:copy-of
select="some/node/special"> will result in


Jan,

As you know <xsl:copy-of select="special" /> returns:

  <special>
    Some text here as line 1<br/>
    Some text here as line 2
  </special>


But <xsl:copy-of select="special/node()" /> (not the appended "/node()")
returns just the node contents -- not the enclosing tags:

  Some text here as line 1<br/>
  Some text here as line 2


Subtle, but important...

-- 
Steve Rosenberry
Sr. Partner

Electronic Solutions Company -- For the Home of Integration
http://ElectronicSolutionsCo.com

http://BetterGoBids.com -- The Premier Overture (formerly GoTo) 
                           Bid Management Tool

(610) 670-1710

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



<Prev in Thread] Current Thread [Next in Thread>