This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xsl:value-of /xsl:copy-of
- To: xsl-list at mulberrytech dot com
- Subject: Re: xsl:value-of /xsl:copy-of
- From: Dan Morrison <dman at es dot co dot nz>
- Date: Tue, 27 Jun 2000 20:21:42 +1200
- Organization: Disorganised
- References: <39584856.829D2A78@softsolutions.fr>
- Reply-To: xsl-list at mulberrytech dot com
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@es.co.nz : danm@web.co.nz :
: 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