You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by greg keraunen <gk...@valinux.com> on 2000/07/14 04:30:43 UTC

unwanted url-encoding of and
attributes

I need to use HTML output mode in order to correctly generate <HR> and
other tags for correct browser display.

PROBLEM: 	
	in HTML output mode, these get AUTOMATICALLY url-encoded and won't
parse:
		<FORM action="<?php echo $foo; ?>">  
		<A href="<?php echo $foo; ?>"> 
	xalan-j generates:
		<A href="<?php%20echo%20$foo;%20?>">

This is according to the spec I believe. (see p.258, XSLT, Michael Kay)

SOLUTION: 
This is a miserable hack, but the only way I have found to get around
unwanted url-encoding of output:
Instead of generating a <FORM> or <A> output node with attributes that
will be automatically url-encoded,
I am using:
	<xsl:text disable-output-escaping="yes">&lt;A </xsl:text>
	href=&quot;
	...
	&quot;
	...
Does anyone know a better workaround? I don't see any way to selectively
control the url-encoding of output
If there is no way to turn url-encoding of these attributes off, then is
there a way to force <HR/> -> <HR> in XML output mode?
-- 
greg keraunen <gk...@valinux.com> 408-542-8600 x8085
web software engineer