Hi Jason

----- Original Message -----
From: "Jason van Zyl" <[EMAIL PROTECTED]>
> Hello,
>
> I'm new to dom4j list (made my first little XML->Java Object mapping this
> weekend :-)) so I was wondering if someone could point me in the right
> direction as to where the XML transformation code lies and how it's used.

Most of the XML transformation code relies on XSLT and JAXP.


> I would like allow the use of Velocity to transform XML documents in a
> general way. Right now the closest thing is something called Anakia but it
> operates on specifically named elements which isn't very useful outside
it's
> very limited scope of creating the documentation for Jakarta.

Using XPath expressions to access parts of a document might help?


> In velocity it is possible to define #macros :
>
> #macro (td $value)
>   <td bgcolor="#ffffff">
> #end
>
> And these macros are available with Java using the Velocity application
> helper. So what I would like to be able to do is for each element that is
> come across execute the corresponding #macro if it exists.

So this

<td>hello</td>

would be converted to

<td bgcolor="#fffff">hello</td>

if the macro definition was applied? How would $value be used - could it be
used for an element name or content or attribute name or content?


Mmm I'll have to think further about that. Are we allowed to use XSLT to
help solve this? :-)

James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to