|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: A sequence of more than one item is not allowed as
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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








