[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: exlt set.distinct.template.xsl ?

Subject: Re: exlt set.distinct.template.xsl ?
From: "cutlass" <cutlass@xxxxxxxxxxx>
Date: Thu, 14 Mar 2002 14:37:06 -0000
cutlass template
Hello Hans,

> Can anyone please explain , the difference between   <xsl:value-of
> select="."/> and <xsl:copy-of select="." /> ?

without seeing your whole code in context and result i cant comment in any
great detail as the template is tested and works properly.

the difference between value of returns the value contained within the xml
tags, copy or copy-of returns the xml result.

i assume that u actually recieved the correct result, but did not *see*
it...as it was wrapped in xml, and u probably outputted html

the following example xml and xsl clearly illustrates the difference between
value-of and copy-of


xsl
----------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:template match="root">

 this is copy of
 <xsl:apply-templates select="test" mode="test1"/>

 <br/>

 this is value of
 <xsl:apply-templates select="test" mode="test2"/>
 </xsl:template>

 <xsl:template match="test" mode="test1">
 <xsl:copy-of select="."/>
 </xsl:template>

 <xsl:template match="test" mode="test2">
 <xsl:value-of select="."/>
 </xsl:template>

</xsl:stylesheet>

xml
------------------------------------------
<?xml version="1.0" ?>
<root>

<test>1</test>

<test>2</test>


</root>



HTH, jim fuller
>
> Thanks,
>
>
> Hans Braumüller
> -- + --
> Networking Artist
> http://crosses.net
> http://kunstserie.com
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.