Dims, Davanum Srinivas wrote: > > Applied the patch partially. Please take a look at the latest CVS and look for > the string "FIXME" > in 2 locations, If you uncomment the two lines of code after each FIXME, some > of the samples don't > work. They are garbled. Can you please test against a few browsers and then > send us an update? it seems like Xalan dometimes generates null namespace URIs. The attached patch safeguards against this situation. There was another problem with empty prefix-mappings to the default namespace. This problem is fixed now as well. Can you please check if you experience problems anymore? Joerg Henne
Index: AbstractTextSerializer.java =================================================================== RCS file: /home/cvspublic/xml-cocoon2/src/org/apache/cocoon/serialization/AbstractTextSerializer.java,v retrieving revision 1.5 diff -u -r1.5 AbstractTextSerializer.java --- AbstractTextSerializer.java 2001/09/18 16:34:27 1.5 +++ AbstractTextSerializer.java 2001/09/19 12:25:14 @@ -188,8 +188,12 @@ this.uriList.add(uri); // store mappings for xalan-bug-workaround. - // append the prefix colon now, in order to save concatenations later. - this.uriToPrefixMap.put(uri, prefix + ":"); + // append the prefix colon now, in order to save concatenations later, but + // only for non-empty prefixes. + if(prefix.length() > 0) + this.uriToPrefixMap.put(uri, prefix + ":"); + else + this.uriToPrefixMap.put(uri, prefix); this.prefixToUriMap.put(prefix, uri); super.startPrefixMapping(prefix, uri); @@ -222,9 +226,8 @@ throws SAXException { // try to restore the qName. The map already contains the colon - // FIXME (DIMS): This causes problems. This was a patch posted by Joerg - //if(eltUri.length() != 0 && this.uriToPrefixMap.containsKey(eltUri) ) - // eltQName = (String) this.uriToPrefixMap.get(eltUri) + eltLocalName; + if(null != eltUri && eltUri.length() != 0 && +this.uriToPrefixMap.containsKey(eltUri) ) + eltQName = (String) this.uriToPrefixMap.get(eltUri) + eltLocalName; if (this.hasMappings) { // Add xmlns* attributes where needed @@ -294,9 +297,8 @@ public void endElement(String eltUri, String eltLocalName, String eltQName) throws SAXException { // try to restore the qName. The map already contains the colon - // FIXME (DIMS): This causes problems. This was a patch posted by Joerg - //if(eltUri.length() != 0 && this.uriToPrefixMap.containsKey(eltUri) ) - // eltQName = (String) this.uriToPrefixMap.get(eltUri) + eltLocalName; + if(null != eltUri && eltUri.length() != 0 && +this.uriToPrefixMap.containsKey(eltUri) ) + eltQName = (String) this.uriToPrefixMap.get(eltUri) + eltLocalName; super.endElement(eltUri, eltLocalName, eltQName); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]