[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

Subject: Re: 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)
concat sequence xslt
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

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.