sboag 00/05/17 15:42:29
Modified: src/org/apache/xalan/xpath/xml FormatterToXML.java
Log:
Fix for bug: "<xsl:output> standalone attribute not generating necessary
attribute on xml declaration". If standalone="yes" the standalone attribute
will be generated, otherwise no standalone attribute will be generated.
Revision Changes Path
1.34 +10 -8
xml-xalan/src/org/apache/xalan/xpath/xml/FormatterToXML.java
Index: FormatterToXML.java
===================================================================
RCS file:
/home/cvs/xml-xalan/src/org/apache/xalan/xpath/xml/FormatterToXML.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- FormatterToXML.java 2000/03/29 03:51:56 1.33
+++ FormatterToXML.java 2000/05/17 22:42:28 1.34
@@ -227,7 +227,7 @@
/**
* The standalone value for the doctype.
*/
- boolean m_standalone;
+ boolean m_standalone = false;
/**
* The mediatype. Not used right now.
@@ -574,9 +574,11 @@
String encoding = getMimeEncoding(this.m_encoding);
String version = (null == m_version) ? "1.0" : m_version;
+
+ String standalone = (m_standalone) ? " standalone=\"yes\"" : "";
accum("<?xml version=\""+version+"\" encoding=\""+
- encoding + "\"?>");
+ encoding + "\""+standalone+"?>");
outputLineSep();
}
}
@@ -1222,8 +1224,8 @@
}
accum('&');
accum('#');
- accum('x');
- accum(Integer.toHexString(next));
+ // accum('x');
+ accum(Integer.toString(next));
accum(';');
}
else
@@ -1266,8 +1268,8 @@
//+Integer.toHexString((int)c)+"
"+Integer.toHexString(next));
next = ((c-0xd800)<<10)+next-0xdc00+0x00010000;
}
- accum("&#x");
- accum(Integer.toHexString(next));
+ accum("&#");
+ accum(Integer.toString(next));
accum(";");
}
else
@@ -1449,8 +1451,8 @@
//+Integer.toHexString(ch)+" "+Integer.toHexString(next));
next = ((ch-0xd800)<<10)+next-0xdc00+0x00010000;
}
- accum("&#x");
- accum(Integer.toHexString(next));
+ accum("&#");
+ accum(Integer.toString(next));
accum(";");
/*} else if (null != ctbc && !ctbc.canConvert(ch)) {
sb.append("&#x");