cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven D. Majewski" <sd...@virginia.edu>
Subject Re: How to obtain a xml from a xml file and a Xpath expression
Date Mon, 14 Apr 2008 16:41:03 GMT

On Apr 14, 2008, at 11:52 AM, Carlos Tejo Alonso wrote:
> Hi Jeroen,
>
>> Hi Carlos,
>>
>> I'm not really sure what you mean with XML from an XML. Where
>> do you try to obtain this XML.
>
> I wanted to explain thi situation:
> I have a file called example.xml and I want to apply a XPATH  
> expression in order to obtain another file called example-2.xml  
> with the elements selected by the XPATH expression.
>
>> For one you could just generate your file, apply an xslt with
>> an xpath expression or otherwise use the Xquery generator[1].
>
> Thanks for the suggestions. I wonder if there is one transformer  
> where you indicate the file and the XPATH expression and gives you  
> the new xml file.
>
> Did I explain myself better? Sorry for my awful English :S
>

Did you literally mean that you want to produce another XML file in  
the filesystem ?
( which, I guess, is why Reinhard suggests using the sourcewriting  
transformer )
Or did you just want to extract that xml fragment and transform 
+serialize it in the pipeline?

-- Steve Majewski


>
> On Apr 14, 2008, at 12:26 PM, Reinhard Haller wrote:
>>
>> Hi Carlos,
>>
>> Carlos Tejo Alonso schrieb:
>>> Thanks for the suggestions. I wonder if there is one transformer  
>>> where you indicate the file and the XPATH expression and gives  
>>> you the new xml file.
>>>
>> try it with a xpath generator (you can specify your file directly  
>> or via pattern matching), followed by a source-writing-transform.
>>
>> http://cocoon.apache.org/2.1/userdocs/xpathdirectory-generator.html
>>
>> http://cocoon.apache.org/2.1/userdocs/sourcewriting-transformer.html
>>
>>
>> Regards,
>> Reinhard
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message