Click here to Skip to main content
16,006,475 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: How to use Amazon Web Services.. Pin
Colin Angus Mackay15-May-04 4:47
Colin Angus Mackay15-May-04 4:47 
Generalproblem in generating html through xml Pin
junckjunck7-May-04 19:56
junckjunck7-May-04 19:56 
Generalsame scope, elements with the same name, but NOT the same type Pin
Michał Januszczyk7-May-04 6:50
sussMichał Januszczyk7-May-04 6:50 
QuestionHow to print an Organisation Chart (Tree Structure) Pin
BSRK6-May-04 23:51
BSRK6-May-04 23:51 
AnswerRe: How to print an Organisation Chart (Tree Structure) Pin
mauricexy7-May-04 3:43
mauricexy7-May-04 3:43 
GeneralRe: How to print an Organisation Chart (Tree Structure) Pin
Sameer Kulkarni26-Feb-09 23:27
Sameer Kulkarni26-Feb-09 23:27 
QuestionXSL newbie ? Pin
compbssn20035-May-04 7:48
compbssn20035-May-04 7:48 
GeneralSimple question Pin
bertcox5-May-04 3:17
bertcox5-May-04 3:17 
Hello,


I'm new to xslt and xml. I have a xml-document that looks like this :

<?xml version="1.0" standalone="yes"?>
<sessions version="1.0">
<session name="Development">
<libraries>
<library name="contxtlib">
<fullname>123</fullname>
<super>true</super>
<loadorder>8</loadorder>
</library>
<library name="xmllib">
<fullname>xmllib.p</fullname>
<super>true</super>
<loadorder>12</loadorder>
</library>
<library name="clientdebuglib">
<fullname>clientdebuglib.p</fullname>
<super>true</super>
<loadorder>3</loadorder>
</library>
</libraries>
</session>
</sessions>

Now i want to sort this xml-file. The loadorder should be 3 then 8 and then 12 and not in this order. So it has to be sorted. I tried writing a xslt file but he doesn't sort my data.
My xslt file looks like this:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="session">
<xsl:copy>
<xsl:apply-templates>
<xsl:sort data-type="number" select="session/libraries/library/loadorder"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>

<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

Everything could be wrong for me, i found this on the internet and made some changes but now i don't know whether it's good. All i want to to is sort the library's on loadorder.

thx a lot in advance
GeneralRe: Simple question Pin
Philip Fitzsimons7-May-04 3:06
Philip Fitzsimons7-May-04 3:06 
GeneralEMBEDDING SQL IN A VC++ DATABASE APPLICATION Pin
Wisdom20043-May-04 21:09
Wisdom20043-May-04 21:09 
GeneralACCESS A DATABASE USING MFC DIALOGUE BOXES Pin
Wisdom20043-May-04 21:03
Wisdom20043-May-04 21:03 
QuestionHow to use msxml4.dll in project? Pin
Anonymous3-May-04 7:12
Anonymous3-May-04 7:12 
AnswerRe: How to use msxml4.dll in project? Pin
Andrew Quinn AUS25-May-04 5:46
Andrew Quinn AUS25-May-04 5:46 
GeneralXSL Table view Pin
mauricexy3-May-04 4:21
mauricexy3-May-04 4:21 
GeneralRe: XSL Table view Pin
mauricexy4-May-04 3:52
mauricexy4-May-04 3:52 
Generalproblem with xslt! Pin
hassan azizi30-Apr-04 3:37
hassan azizi30-Apr-04 3:37 
Generalproblem with xslt! Pin
hassan azizi30-Apr-04 3:26
hassan azizi30-Apr-04 3:26 
GeneralNewbie XML/XSL question Pin
Anonymous29-Apr-04 16:15
Anonymous29-Apr-04 16:15 
GeneralRe: Newbie XML/XSL question Pin
Member 64272914-May-04 2:46
Member 64272914-May-04 2:46 
GeneralStoring XSLT files in SQL Server Pin
Member 116304929-Apr-04 12:29
Member 116304929-Apr-04 12:29 
GeneralParsing XML with VBScript Pin
lnong29-Apr-04 12:04
lnong29-Apr-04 12:04 
Generalsend xml Pin
hmdhmd27-Apr-04 0:58
hmdhmd27-Apr-04 0:58 
GeneralRe: send xml Pin
Ryan Roberts27-Apr-04 3:03
Ryan Roberts27-Apr-04 3:03 
GeneralRe: send xml Pin
Anonymous28-Apr-04 23:55
Anonymous28-Apr-04 23:55 
GeneralIXMLDOM Pin
Stojan7823-Apr-04 1:21
Stojan7823-Apr-04 1:21 

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.