Subject: Re: [xsl] A sequence of more than one item is not allowed as the [nth] argument of [function] From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx> Date: Sun, 6 Mar 2005 05:43:42 -0800 (PST) |
Hi David, I tried the following example with Saxon 8.1 .. <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text" /> <xsl:template match="/"> <xsl:value-of select="string((2,3))" /> : <xsl:value-of select="concat('a',('b','c'))" /> </xsl:template> </xsl:stylesheet> The output is - 2 : ab (this is exactly as Mike explained) In this example I believe I am asking a *pure XSLT 1.0* processor to work.. But I am using XSLT 2.0 sequence syntax in string and concat functions .. Since sequence syntax is unrecognized in XSLT 1.0 , should the above stylesheet not give an error? Or is some forward compatible behaviour going on.. I shall put my question more simply as .. If <xsl:stylesheet version="1.0" is specified , and if the stylesheet uses some XSLT 2.0/XPath 2.0 constructs , then should the new constructs work - if I am using a XSLT 2.0 processor? (as shown in example above).. Ofcourse , the above stylesheet will give error with XSLT 1.0 only processor (like Xalan-J 2.6.0) .. Regards, Mukul --- David Carlisle <davidc@xxxxxxxxx> wrote: > > > IMHO, in XSLT 1.0 mode using sequence as argument > to > > concat() or string() should give an *error*.. As > > argument of type sequence is not allowed on > concat() > > and string() in XPath 1.0 .. > > That isn't the way things are defined in xslt 1. > The sequence type in xpath2 is the equivalent of the > node set in XPath1 > and you can give node sets as arguments to these > functions in XPath1. > > David __________________________________ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] A sequence of more than o, Michael Kay | Thread | RE: [xsl] A sequence of more than o, Michael Kay |
Re: [xsl] A sequence of more than o, Dimitre Novatchev | Date | Re: [xsl] A sequence of more than o, Mukul Gandhi |
Month |