Subject: Re: xsl:value-of /xsl:copy-of
From: Dan Morrison <dman@xxxxxxxx>
Date: Tue, 27 Jun 2000 20:21:42 +1200
|
SoftLiban DAGHFAL Carole wrote:
>
> Hi
> I just want to know the difference between xsl:value-of and xsl:copy-of
There's plenty of technical terms that'll explain exactly what's
happening, but _in_practice_:
value-of returns the exposed text of the selected item, all the data
which is left if the <TAGS> are removed
copy-of places the selection, tags and all, into the results. If you
want to nest HTML inside an XML node, you probably want to use copy-of
to get at it later.
OTOH you almost always want to use value-of when reading attributes, as
copy-of would result in the attribute being added as an attribute of the
current node.
Have a play, it'll all become clear.
.dan.
:=====================:====================:
: Dan Morrison : The Web Limited :
: http://here.is/dan : http://web.co.nz :
: dman@xxxxxxxx : danm@xxxxxxxxx :
: 04 384 1472 : 04 495 8250 :
: 025 207 1140 : :
:.....................:....................:
: If ignorance is bliss, why aren't more people happy?
:.........................................:
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|