cocoon-users mailing list archives

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

> From: Torsten Knodt [mailto:torstenknodt@datas-world.de]
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> 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
have
> 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.

Vadim


> Simply put this transformer before the serializer and it works, no
parameters.
> To include it, copy the file to src/org/apache/cocoon/transformation
and
> recompile the source (I've tested with jdk 1.3.1 blackdown, debian
linux,
> 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
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
> 
> iD8DBQE9Tve/vxZktkzSmiwRAkDWAJ41xvGaYqrzkESTXZo+EkEyal674ACfe0rp
> /bHZopl87A0ED1v8S8kY9r8=
> =K5eR
> -----END PGP SIGNATURE-----


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message