XSLT v2
Variables in a template can't be updated and so the use of recursion in
template calls with params with altered values is the current pattern of
choice.
If I don't use recursion, is there a way to change a sequence?
<variable name="list" select="fn:remove($list, xpath on list[(_at_)fp='X']">
ah heck code example
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:template select="/">
<xsl:variable name="nodelist" select="//files"/>
<processed_set>
<xsl:for-each select="/target/refer/set">
<xsl:apply-templates select="."/>
<xsl:variable name="tmpMatch" select="@path"/>
</xsl:for-each>
<the_magic_happens_here>
remove each node in nodelist where attribute fp has value
$tmpMatch
</the_magic_happens_here>
<for-each select="$nodelist"><xsl:apply-templates select="."/></for-
each>
<!-- so this is the set of "files elements" nodes where @fp did not
match -->
</processed_set>
</xsl:template>
<template et. al. />*
</xsl:stylesheet>
I want to process the 2 set of nodes, one at time with for-each.
On the first nodelist <for-each select="/target/refer/set">, I
apply-template for the current node, and remove any node in the 2 set that
would match on criteria [identity, attribute match, what-ever]. When the
processing is complete, I want to <for-each> on the nodes that haven't been
removed.
Other than a pattern of recursion, what methods can I use to remove nodes
from a nodelist?
== Kermit Tensmeyer
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--