This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: general purpose filter stylesheet


Assuming  <article> as your scope.... 
I believe the correct paths would be....

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

-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of Robert
Sösemann
Sent: March 14, 2002 2:39 PM
To: xsl-list@lists.mulberrytech.com
Subject: [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'

My input XML look like this:
######################

<SigmodRecord>
    <issue>
        <volume>12</volume>
        <number>1</number>
        <articles>
            <article>
                <authors>
                    <author>Date</author>
                    <author>Knuth</author>
                <authors>
                <title>Database Systems</title>
            </article>
            <article>
                <authors>
                    <author>Horak</author>
                    <author>Elmasri</author>
                <authors>
                <title>Database Systems</title>
            </article>
            *more articles*
        </articles>
    </issue>
    <issue>
   ...
    </issue>
    *more issues*
</SigmodRecord>

The result doc should have the same structure as the source but filter
out
nodes that don't make sense:

########################################################################
####

<SigmodRecord>
    <issue>
        <volume>12</volume>
        <number>1</number>
        <articles>
            <article>
                <authors>
                    <author>Date</author>
                    <author>Knuth</author>
                <authors>
                <title>Database Systems</title>
            </article>
        </articles>
    </issue>
</SigmodRecord>

It would be great I somebody could help me out. This is part of a
university
project.
Thanks Robert.

........................................................................
....
..........
 ROBERT SÖSEMANN  (robert.soesemann@web.de)

 schwärzlocherstr. 29/1 | 72070 tübingen
 tel : 07071 / 400 880

 icq# : 100 467 870
 pgp-keys : www.webspace-journey.de/pgp.asc
........................................................................
....
..........


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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]