OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XPattern Specification

[ Lists Home | Date Index | Thread Index ]

Alan Gutierrez wrote:

>Thinking more in terms of pattern matching, less in terms of
>    document traversal.
>  
>

I have no problem with this kind of thinking (as far as I can see myself 
:). Any streaming processing is more declarative and there is not much 
space for a document traversal. But still, you have to maintain some 
amount of information to be able to decide if a pattern matches or not.

> 
>    
>        <xp:capture name="foo" select="/document/reverse"/>
>        <xp:insert-after match="/document/reverse">
>            <reversed><xp:value-of select="util::reverse($foo)"/></reversed>
>        </xp:insert-after>
>  
>

When you process endElement for reverse, you need to know whether its 
parent is document in order to decide if /document/reverse matches. This 
information necessary for matching is what I call "the context".

Then, you could navigate through the context data with a XPattern-like 
language (with limited axis etc.), but this is another story. So, I'm 
also talking about matching patterns against a stream of events; but I 
just need to know what info is available to test the pattern.

-- 
Petr Cimprich
Ginger Alliance
www.gingerall.com





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS