[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Grouping using information from a dtd ?

Subject: Grouping using information from a dtd ?
From: Peter Biechele <Peter.Biechele@xxxxxxxxx>
Date: Tue, 9 Mar 2004 11:27:46 +0100
dtd grouping
I have the following problem:

I want to sort data from a XML file using information conatined in a DTD.

In the DTD there is a definition for an attribute like:
<!ELEMENT taskName                 (#PCDATA)>
<!ATTLIST taskName                 activity ( proposal |
			 	     requirementSpecification |
                                   abstractDesign | detailedDesign |
                                   testSpecification | implementation |
                                   moduleTest | integrationTest | systemTest |
				   validationTest |
                    documentation | releaseAndDeployment ) #REQUIRED>



Now I want to sort a xml file which looks like:

<taskElement>
	<taskName activity="moduleTest">Test1</taskName>
</taskElement>
<taskElement>
	<taskName activity="proposal">Test2</taskName>
</taskElement>
<taskElement>
	<taskName activity="moduleTest">Test3</taskName>
</taskElement>
<taskElement>
	<taskName activity="abstractDesign">Test4</taskName>
</taskElement>




The output should be sorted using the sequence given in the DTD !!!
So it should look like:
1) proposal: Test3
2) abstractDesign: Test4
3) moduleTest: Test1, Test2



It should not be the order they are opresent in the XML file (here: 
moduleTest: Test1, Test2, etc.)
NOR should it be a sorted order using <xsl:sort ...>




How can I accomplish this ??
Do I have to specify an additional XML file, containing the attribute values 
in th correct order or is ist possible to use somehow the information in the 
dtd ??

Thank you for any help or suggestions !
Peter Biechele

#####################################################
Dr. Peter Biechele, E-Mail: Peter.Biechele@xxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.