You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Padraig O'hIceadha <pa...@gradient.ie> on 2001/05/25 18:57:51 UTC
not working
Hi,
I had problems with an XSL output method of html using JDK 1.1. I
checked that the output method had been set on the transformer but it
still output with XML format tags (e.g. <BR/>).
I dubugged through the code and found that when the
output_html.properties file was being loaded the key names were not
being fixed up correctly.
The relevant entry is :
{http\u003a//xml.apache.org/xslt}content-handler=org.apache.xalan.serialize.SerializerToHTML
JDK 1.x didn't properly expand Unicode escape sequences in Property
key names, so
org.apache.xalan.templates.OutputProperties has some code in the
loadPropertiesFile method to fix these references.
The code gets an Enumerator for the Properties and enumerates through
each key. If the key needs fixing it removes the old key and then adds
it back with the correct key. However the Enumerator is not valid after
the modification and some of the original values (including
{http\u003a//xml.apache.org/xslt}content-handler) were being skipped as
a result and not patched.
I changed it to Enumerate a clone of the Properties object and this
seems to work.
I'm including the patch. Could a committer please review this patch
and if it is valid make the change in cvs ?
Thanks very much,
Regards,
Padraig
==========================================================
--- OutputProperties.java.orig Wed May 23 08:43:14 2001
+++ OutputProperties.java Fri May 25 17:32:43 2001
@@ -237,7 +237,7 @@
// Note that we're working at the HashTable level here,
// and not at the Properties level! This is important
// because we don't want to modify the default properties.
- Enumeration keys = props.keys();
+ Enumeration keys = ((Properties)props.clone()).keys();
while(keys.hasMoreElements())
{
String key = (String)keys.nextElement();
==========================================================
Padraig O'hIceadha,
Chief Technical Architect,
Gradient Solutions, a Sabre Company