[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-xml
Subject:    Re: Methodology request: XSLT
From:       Matt Trout <mstrout () gmail ! com>
Date:       2004-09-29 17:57:41
Message-ID: 18e2339b0409291057403a098a () mail ! gmail ! com
[Download RAW message or body]

On Wed, 29 Sep 2004 06:59:57 +0200, Geert Josten
<geert.josten@daidalos.nl> wrote:
> >>I've never messed with DOM before
> >>and, so, much of the pod for that one is over my head.
> >>It'd be nice if the module I use allowed for some way
> >>of "chroot"ing so the template can pretend that the
> >><entry> tag is the root (i.e. <xsl:template match="/">
> >>matches what is actually /root/entry[$foo] )
> >
> > Er, of course you can do that in a template to some extent but nothing
> > will do that globally as it is not part of the XSLT spec.
> 
> It is not a good idea to adjust code directly, unless you intend to comply to the extension interfaces.
> 
> A nice alternative is to define your own translation 'language' or 'dialect' and use an XSLT sheet
> to generate an executable XSLT sheet from it.
> 
> By the way, you can also leave the template match="/" out and only define a template for the entry
> tag. The default template will recurse through the file until an entry element is reached..

Also doesn't XSLT make the match the context node for xpath queries
within the match? such that you could do relative XPath matches, or am
I off the mark?
_______________________________________________
Perl-XML mailing list
Perl-XML@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic