cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <>
Subject RE: TESTERS WANTED for ns prefix cleaner
Date Tue, 06 Aug 2002 18:31:21 GMT
Hi Torsten,

> From: Torsten Knodt []
> Hash: SHA1
> Hello,
> I've written my first transformer and now looking for testers.
> It simply removes all unused namespace prefix declarations (xmlns:).
> When I'm not wrong, far more than me have the problem of those. So I
> simply attached the source to the mail.

I solved that issue very easily: because my site produces HTML only, it
is Ok to remove *all* namespaces, thus I simply implemented start/end
PrefixMapping methods, and start/end Element methods.

Pros: It's *fast*
Cons: Won't work if you want to leave some namespaces.

Your solution:

Pros: Detects and removes unused namespaces (AFAIU)
Cons: High memory consumption and low performance.

PS I see compromise here: you tell what namespaces you want to leave,
and transformer removes all other namespaces. It's fast, (not-so)
flexible, and memory efficient.


> Simply put this transformer before the serializer and it works, no
> To include it, copy the file to src/org/apache/cocoon/transformation
> recompile the source (I've tested with jdk 1.3.1 blackdown, debian
> cocoon in command line).
> I haven't attached the xdoc, because it has no parameters. When I
submit it to
> bugzilla, it will be attached.
> With kind regards
> 	Torsten Knodt
> Version: GnuPG v1.0.7 (GNU/Linux)
> iD8DBQE9Tve/vxZktkzSmiwRAkDWAJ41xvGaYqrzkESTXZo+EkEyal674ACfe0rp
> /bHZopl87A0ED1v8S8kY9r8=
> =K5eR

Please check that your question  has not already been answered in the
FAQ before posting.     <>

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

View raw message