Click here to Skip to main content
15,899,474 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Loading various objects simultaneously Pin
AmitDey6-Aug-08 21:38
AmitDey6-Aug-08 21:38 
QuestionLoop through XML Elements Pin
Illegal Operation6-Aug-08 16:38
Illegal Operation6-Aug-08 16:38 
AnswerRe: Loop through XML Elements Pin
Illegal Operation6-Aug-08 16:40
Illegal Operation6-Aug-08 16:40 
GeneralRe: Loop through XML Elements Pin
George L. Jackson7-Aug-08 9:06
George L. Jackson7-Aug-08 9:06 
QuestionOdd Occurrence Happening... Pin
myNameIsRon5-Aug-08 10:36
myNameIsRon5-Aug-08 10:36 
AnswerRe: Odd Occurrence Happening... Pin
led mike5-Aug-08 10:54
led mike5-Aug-08 10:54 
QuestionHow to combine two different xml schemas using ado.net Pin
abja3-Aug-08 23:03
abja3-Aug-08 23:03 
QuestionXSL and Params with Sort-By [modified] Pin
Lea Hayes3-Aug-08 14:42
Lea Hayes3-Aug-08 14:42 
Hi all!

I have created an XLS file but I am confused over a particular part of the language syntax.

If I want to sort by an element attribute I can do the following (and it works):
<xsl:sort-by select="@columnName" order="ascending" data-type="text" />
I want to add a paramater which allows me to input which column is to be sorted by. So I tried the following:
<xsl:param name="sortColumn" />

<!-- Other XSL stuff goes here... -->

<xsl:sort-by select="$sortColumn" order="ascending" data-type="text" />
But this did not work, so I tried the following which also did not work:
<xsl:param name="sortColumn" />

<!-- Other XSL stuff goes here... -->

<xsl:sort-by select="@$sortColumn" order="ascending" data-type="text" />
Could someone please advise me on how to do this?

To offer some clarity the input XML documents are structured as follows:

<root>
  <entry columnA="value1" columnB="value2" columnC="value3" />
  <entry columnA="value4" columnB="value5" columnC="value6" />
  <entry columnA="value7" columnB="value8" columnC="value9" />
</root>


Many thanks!
Lea Hayes

modified on Sunday, August 3, 2008 9:30 PM

AnswerRe: XSL and Params with Sort-By Pin
Lea Hayes4-Aug-08 6:38
Lea Hayes4-Aug-08 6:38 
Questionoutput space in html from xml and xsl Pin
Shiby1-Aug-08 8:47
Shiby1-Aug-08 8:47 
AnswerRe: output space in html from xml and xsl Pin
Perspx2-Aug-08 9:36
Perspx2-Aug-08 9:36 
AnswerRe: output space in html from xml and xsl Pin
Shiby5-Aug-08 9:54
Shiby5-Aug-08 9:54 
AnswerRe: output space in html from xml and xsl Pin
PIEBALDconsult13-Aug-08 18:26
mvePIEBALDconsult13-Aug-08 18:26 
QuestionXSL to select and sort problem Pin
Lea Hayes1-Aug-08 2:41
Lea Hayes1-Aug-08 2:41 
AnswerRe: XSL to select and sort problem Pin
Lea Hayes1-Aug-08 5:31
Lea Hayes1-Aug-08 5:31 
GeneralRe: XSL to select and sort problem Pin
led mike1-Aug-08 6:07
led mike1-Aug-08 6:07 
Questionxsd command on SVG schema ? Pin
AmitDey30-Jul-08 21:14
AmitDey30-Jul-08 21:14 
QuestionSecuring XML Pin
Illegal Operation30-Jul-08 13:07
Illegal Operation30-Jul-08 13:07 
AnswerRe: Securing XML Pin
Perspx30-Jul-08 23:58
Perspx30-Jul-08 23:58 
Question.vcproj XML transformations Pin
CodeTortoise29-Jul-08 22:12
CodeTortoise29-Jul-08 22:12 
AnswerRe: .vcproj XML transformations Pin
CodeTortoise30-Jul-08 1:15
CodeTortoise30-Jul-08 1:15 
QuestionRe: .vcproj XML transformations Pin
led mike30-Jul-08 5:27
led mike30-Jul-08 5:27 
AnswerRe: .vcproj XML transformations Pin
CodeTortoise30-Jul-08 20:58
CodeTortoise30-Jul-08 20:58 
GeneralRe: .vcproj XML transformations Pin
led mike31-Jul-08 5:08
led mike31-Jul-08 5:08 
Questioncallery Pin
hossein_abbasi28-Jul-08 13:34
hossein_abbasi28-Jul-08 13:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.