Re: <xsl:copy-of> question

Subject: Re: <xsl:copy-of> question
From: crism@xxxxxxxxxxxxx (Christopher R. Maden)
Date: Thu, 16 Dec 1999 00:24:20 -0800
[Nikolai Grigoriev]
><!-- Processing of salary nodes is disabled for FullSecurity="0" -->
><xsl:template match="salary[/employee/@FullSecurity=0]"/>

Not quite - that will hide all salaries in any document in which there is
any employee with FullSecurity="0".  You need to scope it:

<xsl:template match="employee[@FullSecurity=0]/salary"/>

or, alternately:

<xsl:template match="salary[../employee/@FullSecurity=0]"/>

though I prefer the former for clarity.

-Chris

--
Christopher R. Maden, Solutions Architect
Exemplary Technologies
One Embarcadero Center, Ste. 2405
San Francisco, CA 94111



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


Current Thread