Re: SXLST vs. XLST: Some practical questions
Kirill Lisovsky <[email protected]> Fri, 12 Dec 2003 19:58:48 -0500 (EST)
| Newsgroups | gmane.lisp.scheme.ssax-sxml |
|---|---|
| Message-ID | <Pine.LNX.4.44.0312121937360.13644-100000@ant> |
Hello!
On Fri, 12 Dec 2003, Immanuel Normann wrote:
> I am particularly interested in the effect of "my-ss" in
> (pre-post-order doc my-ss)
> As far as I understand "my-ss" is a list of cons (<tag> . <function>).
> Thus the <function> is applied to a node of the sxml-tree whenever the
> tag-name matches <tag>. But what if I want some more context sensitive
> matching inside "my-ss".
> Take for instance the following XLST snipet:
>
> <xsl:template match="elem1/[elem2/@key='value']">
> <xsl:copy-of select="//elem3[@id=current()/elem4]/*"/>
> </xsl:template>
>
> Essentially the question is how this pre-post-order function works
> together with SXPAth?! Where can I learn more about it (not just SXPATH
> on its own)?
>
It looks like a task for the function "stx:apply-template" which is a
specialized pre-order version of "pre-post-order" extended with XSLT-like
pattern matching based on SXPath.
It's included in "sxml" collection for PLT, I'd like to reccommend
the latest version:
http://pair.com/lisovsky/download/sxml/plt/preview/sxml20031207.plt
An example may be found at:
http://pair.com/lisovsky/download/stx/examples/
Best regards,
Kirill.
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click