Re: [xsl] Re: Assignment no, dynamic scoping si (was: Re: RE: Wishes for XSL revisions ...

Subject: Re: [xsl] Re: Assignment no, dynamic scoping si (was: Re: RE: Wishes for XSL revisions ...
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 02 Jan 2002 15:41:18 -0500
Gunther,

Is there a reason I missed why

<xsl:template match='paragraph'>
  <p class='ancestor-or-self::*[@source][last()]/@source'>
    <xsl:apply-templates/>
  </p>
</xsl:template>

wouldn't work for your example?

(And just checking ... XPath experts ... ancestor-or-self::*[@source][last()] will give me the *closest* 'source' attribute on an ancestor or self ... not the most distant, won't it?)

Cheers,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================


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



Current Thread