cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David <>
Subject Re: multiple xpaths
Date Tue, 04 Oct 2005 17:44:43 GMT
Thank you for your response. I will surely look into STC more but am 
really hoping for complete xpath support.

The paper you referenced me too... any idea if its actually been done? 
Sounds like it is just ideas and hasn't been implemented.


Daniel Fagerstrom wrote:
> David wrote:
>> Upayavira wrote:
>>> David wrote:
>>>> Sylvain Wallez wrote:
>>>>> David wrote:
>>>>>> I am writing a cocoon transformer and need to know when any of 
>>>>>> multiple xpaths match. I'm sure there must be a be a more 
>>>>>> efficient way then converting it to a DOM document and then 
>>>>>> running each xpath to get the nodelist of each.
>>>>>> What is the best way to do this?
> Take a look at this 
> stream based matching against several XPaths. IIRC there are more 
> research and maybe even implementations of similar ideas, but I don't 
> remember any references.
>>>>> The problem with XPath is that it's intrinsically tied to the DOM 
>>>>> hierarchical model. So you need to have a DOM ready to query the 
>>>>> document with XPath.
>>>>> You may want to have a look at STX [1], which uses a subset of 
>>>>> XPath that is suited to streamed processing.
>>>>> Sylvain
>>>>> [1]
>>>> I was looking at STX too but couldn't find a way to use it from 
>>>> Java. Anyone know how you use it without making an stx file?
>>>> I understand the issue with xpaths and needing DOM. I know xalan has 
>>>> its Document Table Model (DTM) that improves on performance. Anyone 
>>>> know if we can tap into that without writting a XSL file?
>>> For an example of using STX in java, see the STX block, that allows 
>>> you to use STX as a normal Cocoon transformer.
>>> Regards, Upayavira
>> I looked in there already :-)
>> There are no Java examples. Only xmap and stx files. Maybe in some 
>> branch of cocoon?
> Take a look at the implementation that we 
> use, there are some Java examples there, IIRC. Joost implements the Trax 
> API, so there where never any need for writting any Java code for the 
> STX transformer, I just used the TraxTransformer with another 
> configuration.
> /Daniel

View raw message