I called it cleanxmlns.
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/> <xsl:template match="*"> <!-- remove element prefix (if any) --> <xsl:element name="{local-name()}"> <!-- process attributes --> <xsl:for-each select="@*"> <!-- remove attribute prefix (if any) --> <xsl:attribute name="{local-name()}"> <xsl:value-of select="."/> </xsl:attribute> </xsl:for-each> <xsl:apply-templates/> </xsl:element> </xsl:template> </xsl:stylesheet>
Lionel
At 17:37 26/11/2003 +0100, you wrote:
True and it would be interesting for the Cocoon distro bc this is a recurrent need.
-----Message d'origine----- De : Reinhard Poetz [mailto:[EMAIL PROTECTED] Envoy� : mercredi 26 novembre 2003 17:29 � : [EMAIL PROTECTED] Objet : RE: removing namespaces...
Another (and the fastest) way would be a transformer removing the namespaces, declaration and prefixes.
-- Reinhard
> -----Original Message----- > From: Nicolas Toper [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 26, 2003 5:07 PM > To: [EMAIL PROTECTED] > Subject: RE: removing namespaces... > > > continue your search basically you need to make a new > stylesheet to exclude all ns and call it with a transformer > > -----Message d'origine----- > De : Patrick Hess [mailto:[EMAIL PROTECTED] > Envoy� : mercredi 26 novembre 2003 16:59 > � : [EMAIL PROTECTED] > Objet : removing namespaces... > > > > I currently facing the well-known problem of "how to remove > namespace declarations from my HTML files?". After testing a > bit I found that the exclude-prefixes="..." approach works > fine for me - even if the Wiki lists this under "Solutions, > which do NOT work". > (http://wiki.cocoondev.org/Wiki.jsp?page=RemoveNamespaces) > > I wrote it works? - well, the <html>-tag has a namespace declaration: > > <html xmlns:xsp-request="http://apache.org/xsp/request/2.0" > xmlns:xsp="http://apache.org/xsp" > xmlns:wi="http://apache.org/cocoon/woody/instance/1.0" > xmlns:wt="http://apache.org/cocoon/woody/template/1.0" > xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"> > > Is there a way to rid of this? The solutions from the wiki > are not really what I would like do... > > Thanks for your help! > > Patrick > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Lionel CRINE Ing�nieur Syst�mes documentaires Soci�t� : 4DConcept 22 rue Etienne de Jouy 78353 JOUY EN JOSAS Tel : 01.34.58.70.70 Fax : 01.39.58.70.70
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
