commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Libbrecht <>
Subject Re: [jelly-xml] (solved) xml:copy outputs attributes as text also
Date Sun, 11 Jan 2004 19:52:14 GMT

Is there any reason you don't use something like the following ??

<x:forEach select="$doc/img/@href" var="hrefAtt">

I've been pretty much more successful using a mix of jexl-method-calls 
and xpath than plain-xpath with the XML-taglib. The only issue is the 
type of the result of an XPath expression which can be very diverse...

(oh, and you might be bitten by the HTML output btw... the solution is 
dom4j-1.4 or to fix 1.4-b8).


On 10-Jan-04, at 10:33 Uhr, Gilles Dodinet wrote:

> Paul,
> thanks for your reply. indeed im using it from within maven to 
> transform some xdoc-processed document (using also jelly:html - need 
> to change the href attribute of img elements). Ive logged in a 
> non-systematic some of the outputted elements, i will do it more 
> systematically because in fact the template i posted yesterday ("* | 
> text()") doesnot work : all text children of a given node are 
> outputted *after* all other children.. however it is perhaps my xsl 
> knowledge that is a bit light ;) so ill continue to investigate and 
> come back with the solution if i ever find it ;)
> regards,
> -- gd
> Paul Libbrecht wrote:
>> Gilles,
>> There's a fair amount of possible variables that can bite you here.
>> Are you using jelly within maven ? If yes, this might be infamous 
>> output bugs of dom4j 1.4b8 which is used in maven (as the release 
>> broke with entities).
>> I would do something like logging the elements of your process (using 
>> the log taglib)... the dom4j' default-nodes toStrings are pretty 
>> impressing!
>> (and also expensive I think).
>> Paul
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message