Subject: Re: [xsl] XSLT for ditaval filtering From: "rick@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 1 Feb 2022 18:24:58 -0000 |
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>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSLT for ditaval filtering, rick@xxxxxxxxxxxxxx | Thread | Re: [xsl] XSLT for ditaval filterin, Eliot Kimber eliot.k |
[xsl] XSLT for ditaval filtering, rick@xxxxxxxxxxxxxx | Date | Re: [xsl] XSLT for ditaval filterin, Chris Papademetrious |
Month |