cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Re: [cforms]How to get rid of attributes about namespace declcaration in html serializer?
Date Fri, 22 Jun 2007 06:58:20 GMT
The transform step Niels refers to is in the FAQ:
http://cocoon.apache.org/2.1/faq/faq-xslt.html#faq-N10075 
"How can I remove namespaces from my xml files?"

>>> Niels van Kampenhout <n.vankampenhout@hippo.nl> 2007/06/22 08:46:53
AM >>>

Hi,

Rice Yeh wrote:
>   I use jx transformer with cforms. I find a <script> tag in the 
> resulted html have xmlns: attributes like the follows:
> 
> <script
>  xmlns:ft="http://apache.org/cocoon/forms/1.0#template" xmlns:fi=
> "http://apache.org/cocoon/forms/1.0#instance" xmlns:jx="
> http://apache.org/cocoon/templates/jx/1.0"
xmlns:bu="http://apache.org/cocoon/browser-update/1.0
>  <http://apache.org/cocoon/browser-update/1.0>"
language="text/javascript">
>                 
> I doubt the browser will no execute the script with such extra xmlns:
attributes. This seems it is html serializer's problem. 
> 
> I use cocoon-view to see the result of serialize. There is no such
xsmlns: stuff? 
> 
> Any clue?

If you have an XSLT transformation in your pipeline before the 
serializer, you can get rid of the namespace prefixes using an 
@exclude-result-prefixes attribute in your xsl:stylesheet element.

Otherwise add an extra transformer before the serializer which strips 
the namespaces. This is easiest with XSLT, fastest in terms of 
performance is writing a small customs transformer for it.

Regards,
Niels

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



-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
CallCentre@csir.co.za.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


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


Mime
View raw message