Re: Q: pattern selection for outside the context node

Subject: Re: Q: pattern selection for outside the context node
From: Chris Maden <crism@xxxxxxxxxxx>
Date: Fri, 9 Jul 1999 09:46:47 -0400 (EDT)
(This is on-topic for xsl-list, but not xml-dev.)

[Aaron Fischer]
> Is there a pattern syntax for starting at the root

/

> or going above the context node, up into the XML tree?

..
ancestor()

E.g.:
  <xsl:apply-templates select="../title"/>
  <xsl:apply-templates select="/docinfo/author"/>
  <xsl:value-of select="ancestor(chapter)/title"/>

-Chris
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>


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


Current Thread