You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mi...@apache.org on 2003/09/26 21:53:18 UTC
cvs commit: xml-xalan/java/src/org/apache/xml/serializer ToXHTMLStream.java output_xhtml.properties ToStream.java ToXMLStream.java ToHTMLStream.java OutputPropertiesFactory.java ElemDesc.java
minchau 2003/09/26 12:53:17
Modified: java/src/org/apache/xml/serializer Tag: xslt20-compiled
ToStream.java ToXMLStream.java ToHTMLStream.java
OutputPropertiesFactory.java ElemDesc.java
Added: java/src/org/apache/xml/serializer Tag: xslt20-compiled
ToXHTMLStream.java output_xhtml.properties
Log:
Preliminary support for method="xhtml"
Revision Changes Path
No revision
No revision
1.21.2.1 +1 -1 xml-xalan/java/src/org/apache/xml/serializer/ToStream.java
Index: ToStream.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/serializer/ToStream.java,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -u -r1.21 -r1.21.2.1
--- ToStream.java 13 Aug 2003 05:53:41 -0000 1.21
+++ ToStream.java 26 Sep 2003 19:53:17 -0000 1.21.2.1
@@ -2650,7 +2650,7 @@
return null;
}
- private void ensurePrefixIsDeclared(String ns, String rawName)
+ protected void ensurePrefixIsDeclared(String ns, String rawName)
throws org.xml.sax.SAXException
{
1.8.2.1 +2 -2 xml-xalan/java/src/org/apache/xml/serializer/ToXMLStream.java
Index: ToXMLStream.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/serializer/ToXMLStream.java,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -r1.8 -r1.8.2.1
--- ToXMLStream.java 25 Jun 2003 17:05:02 -0000 1.8
+++ ToXMLStream.java 26 Sep 2003 19:53:17 -0000 1.8.2.1
@@ -77,7 +77,7 @@
/**
* remembers if we need to write out "]]>" to close the CDATA
*/
- private boolean m_cdataTagOpen = false;
+ protected boolean m_cdataTagOpen = false;
/**
@@ -580,7 +580,7 @@
private void resetToXMLStream()
{
this.m_cdataTagOpen = false;
-
+ this.m_charInfo = m_xmlcharInfo;
}
}
1.23.2.1 +4 -3 xml-xalan/java/src/org/apache/xml/serializer/ToHTMLStream.java
Index: ToHTMLStream.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/serializer/ToHTMLStream.java,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -r1.23 -r1.23.2.1
--- ToHTMLStream.java 13 Aug 2003 05:53:41 -0000 1.23
+++ ToHTMLStream.java 26 Sep 2003 19:53:17 -0000 1.23.2.1
@@ -327,7 +327,7 @@
| ElemDesc.BLOCK
| ElemDesc.BLOCKFORM
| ElemDesc.BLOCKFORMFIELDSET));
- m_elementFlags.put("HTML", new ElemDesc(0 | ElemDesc.BLOCK));
+ m_elementFlags.put("HTML", new ElemDesc(0 | ElemDesc.BLOCK | ElemDesc.HTMLELEM));
// From "John Ky" <hand@syd.speednet.com.au
// Transitional Document Type Definition ()
@@ -1014,7 +1014,7 @@
*
* @return should be a two character string.
*/
- private String makeHHString(int i)
+ private static String makeHHString(int i)
{
String s = Integer.toHexString(i).toUpperCase();
if (s.length() == 1)
@@ -1933,6 +1933,7 @@
m_inDTD = false;
// m_isRawStack.clear();
m_omitMetaTag = false;
- m_specialEscapeURLs = true;
+ m_specialEscapeURLs = true;
+ m_charInfo = m_htmlcharInfo;
}
}
1.3.2.1 +16 -0 xml-xalan/java/src/org/apache/xml/serializer/OutputPropertiesFactory.java
Index: OutputPropertiesFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/serializer/OutputPropertiesFactory.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- OutputPropertiesFactory.java 14 Aug 2003 16:27:42 -0000 1.3
+++ OutputPropertiesFactory.java 26 Sep 2003 19:53:17 -0000 1.3.2.1
@@ -147,6 +147,8 @@
private static final String PROP_FILE_TEXT = "output_text.properties";
/** property file for default HTML properties */
private static final String PROP_FILE_HTML = "output_html.properties";
+ /** property file for default XHTML properties */
+ private static final String PROP_FILE_XHTML = "output_xhtml.properties";
/** property file for default UNKNOWN (Either XML or HTML, to be determined later) properties */
private static final String PROP_FILE_UNKNOWN = "output_unknown.properties";
@@ -160,6 +162,9 @@
/** The default properties when method="html". */
private static Properties m_html_properties = null;
+ /** The default properties when method="xhtml". */
+ private static Properties m_xhtml_properties = null;
+
/** The default properties when method="text". */
private static Properties m_text_properties = null;
@@ -228,6 +233,17 @@
if (null == m_html_properties) // double check
{
fileName = PROP_FILE_HTML;
+ m_html_properties =
+ loadPropertiesFile(fileName, m_xml_properties);
+ }
+
+ defaultProperties = m_html_properties;
+ }
+ else if (method.equals(Method.XHTML))
+ {
+ if (null == m_xhtml_properties) // double check
+ {
+ fileName = PROP_FILE_XHTML;
m_html_properties =
loadPropertiesFile(fileName, m_xml_properties);
}
1.3.2.1 +3 -0 xml-xalan/java/src/org/apache/xml/serializer/ElemDesc.java
Index: ElemDesc.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/serializer/ElemDesc.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- ElemDesc.java 1 Aug 2003 01:03:15 -0000 1.3
+++ ElemDesc.java 26 Sep 2003 19:53:17 -0000 1.3.2.1
@@ -137,6 +137,9 @@
/** Bit position if this element type is a header element (i.e. HEAD). */
public static final int HEADELEM = (1 << 22);
+
+ /** Bit position if this element is the "HTML" element */
+ public static final int HTMLELEM = (1 << 23);
/** Bit position if this attribute type is a URL. */
public static final int ATTRURL = (1 << 1);
No revision
Index: ElemDesc.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/serializer/ElemDesc.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- ElemDesc.java 1 Aug 2003 01:03:15 -0000 1.3
+++ ElemDesc.java 26 Sep 2003 19:53:17 -0000 1.3.2.1
@@ -137,6 +137,9 @@
/** Bit position if this element type is a header element (i.e. HEAD). */
public static final int HEADELEM = (1 << 22);
+
+ /** Bit position if this element is the "HTML" element */
+ public static final int HTMLELEM = (1 << 23);
/** Bit position if this attribute type is a URL. */
public static final int ATTRURL = (1 << 1);
No revision
Index: ElemDesc.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/serializer/ElemDesc.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- ElemDesc.java 1 Aug 2003 01:03:15 -0000 1.3
+++ ElemDesc.java 26 Sep 2003 19:53:17 -0000 1.3.2.1
@@ -137,6 +137,9 @@
/** Bit position if this element type is a header element (i.e. HEAD). */
public static final int HEADELEM = (1 << 22);
+
+ /** Bit position if this element is the "HTML" element */
+ public static final int HTMLELEM = (1 << 23);
/** Bit position if this attribute type is a URL. */
public static final int ATTRURL = (1 << 1);
1.1.2.1 +245 -0 xml-xalan/java/src/org/apache/xml/serializer/Attic/ToXHTMLStream.java
1.1.2.1 +25 -0 xml-xalan/java/src/org/apache/xml/serializer/Attic/output_xhtml.properties
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org