[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sub-tree filtering proposals



Does it bother anyone else that the 1 filter expression is actually doing 2 things? 

First, it identifies the root of a tree of XML elements in the document and second it tells which subelements of those elements are to be returned. Aren't these 2 distinct functions that should better be represented by 2 separate expressions?

-steve

At 12:41 AM 6/4/2004, Juergen Schoenwaelder wrote:
>On Fri, Jun 04, 2004 at 09:32:56AM +0200, Michael Walton wrote:
> 
>> For now - I experimented a little with XPath expressions in PyXML and
>> found one possible answer to Juergen's question:
>
>[...]
> 
>> An expression that returns name, type and full-name looks like this:
>> 
>> //users/user[name="fred"]/*[name()="name" or name()="type" or
>> name()="full-name]
>> 
>> ... which is somewhat ugly, or you could use the "pipeline" operator as
>> suggested by Juergen:
>> 
>> //users/user[name="fred"]/name | //users/user[name="fred"]/type |
>> //users/user[name="fred"]/full-name
>> 
>> ... but that seems inefficient.
>
>Thanks. I knew this must be possible to do somehow.
>
>/js
>
>-- 
>Juergen Schoenwaelder               International University Bremen
><http://www.eecs.iu-bremen.de/>     P.O. Box 750 561, 28725 Bremen, Germany
>
>--
>to unsubscribe send a message to netconf-request@ops.ietf.org with
>the word 'unsubscribe' in a single line as the message text body.
>archive: <http://ops.ietf.org/lists/netconf/> 




--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>