morten 01/10/17 08:13:22
Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
Log:
Changed the DOM's copy() function to always copy the necessary namespace
declaration to the output handler.
PR: bugzilla 3409 (not complete fix)
Obtained from: n/a
Submitted by: [EMAIL PROTECTED]
Reviewed by: [EMAIL PROTECTED]
Revision Changes Path
1.50 +10 -3
xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java
Index: DOMImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- DOMImpl.java 2001/10/17 09:43:12 1.49
+++ DOMImpl.java 2001/10/17 15:13:22 1.50
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: DOMImpl.java,v 1.49 2001/10/17 09:43:12 morten Exp $
+ * @(#)$Id: DOMImpl.java,v 1.50 2001/10/17 15:13:22 morten Exp $
*
* The Apache Software License, Version 1.1
*
@@ -2638,9 +2638,10 @@
type = type - NTYPES;
String name = _namesArray[type];
final int pi = _prefix[node];
+ final int ui = _namespace[type];
if (pi > 0) {
final String prefix = _prefixArray[pi];
- final String uri = _uriArray[_namespace[type]];
+ final String uri = _uriArray[ui];
final String local = getLocalName(node);
if (prefix.equals(EMPTYSTRING))
name = local;
@@ -2650,7 +2651,13 @@
handler.namespace(prefix, uri);
}
else {
- handler.startElement(name);
+ if (ui > 0) {
+ handler.startElement(getLocalName(node));
+ handler.namespace(EMPTYSTRING, _uriArray[ui]);
+ }
+ else {
+ handler.startElement(name);
+ }
}
return name;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]