[xsl] general purpose filter stylesheet

Subject: [xsl] general purpose filter stylesheet
From: Robert Sösemann <robert.soesemann@xxxxxx>
Date: Thu, 14 Mar 2002 20:38:44 +0100
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@xxxxxx)

 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


Current Thread