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

RE: general purpose filter stylesheet

Subject: RE: general purpose filter stylesheet
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Sun, 17 Mar 2002 19:25:39 -0000
st. michael filter
> How can I do this query resolving with XSLT?
> (I need this for an java xml wrapper, that can submit queries
> to given docs
> without knowing a lot of their structure)
>
> My query is an boolean expression:
> ###########################
>
> ((author='Date' or title='Database Systems') and number='1')
> PROBLEM: 'number' is not part of the same parent as 'author'
>
You seem to have invented your own query language. If you want this to work
when "number" and "author" are not siblings, then you're assuming some
semantics that are different from the XPath semantics. If you want to invent
your own query language, then you will have to define its syntax and
semantics, and write a translator that converts it into an XPath expression.
You can then pass the resulting XPath expression to a suitable dynamic XPath
execution engine - for example the xx:evaluate() function in Saxon or Xalan.

I don't know what the intended semantics of your expression are. Perhaps
it's equivalent to the XPath expression

  ((//author='Date' or //title='Database Systems') and //number='1')

in which case doing the translation into XPath might not be too difficult.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.