|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: linkdiff template
A key in XSLT is always created for every XML-tree. So you don't need a
document() in the key's use-attribute. With your declaration the key of
the indexed links is always the value of the first a/@href in $previous.
<xsl:key name="links" match="a" use="@href"/> <xsl:param name="previous"/> <xsl:template match="a">
<xsl:variable name="href" select="@href"/>
<xsl:for-each select="$previous">
<xsl:if test="not(key('links', $href))">
<xsl:value-of select="$href"/>
</xsl:if>
</xsl:for-each>
</xsl:template>Regards, Joerg Guy McArthur wrote: Hi, I'm looking to write a template to output the a/@href's from one (newer) file that are *not* present in another (older) file. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






