XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Boolean XML

At 2012-03-30 10:48 -0400, Toby Considine wrote:
>I have a project wherein I may need to parameterize some Boolean 
>service criteria as they apply to service interactions
>
>Apply this service request to all types that match A, where A may be
>
>
>(A)
>(A)OR(B)
>(A)AND(B)AND(C)
>(A)NOT(B)
>
>Etc.
>
>Is there is some standard dialect or pattern for expressing Boolean 
>selections in XML? I would prefer to do this in some standard way 
>rather than inventing my new, exciting, better, but, sadly, 
>different, means of doing so.

Logical expressions are often written in XPath, a flat non-XML syntax 
with keywords "or" and "and" and the function "not()":

   http://www.w3.org/TR/2007/REC-xpath20-20070123/#id-logical-expressions
   http://www.w3.org/TR/2007/REC-xpath-functions-20070123/#boolean-functions

>Any pointers or discussion of folks favorite way to accomplish this?

One candidate XML syntax would be XQueryX:

   <xqx:andOp>
     <xqx:firstOperand>...</xqx:firstOperand>
     <xqx:secondOperand>...</xqx:secondOperand>
   </xqx:andOp>
   <xqx:orOp>
     <xqx:firstOperand>...</xqx:firstOperand>
     <xqx:secondOperand>...</xqx:secondOperand>
   </xqx:orOp>
   <xqx:functionCallExpr>
     <xqx:functionName>not</xqx:functionName>
     <xqx:arguments>
     ...
     </xqx:arguments>
   </xqx:functionCallExpr>

   http://www.w3.org/TR/2007/REC-xqueryx-20070123/

I hope this helps.

. . . . . . . Ken

--
Public XSLT, XSL-FO, UBL and code list classes in Europe -- May 2012
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/x/
G. Ken Holman                   mailto:gkholman@CraneSoftwrights.com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS