Here is my first attempt, which is doing the filtering. With this algorithm,
I would need multiple rules for testing other possible ditaval attributes.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:math="http://www.w3.org/2005/xpath-functions/math"
exclude-result-prefixes="xs math"
version="3.0" expand-text="yes">
<xsl:output indent="yes"/>
<xsl:param name="ditaval-file"
select="'file:///C:/DATA-10/content/Hide-Prod2.ditaval'"/>
<xsl:variable name="ditaval" as="document-node()*">
<xsl:if test="doc-available($ditaval-file)=true()">
<xsl:sequence select="doc($ditaval-file)"/>
</xsl:if>
</xsl:variable>
<xsl:template match="/map">
<map>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates/>
</map>
</xsl:template>
<xsl:template match="*[@product!=''][$ditaval//prop[@att='product' and
@val=current()/@product and @action='exclude']]"/>
<xsl:mode on-no-match="shallow-copy"/>
</xsl:stylesheet>
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--