Robert Koberg wrote:
Geir Magnusson Jr wrote:

The velocity aspect - templating - is the same. What it's meant to do is simply use the declarative model of XSL (which *is* complicated) and let you use Velocity to do the rendering.

Hi,

I just had a look at this again after using Velocity for a year or two. I can see some way to use this inside a Velocity template/page very nicely. I believe I know XSL 1.0 pretty well. I can see how some things in Velocity proper can replace some things in XSL so they do not need to be repeated there. I have some quick questions questions off the top of my head:

- how are namespaces handled? how do you declare them? Is XPath fully supported (uses Jaxen perhaps?)?

It was a while ago... we were just using what was in dom4j, and that was jaxen, IIRC


- are there modes and named templates?

That question I don't understand.


- can you do something like:

#if ($foo)
  #match("foo")$context.applyTemplates()#end
#else
  #match("*")$context.applyTemplates()#end
#end

That would be cool, and (again, it's been a while, so YMMV) I think it should. Of course, we'd want some kind of scope, I suspect, so that it's not global but only applied to some local context of processing, I would guess.


- can you use the XML nodes in a conditional. For example say I have a source like:

<foo bar="something"/>

Can an if be like an XSL if testing the existence of the bar attribute like:

#if (@bar)
  do something...
#end

No. There is no modification to the core Velocity for this - the idea was to use stock and standard velocity with a framework for VM invocation as you wander about the document. That's all.

If you are interested in it..... thanks for volunteering!  Patches welcome!

geir


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to