Subject: Re: [xsl] exlt set.distinct.template.xsl ? From: "cutlass" <cutlass@xxxxxxxxxxx> Date: Thu, 14 Mar 2002 14:37:06 -0000 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] exlt set.distinct.template.xs, "Braumüller, Hans" | Thread | [xsl] xsl:param and MSXML, Aedemar Cooke |
[xsl] exlt set.distinct.template.xs, "Braumüller, Hans" | Date | [xsl] xsl:param and MSXML, Aedemar Cooke |
Month |