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

Re: Boolean XML

  • From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
  • To: "xml-Dev Listserv" <xml-dev@lists.xml.org>
  • Date: Fri, 30 Mar 2012 11:05:39 -0400

Re:  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


  • References:
    • Boolean XML
      • From: "Toby Considine" <Toby.Considine@gmail.com>

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


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.