You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Paul Libbrecht <pa...@activemath.org> on 2004/12/22 17:37:32 UTC

Re: [jelly] j:include and j:import semantics ? (was: xslt transform fun (newbie))

There definitely seems to be a bug...

Can someone here remember what are the tags import and include exactly 
meant at and, their difference ? The javadoc (hence jellydoc) seems 
definitely wrong.

Having non-jelly-namespaced xml, inside a jelly element or not, should 
output directly to XMLOutput. It seems, however, that j:include and 
j:import both encounter exceptions though different.

paul

Le 22 déc. 04, à 16:24, Peter Lerche a écrit :

> Hi Paul,
>
> I tried this
> <x:transform xslt="xxxx">
>  	<j:include uri=""/>
>     </x:transform>
>
> but I get a
> "<x:transform> javax.xml.transform.TransformerException:
> java.lang.NullPointerException"
>
> Humm any ideas ?
>
>
> We have a ton of xslt stylesheets that we want to reuse with Jelly 
> without
> making too many changes.
>
> you write
>> If you are processing a file anyways, why not directly use ant's style
>> tag ?
>
> Could  you enlighten me on the Ant style tag. I have had a look at
> http://jakarta.apache.org/commons/jelly/libs/ant/tags.html but the is 
> no
> description of the xslt style tag.
>
> Now when we are at it - how do I access a Map key/value pair in Jelly.
>  <j:forEach var="set" items="${params}">
>              ${set}
>          </j:forEach>
>
> I get a "key=value" String in ${set} how do I access the ${set}.key
> ${set}.value individually ?
>
> I am running commons-jelly-1.0-beta-4.jar and 
> commons-jelly-tags-xml-1.0.jar
>
>
> Many thanks Paul,
>
> On Wednesday 22 December 2004 15:13, Paul Libbrecht wrote:
>> Le 22 déc. 04, à 14:45, Peter Lerche a écrit :
>>> 1. In the jelly docs
>>> (http://jakarta.apache.org/commons/jelly/pipeline.html)
>>> It describe following way to use the x:transform tag.
>>>
>>> <x:transform xslt="file:///test/default.xslt">
>>> 	<x:parse xml="file:///test/data.xml"/>
>>> </x:transform>
>>>
>>> But it does not work. I get a "x:parser missing var attrib".
>>> I found a workaround.
>>>
>>> <x:parse xml="file:///test/data.xml" var="doc"/>
>>> <x:transform xslt="file:///test/default.xslt" xml="${doc}"/>
>>>
>>> but it defeats the XML pipeline idea.  I would appreciate if someone
>>> could
>>> comment on the problem.
>>
>> Have you tried the following ?
>>
>> <x:transform xslt="xxxx">
>> 	<j:include uri=""/>
>>    </x:transform>
>>
>> In all cases, be careful that loading the document in ram is, sadly,
>> always done in XSLT processors. The XSLT language should have allowed
>> implementors to provide:
>> - minimal load in ram
>> - and delta processing
>> None are realized, as far as I know.
>> If you are processing a file anyways, why not directly use ant's style
>> tag ?
>>
>> I think x:transform is very useful if you do previous operations on 
>> the
>> xml document (or produce it as the result of something else).
>> There's not much of jelly to modify a loaded document but the whole
>> dom4j is there for you! (using jexl method calls)
>>
>> paul
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
> -- 
> Med venlig hilsen / Yours sincerely
>
> Peter
> http://easyspeedy.com
> _______________________________________
> European Dedicated Server Hosting
> Extremely low prices, secure, and reliable
> Linux and BSD distributions only
> _______________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org