[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: Beginners question: Koala XSL-Engine and


Subject: Re: Beginners question: Koala XSL-Engine and <xsl:process select>
From: Jeremy CALLES <Jeremy.Calles@xxxxxxxxxxxxxxx>
Date: Thu, 22 Oct 1998 18:18:50 +0200

Martin Bernauer wrote:
> 
> Hello,
> 
> I have a XML document containing the following lines:
> 
> <collection>
>         <a>aaa</a>
>         <b>bbb</b>
>         <c>ccc</c>
> </collection>
> 
> and a XSL document that contains:
> 
> <xsl:template match="collection">
>         <P>
>         <xsl:process select="c"/>
>         <xsl:process select="b"/>
>         <xsl:process select="a"/>
>         </P>
> </xsl:template>
> 
> When I run the Koala XSL-engine with those two files i get the output 
>"aaabbbccc" but actually the output should be "cccbbbaaa" shouldn't it? What's 
>wrong?
> 

Yes, you do it wrong. I explain:

<collection> is the root of your document, so It couldn't be matched by
an XSL processor (according to the WD 1.0) by is name.
If you wants <collection> to be the root tag, your XSL should be:

 <xsl:template match="/">
	...
 </xsl:template>

If not, your XML should be:

<TheNameOfTheRoot>
 <collection>
         <a>aaa</a>
         <b>bbb</b>
         <c>ccc</c>
 </collection>
	...
</TheNameOfTheRoot>

Best,
Jeremy
--
Jeremy CALLES  --- Jeremy.Calles@xxxxxxxxxxxxxxx
home page      --- http://www.mygale.org/07/jcalles


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



Current Thread
Keywords