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

Compare logical expressions with XPath/XSLT

Subject: Compare logical expressions with XPath/XSLT
From: "Michael Müller-Hillebrand mmh@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Mar 2019 15:53:42 -0000
 Compare logical expressions with XPath/XSLT

I have a problem at hand that (I think) I understood on the whiteboard, but
have no initial idea how to best tackle this using our beloved tools
(currently limited to XSLT/XPath 2).

We have larger objects (documents) and many child objects (chapters), and both
can have a property, let's call it "Project Name". The task is to find
conflicts between the document's and the chapter's project setting. Behind
each project name there is a configurable boolean expression using AND, OR and
NOT, which defines whether two projects may match or not.

The definition of project names looks like this (with required="false"
describing the NOT logic):

  <def name="project-1">
          <item required="false">A</item>
          <item required="false">B</item>
        <item required="false">C</item>
  <def name="project-2">
        <item required="true">A</item>
        <item required="true">C</item>
  <def name="project-3">
      <item required="false">C</item>

If the document uses "project-1", a chapter with "project-2" would be in
conflict with project-1, because { A OR C } is not a subset of { (!A OR !B)
AND !C }.

A chapter with "project-3" would be okay, because { !C } is a subset of { (!A
OR !B) AND !C }.

I simply hope for some pointers to similar problems.

Thanks a lot for your time,

- Michael MC<ller-Hillebrand

Current Thread


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.
First Name
Last Name
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.