Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 5th, 2006, 04:47 AM
Registered User
 
Join Date: Jun 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default dynamic sort - data-type (using xsl2.0 with saxon)

Hi,

I am trying to build a dynamic sort.
In order to have a proper sort I need to modify two attributes of the sort element.
1. the select attribute.
2. the data-type attribute.

the first one is easy:
<xsl:sort select="*[local-name()=$my-variable-to-sort]">

but when I am trying to put some variable in the data-type attribute I get transformation error:
"XTDE0030: data-type on xsl:sort must be 'text' or 'number'"

My data type are different. I must change the data-type in order to have a proper sorting dynamically.

HELP..... :)

Roni.



 
Old December 5th, 2006, 05:14 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Well as you don't show the code where you specify the data type it's hard to say. Are you using attribute value template syntax and enclosing the variable in curly braces {}?

--

Joe (Microsoft MVP - XML)
 
Old December 5th, 2006, 05:39 AM
Registered User
 
Join Date: Jun 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thenk you very much!!!!!!

The curly braces solved my problem.
I have never saw curly braces used before.

Roni.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic sort order or sort datatype kapy_kal XSLT 2 September 18th, 2007 02:10 PM
index-of() function in XSL2 NEO1976 XSLT 4 September 4th, 2006 02:41 AM
Sort column in dynamic table Dreamweaver MX frodedahl Dreamweaver (all versions) 1 September 23rd, 2005 02:59 AM
XSLT Dynamic xsl:sort Method kwilliams XSLT 2 July 20th, 2005 03:19 PM
Data Type error but it is the correct type Mitch SQL Server 2000 2 March 19th, 2004 11:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.