xsl-list
[Top] [All Lists]

Re: [xsl] Compare logical expressions with XPath/XSLT

2019-03-07 12:35:27
On Thu, 2019-03-07 at 15:54 +0000, Michael Müller-Hillebrand
mmh(_at_)docufy(_dot_)de wrote:

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.

One approach might be to translate the constraints to a constraint
language -- alloy, prolog, etc -- and let that do the work.

This looks a lot like configuration management (wasn't the service
modeling language, SML, in this area?).

But you could also categorize the products into compatibility sets:
whenever there's a P that requires A AND NOT B, A and B must be in
separate sets for P, and any product Q that requires B and that is
itself required means you have a conflict. Since this is transitive,
i'd possibly write a recursive function to compute it for one product,
and then call that on each product in turn. But i’m saying that without
having thought abuot it very deeply.

There's a lot of redundancy; use the saxon memo pragma.

The word subset is perhaps confusing; better to say the constraints are
not mutually satisfiable.

Liam


-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Web slave for vintage clipart http://www.fromoldbooks.org/
--~----------------------------------------------------------------
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
--~--

<Prev in Thread] Current Thread [Next in Thread>