commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wannheden, Knut" <knut.wannhe...@paranor.ch>
Subject RE: [jelly] Eval complex xml pipline?
Date Tue, 25 Feb 2003 08:20:23 GMT
Sean,

This will currently not work as Jelly does not evaluate what's in the
XMLOutput.  But it would be possible to write a tag (e.g. <j:eval/>) which
could do something like this.  As a workaround you could save the XMLOutput
as a temporary Jelly script and then run that using <j:import/>.

Hope this helps,

--
knut

> -----Original Message-----
> From: Sean Brandt [mailto:sean@fuzzymagic.com]
> Sent: Montag, 24. Februar 2003 21:33
> To: commons-user@jakarta.apache.org
> Subject: [jelly] Eval complex xml pipline?
> 
> 
> Given the following:
>      A source xml document ( currently in jdom ) whose 
> content is sent 
> to jelly via a custom tag that fires sax events down xmlout's 
> pipeline. 
> That output is then transformed via the jelly:xml transform tag. The 
> result of that transformation is yet another jelly script ( it has 
> beandef defined tags in it ).
> 
> How do I get that transformed document eval'd by the jelly script 
> runner?
> 
> Example:
> 
> <j:jelly xmlns:j="jelly:core" xmlns:define="jelly:define" 
> xmlns:jdom="jdom"
>      xmlns:x="jelly:xml" xmlns="jelly:bean">
> 
> 	<!-- define beans , this file just contains a number of bean 
> definitions
> 		<beandef name="foo" className="nowhere.Bar"/>
> 	-->
> 	<j:import inherit="true" trim="true" uri="beandefs.jelly"/>
> 
> 	<define:taglib uri="jdom">
> 		<define:jellybean name="parse" 
> className="JDomParseTag"/>
> 	</define:taglib>
> 
> 	<x:transform xslt="${stylesheet}">
> 		<jdom:parse doc="${document}"/>
> 	</x:transform>
> 
> </j:jelly>
> 
> The transformed xml would be similar to:
> <root>
> 	<foo attr1="aaa"/>
> </root>
> 
> And what I want to happen is that every time the foo tag is 
> seen, a Bar 
> object is instantiated and it's attr1 is set to "aaa"
> 
> Ideas? Tag I missed somewhere?
> 
> I looked at jsl, but I'm not entirely sure it will support 
> some of the 
> complex xsl support I'll need during the transform process.
> 
> 
> - Sean Brandt
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message