As I'm in a caf� I can't test this now but if I have
......

<root>
  <maincontent>hehehehehehe</maincontent>
  <sidemenu>home</sidemenu>
  <footer>goodbye</footer>
</root>

and in my first.xsl file

<xsl:template match="/root/maincontent">
  make it all pretty
</xsl:template>

The untouched XML will be passed through in the chain
but won't the <root> element be missing as I have
handled it?

Or am I talking out of my sunglasses? (it is 41 in the
shde here at present ;-) )

-Ants


 --- Tod Harter <[EMAIL PROTECTED]> wrote: > 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]
>  

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/

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

Reply via email to