On Tuesday 05 August 2003 07:14 am, Michael Chamberlain wrote:
> > <?xml-stylesheet href="preload.xsl"            .....?>
> > <?xml-stylesheet href="NULL" type="aplication/...." ?>
> > <?xml-stylesheet href="sidemenu.xsl"           .....?>
> > <?xml-stylesheet href="footer.xsl"             .....?>
> > <?xml-stylesheet href="maincontent.xsl"        .....?>
> >
> > Obviously, the first three PIs work but the following
> > rely on the root element which gets lost after
> > sidemenu.xsl transformation. Hence, I can't access the
> > data dynamically.
>
> Add the following to your xsl
>
> <xsl:template match="*">
>       <xsl:copy>
>               <xsl:copy-of select="@*"/>
>               <xsl:apply-templates/>
>       </xsl:copy>
> </xsl:template>
>
In this case the less verbose

<xsl:template match="*">
        <xsl:copy-of select="."/>
</xsl:template>

works just as well since it will still match everything.

Basically the above (or Mike's version) just defeats the built-in 'copy the 
value of everything' template. Basically there is an unwriitten

<xsl:template match="*">
        <xsl:value-of select="."/>
</xsl:template>

in every stylesheet. 

If you wanted to SUPRESS output of anything you don't explicitly want to 
handle completely (which I find is a more frequent requirement) then use the 
one-liner (probably the only XSLT one liner there is...)

<xsl:template match="*"/>

That one is pretty much in the boilerplate for all my XSLT and honestly I 
think it aught to be the default ;o).

> It should pass through all node it doesn't interact with unchanged.
>
> Mike.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Tod Harter
Giant Electronic Brain
http://www.giantelectronicbrain.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to