[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: transforming one specific subtree only

Subject: Re: transforming one specific subtree only
From: Jakob <jakob@xxxxxxx>
Date: Tue, 07 Nov 2000 23:01:44 +0100 (MET)
Re: transforming one specific subtree only
Thanks everybody,

that was quick and efficient help even though I should have stated
more clearly that it's DocBook (even though it should actually be TEI Lite),
not the very simple tree I used.

just in case anybody is interested, the template(s) I'll be using
are only slightly modified versions of Mike Brown's:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name='nodeId'>docHomePage</xsl:param>

<xsl:template match="/">
  <xsl:apply-templates select="//*[@id=$nodeId]"/>
  <xsl:if test="not(//*[@id=$nodeId])">
    <xsl:call-template name='notFound'/>
  </xsl:if>
</xsl:template>

<xsl:template name='notFound'>
  <p>not found:
    <xsl:value-of select='$nodeId'/>
  </p>
</xsl:template>

<xsl:template match="chapter|sect1|sect2">
  <h1>got here!</h1>
    ... and so forth ...
</xsl:template>
</xsl:stylesheet>

Probably extremely inefficient due to the //*; and, no, the
processor I am using, Sablotron doesn't support id(), ahem.

not wasting any more bandwith,
Jakob Fix.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.