[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT for ditaval filtering

Subject: Re: XSLT for ditaval filtering
From: "Eliot Kimber eliot.kimber@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 1 Feb 2022 20:35:43 -0000
Re:  XSLT for ditaval filtering
I would create an XSLT function that does the ditaval evaluation so that you
can then use that bindly from match expressions, i.e.:

<xsl:function name=local:isIncluded as=xs:Boolean>
  <xsl:param name=context as=element()/>
  <xsl:param name=ditaval as=document-node()/>

<xsl:variable name=result as=xs:boolean>
  <!hard work goes here -->
</xsl:variable>
<xsl:sequence select=$result/>
</xsl:function>

And then in your template you can do:

    <xsl:template match="*[not(local:isIncluded(., $ditaval))]"/>

Or maybe the better name is isExcluded() so your check can be
local:isExcluded() but you get the idea.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.