Subject: Re: [xsl] general purpose filter stylesheet From: Robert Sösemann <robert.soesemann@xxxxxx> Date: Thu, 14 Mar 2002 23:17:29 +0100 |
Yes you are right if this would be an XPATH expression but it is the form how >I get the query from the user, WITHOUT knowing that <author> is encapsulated in <authors>. So that won't help me out. ----- Original Message ----- From: "Jonathan C. Dietrich" <jcdietrich@xxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, March 14, 2002 9:06 PM Subject: RE: [xsl] 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@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Robert Sösemann Sent: March 14, 2002 2:39 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx 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@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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] general purpose filter st, Jonathan C. Dietrich | Thread | Re: [xsl] general purpose filter st, Peter Davis |
Re: [xsl] adding 2 formatted number, Joerg Heinicke | Date | RE: [xsl] Variable in template atrr, Dion Houston |
Month |