*
fo...@citizen14.de wrote in microsoft.public.xsl:
>I am new to xml/xsl and I try to understand xsl:apply-templates. I have
>some example files (see bottom). I thought that I would at least get an
>output "bla" or "some text", but the result is a blank page. I thought
>that xsl:apply-templates returns the inner xml specified in the select
>option, but it looks like I am wrong and I need your help.
No, xsl:apply-templates lets the processor apply applicable templates.
>warehouse.xml
>
><?xml version="1.0" encoding="utf-8" ?>
><?xml-stylesheet type="text/xsl" href="warehouse.xsl"?>
><warehouse>
> <container>
>[...]
> <xsl:template match="/">
> <xsl:apply-templates select="container" />"
> </xsl:template>
>
> <xsl:template match="container">
> bla
> </xsl:template>
In the first template, '/' and 'container' make '/container', but the
document element in your document is 'warehouse'. You would have to use
xsl:apply-templates on 'warehouse/container' to make the second template
apply, or make the first template match on 'warehouse'.
--
Björn Höhrmann · mailto:
bjo...@hoehrmann.de ·
http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon:
+49(0)160/4415681 ·
http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 ·
http://www.websitedev.de/