This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: general purpose filter stylesheet
- From: Robert Sösemann <robert dot soesemann at web dot de>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 18 Mar 2002 10:46:39 +0100
- Subject: Re: [xsl] general purpose filter stylesheet
- References: <000c01c1cde9$859df440$65fe0250@pcukmka>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Thanks Michael,
you wrote:
[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.]
That right that thios would not be to hard, BUT what would XSLT return.
I could only specify one node type in my match attribute: a parent of number
which is issue.
But then I would get the whole issue subtree with ALL articles, EVEN those
whose author is NOT 'Date' and the title is NOT 'Database Systems'. But I
want my query ONLY to return this part of my XML that make sense to the
query.
Note: Additional to the query I get information to which supertree an
propery as 'author' belongs. (e.g. article) AND I know that there a no two
elemet with the same name in my document.
That all I know. And I am trying to solve that problem for the last 3 weeks.
Is it not possible with XSLT? Do I need XQuery. I even could not find help
in your book.
S O S !!!
----- Original Message -----
From: "Michael Kay" <michael.h.kay@ntlworld.com>
To: <xsl-list@lists.mulberrytech.com>
Sent: Sunday, March 17, 2002 8:25 PM
Subject: RE: [xsl] general purpose filter stylesheet
> > 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@ntlworld.com
> work: Michael.Kay@softwareag.com
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list