OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   order of xsl template match

[ Lists Home | Date Index | Thread Index ]
  • From: Matrix 01 <thematrix01@email.com>
  • To: xml-dev@lists.xml.org
  • Date: Sun, 19 Nov 2000 18:50:40 -0500 (EST)

How can I make the output in the same order as the xml document?

Here is the XML:
<FORM>
<CHECKBOX LABLE="CHECKBOX1" NAME="checkbox" VALUE="radiobutton"/>
<TEXTBOX LABLE="NAME" SIZE="24" NAME="Name_Field"/>
<FORM>

Here is the XSL:
<xsl:template match="/">
<html>
<body bgcolor="#FFFFFF">
<xsl:apply-templates select="FORM/TEXTBOX"/>
<xsl:apply-templates select="FORM/CHECKBOX"/>
</body>
</html>
</xsl:template>
<xsl:template match="FORM/TEXTBOX">
There is a TEXTBOX here
</xsl:template>
<xsl:template match="FORM/CHECKBOX">
There is a CHECKBOX here
</xsl:template>
</xsl:stylesheet>

The output for the example below would be:
"There is a TEXTBOX here"
"There is a CHECKBOX here"

But the xml document had the CHECKBOX first.

Please could you guide me on how to order the output in the order it is read
from the xml document.


-----------------------------------------------
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS