Sylvain Wallez wrote:
Leszek Gawron wrote:
[EMAIL PROTECTED] wrote:
Author: sylvain
Date: Wed Aug 10 08:38:10 2005
New Revision: 231266
URL: http://svn.apache.org/viewcvs?rev=231266&view=rev
Log:
Propagate namespace mappings in JXTemplate to JXPath expressions.
Refactor and extend NamespacesTable
Thanks Sylvain, this is what I wanted to implement and got no idea how.
Make sure it is annoying enough for the projects your colleagues work
on, and ideas come quickly ;-)
In my case this was only a question on user list. I had an itch for some
hours only. I have time to post a few answers on users list these days
and nothing more. And they say holidays is usually a dead season for a
software company.
Seriously, before JXPath 1.2 (which introduced namespace support) they
could write e.g. "#{doc/document/dc:title}" whereas the new JXPath
required to write "#{doc/document/*[name()='dc:title']}". This was
hardly considered as an improvement :-P
As a side note, the refactored NamespacesTable I committed yesterday is
a killer tool to cleanly handle namespaces (see
RedundantNamespacesFilter). I plan to use it in some transformers that
"consume" namespaces such as i18n, xinclude, etc to ensure the consumed
namespaces never passes through the transformer. That will make cleaner
and smaller web pages!
So this means the output page won't have the nasty:
<html xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
xmlns:cinclude="http://apache.org/cocoon/include/1.0"
xmlns:dir="http://apache.org/cocoon/directory/2.0">
titanium hero plate again ! :)
OT: What stage are cocoon stack traces in 2.1.x branch? I lack this very
much in trunk.
--
Leszek Gawron [EMAIL PROTECTED]
IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65