sboag 99/12/01 22:04:08
Modified: docs Makefile
src makexpath4j
src/org/apache/xalan/xpath MutableNodeListImpl.java
XPathProcessorImpl.java
src/org/apache/xalan/xpath/xml FormatterToHTML.java
FormatterToXML.java StringVector.java
src/org/apache/xalan/xslt Stylesheet.java
XSLTEngineImpl.java XSLTProcessor.java
Log:
Fixed encoding attribute output for UTF-8, also did minor optimization by
adding StringKey and NodeVector and using these in a few places.
Revision Changes Path
1.8 +2 -2 xml-xalan/docs/Makefile
Index: Makefile
===================================================================
RCS file: /home/cvs/xml-xalan/docs/Makefile,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Makefile 1999/11/11 13:56:36 1.7
+++ Makefile 1999/12/02 06:04:06 1.8
@@ -14,7 +14,7 @@
DOCS_SOURCE := $(UPDIR)$(PATHSEP)docs
APACHE_PKG := org.apache.xalan
APACHE_DIR :=
$(UPDIR)$(PATHSEP)src$(PATHSEP)org$(PATHSEP)apache$(PATHSEP)xalan$(PATHSEP)
-JAVADOC_PKGS := $(APACHE_PKG).xslt $(APACHE_PKG).xslt.client
$(APACHE_PKG).xslt.extensions $(APACHE_PKG).xslt.trace $(APACHE_PKG).xpath
$(APACHE_PKG).xpath.xml $(APACHE_PKG).xpath.xml4j2dom $(APACHE_PKG).xpath.dtm
+JAVADOC_PKGS := $(APACHE_PKG).xslt $(APACHE_PKG).xslt.client
$(APACHE_PKG).xslt.extensions $(APACHE_PKG).xslt.trace $(APACHE_PKG).xpath
$(APACHE_PKG).xpath.xml $(APACHE_PKG).xpath.xdom $(APACHE_PKG).xpath.dtm
JITFLAG := -Djava.compiler=NONE
XSLTPROCESSOR = $(APACHE_PKG).xslt.Process
@@ -63,7 +63,7 @@
$(JAVA) $(JITFLAG) -classpath "$(EXTRA_CLASSPATH)" $(XSLTPROCESSOR) \
-in
$(DOCS_SOURCE)$(PATHSEP)org-apache-xalan-xpath-xml4j2dom.xml \
-xsl $(DOCS_SOURCE)$(PATHSEP)package.xsl \
- -out
$(APACHE_DIR)xpath$(PATHSEP)xml4j2dom$(PATHSEP)package.html
+ -out
$(APACHE_DIR)xpath$(PATHSEP)XercesLiaison$(PATHSEP)package.html
$(JAVA) $(JITFLAG) -classpath "$(EXTRA_CLASSPATH)" $(XSLTPROCESSOR) \
-in
$(DOCS_SOURCE)$(PATHSEP)org-apache-xalan-xpath-dtm.xml \
-xsl $(DOCS_SOURCE)$(PATHSEP)package.xsl \
1.7 +1 -0 xml-xalan/src/makexpath4j
Index: makexpath4j
===================================================================
RCS file: /home/cvs/xml-xalan/src/makexpath4j,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- makexpath4j 1999/11/30 05:23:52 1.6
+++ makexpath4j 1999/12/02 06:04:06 1.7
@@ -43,6 +43,7 @@
$(XMLLIAISONDIR)$(PATHSEP)ProblemListener.java \
$(XMLLIAISONDIR)$(PATHSEP)StringToStringTable.java \
$(XMLLIAISONDIR)$(PATHSEP)StringVector.java \
+ $(XMLLIAISONDIR)$(PATHSEP)NodeVector.java \
$(XMLLIAISONDIR)$(PATHSEP)ProblemListenerDefault.java \
$(XPATHDIR)$(PATHSEP)DataProviderAssociation.java \
$(XPATHDIR)$(PATHSEP)Dispatcher.java \
1.3 +4 -3
xml-xalan/src/org/apache/xalan/xpath/MutableNodeListImpl.java
Index: MutableNodeListImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/src/org/apache/xalan/xpath/MutableNodeListImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MutableNodeListImpl.java 1999/11/28 10:26:16 1.2
+++ MutableNodeListImpl.java 1999/12/02 06:04:06 1.3
@@ -58,11 +58,12 @@
import org.w3c.dom.*;
import java.util.*;
+import org.apache.xalan.xpath.xml.NodeVector;
/**
* Local implementation of NodeList. This class is for internal use only.
*/
-public class MutableNodeListImpl extends Vector implements MutableNodeList
+public class MutableNodeListImpl extends NodeVector implements
MutableNodeList
{
/**
* Create an empty nodelist.
@@ -150,7 +151,7 @@
int nChildren = nodelist.getLength();
for(int i = 0; i < nChildren; i++)
{
- Object obj = nodelist.item(i);
+ Node obj = nodelist.item(i);
if(null != obj)
{
addElement(obj);
@@ -194,7 +195,7 @@
int i;
try
{
- Object nodeObj = nodelist.item(testIndex);
+ Node nodeObj = nodelist.item(testIndex);
int index1 =
((org.apache.xalan.xpath.dtm.DTMProxy)nodeObj).getDTMNodeNumber();
for(i = end; i >= start; i--)
{
1.9 +72 -71
xml-xalan/src/org/apache/xalan/xpath/XPathProcessorImpl.java
Index: XPathProcessorImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/src/org/apache/xalan/xpath/XPathProcessorImpl.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- XPathProcessorImpl.java 1999/11/29 06:26:19 1.8
+++ XPathProcessorImpl.java 1999/12/02 06:04:06 1.9
@@ -62,6 +62,7 @@
import org.apache.xalan.xpath.res.XPATHErrorResources;
import org.apache.xalan.xpath.xml.XSLMessages;
import org.apache.xalan.xpath.xml.ProblemListener;
+import org.apache.xalan.xpath.xml.StringKey;
/**
* The XPathProcessorImpl class' responsibilities include
@@ -1203,81 +1204,81 @@
static
{
- m_axisnames.put((FROM_ANCESTORS_STRING).intern(), new
Integer(XPath.FROM_ANCESTORS));
- m_axisnames.put((FROM_ANCESTORS_OR_SELF_STRING).intern(), new
Integer(XPath.FROM_ANCESTORS_OR_SELF));
- m_axisnames.put((FROM_ATTRIBUTES_STRING).intern(), new
Integer(XPath.FROM_ATTRIBUTES));
- m_axisnames.put((FROM_CHILDREN_STRING).intern(), new
Integer(XPath.FROM_CHILDREN));
- m_axisnames.put((FROM_DESCENDANTS_STRING).intern(), new
Integer(XPath.FROM_DESCENDANTS));
- m_axisnames.put((FROM_DESCENDANTS_OR_SELF_STRING).intern(), new
Integer(XPath.FROM_DESCENDANTS_OR_SELF));
- m_axisnames.put((FROM_FOLLOWING_STRING).intern(), new
Integer(XPath.FROM_FOLLOWING));
- m_axisnames.put((FROM_FOLLOWING_SIBLINGS_STRING).intern(), new
Integer(XPath.FROM_FOLLOWING_SIBLINGS));
- m_axisnames.put((FROM_PARENT_STRING).intern(), new
Integer(XPath.FROM_PARENT));
- m_axisnames.put((FROM_PRECEDING_STRING).intern(), new
Integer(XPath.FROM_PRECEDING));
- m_axisnames.put((FROM_PRECEDING_SIBLINGS_STRING).intern(), new
Integer(XPath.FROM_PRECEDING_SIBLINGS));
- m_axisnames.put((FROM_SELF_STRING).intern(), new
Integer(XPath.FROM_SELF));
- m_axisnames.put((FROM_NAMESPACE_STRING).intern(), new
Integer(XPath.FROM_NAMESPACE));
-
- m_nodetypes.put((NODETYPE_COMMENT_STRING).intern(), new
Integer(XPath.NODETYPE_COMMENT));
- m_nodetypes.put((NODETYPE_TEXT_STRING).intern(), new
Integer(XPath.NODETYPE_TEXT));
- m_nodetypes.put((NODETYPE_PI_STRING).intern(), new
Integer(XPath.NODETYPE_PI));
- m_nodetypes.put((NODETYPE_NODE_STRING).intern(), new
Integer(XPath.NODETYPE_NODE));
- m_nodetypes.put((NODETYPE_ANYELEMENT_STRING).intern(), new
Integer(XPath.NODETYPE_ANYELEMENT));
+ m_axisnames.put(new StringKey(FROM_ANCESTORS_STRING), new
Integer(XPath.FROM_ANCESTORS));
+ m_axisnames.put(new StringKey(FROM_ANCESTORS_OR_SELF_STRING), new
Integer(XPath.FROM_ANCESTORS_OR_SELF));
+ m_axisnames.put(new StringKey(FROM_ATTRIBUTES_STRING), new
Integer(XPath.FROM_ATTRIBUTES));
+ m_axisnames.put(new StringKey(FROM_CHILDREN_STRING), new
Integer(XPath.FROM_CHILDREN));
+ m_axisnames.put(new StringKey(FROM_DESCENDANTS_STRING), new
Integer(XPath.FROM_DESCENDANTS));
+ m_axisnames.put(new StringKey(FROM_DESCENDANTS_OR_SELF_STRING), new
Integer(XPath.FROM_DESCENDANTS_OR_SELF));
+ m_axisnames.put(new StringKey(FROM_FOLLOWING_STRING), new
Integer(XPath.FROM_FOLLOWING));
+ m_axisnames.put(new StringKey(FROM_FOLLOWING_SIBLINGS_STRING), new
Integer(XPath.FROM_FOLLOWING_SIBLINGS));
+ m_axisnames.put(new StringKey(FROM_PARENT_STRING), new
Integer(XPath.FROM_PARENT));
+ m_axisnames.put(new StringKey(FROM_PRECEDING_STRING), new
Integer(XPath.FROM_PRECEDING));
+ m_axisnames.put(new StringKey(FROM_PRECEDING_SIBLINGS_STRING), new
Integer(XPath.FROM_PRECEDING_SIBLINGS));
+ m_axisnames.put(new StringKey(FROM_SELF_STRING), new
Integer(XPath.FROM_SELF));
+ m_axisnames.put(new StringKey(FROM_NAMESPACE_STRING), new
Integer(XPath.FROM_NAMESPACE));
+
+ m_nodetypes.put(new StringKey(NODETYPE_COMMENT_STRING), new
Integer(XPath.NODETYPE_COMMENT));
+ m_nodetypes.put(new StringKey(NODETYPE_TEXT_STRING), new
Integer(XPath.NODETYPE_TEXT));
+ m_nodetypes.put(new StringKey(NODETYPE_PI_STRING), new
Integer(XPath.NODETYPE_PI));
+ m_nodetypes.put(new StringKey(NODETYPE_NODE_STRING), new
Integer(XPath.NODETYPE_NODE));
+ m_nodetypes.put(new StringKey(NODETYPE_ANYELEMENT_STRING), new
Integer(XPath.NODETYPE_ANYELEMENT));
- m_keywords.put((FROM_SELF_ABBREVIATED_STRING).intern(), new
Integer(XPath.FROM_SELF));
- // m_keywords.put((FROM_ATTRIBUTE_STRING).intern(), new
Integer(XPath.FROM_ATTRIBUTE));
- // m_keywords.put((FROM_DOC_STRING).intern(), new
Integer(XPath.FROM_DOC));
- // m_keywords.put((FROM_DOCREF_STRING).intern(), new
Integer(XPath.FROM_DOCREF));
- // m_keywords.put((FROM_ID_STRING).intern(), new Integer(XPath.FROM_ID));
- // m_keywords.put((FROM_IDREF_STRING).intern(), new
Integer(XPath.FROM_IDREF));
-
- m_keywords.put((FUNC_ID_STRING).intern(), new Integer(XPath.FUNC_ID));
- m_keywords.put((FUNC_KEY_STRING).intern(), new Integer(XPath.FUNC_KEY));
- // m_keywords.put((FUNC_DOCUMENT_STRING).intern(), new
Integer(XPath.FUNC_DOC));
-
- m_functions.put((FUNC_CURRENT_STRING).intern(), new
Integer(XPath.FUNC_CURRENT));
- m_functions.put((FUNC_LAST_STRING).intern(), new
Integer(XPath.FUNC_LAST));
- m_functions.put((FUNC_POSITION_STRING).intern(), new
Integer(XPath.FUNC_POSITION));
- m_functions.put((FUNC_COUNT_STRING).intern(), new
Integer(XPath.FUNC_COUNT));
- m_functions.put((FUNC_ID_STRING).intern(), new Integer(XPath.FUNC_ID));
- m_functions.put((FUNC_KEY_STRING).intern(), new Integer(XPath.FUNC_KEY));
- // m_functions.put((FUNC_DOCUMENT_STRING).intern(), new
Integer(XPath.FUNC_DOC));
- m_functions.put((FUNC_LOCAL_PART_STRING).intern(), new
Integer(XPath.FUNC_LOCAL_PART));
- m_functions.put((FUNC_NAMESPACE_STRING).intern(), new
Integer(XPath.FUNC_NAMESPACE));
- m_functions.put((FUNC_NAME_STRING).intern(), new
Integer(XPath.FUNC_QNAME));
- m_functions.put((FUNC_GENERATE_ID_STRING).intern(), new
Integer(XPath.FUNC_GENERATE_ID));
- m_functions.put((FUNC_NOT_STRING).intern(), new Integer(XPath.FUNC_NOT));
- m_functions.put((FUNC_TRUE_STRING).intern(), new
Integer(XPath.FUNC_TRUE));
- m_functions.put((FUNC_FALSE_STRING).intern(), new
Integer(XPath.FUNC_FALSE));
- m_functions.put((FUNC_BOOLEAN_STRING).intern(), new
Integer(XPath.FUNC_BOOLEAN));
- m_functions.put((FUNC_LANG_STRING).intern(), new
Integer(XPath.FUNC_LANG));
- m_functions.put((FUNC_NUMBER_STRING).intern(), new
Integer(XPath.FUNC_NUMBER));
- m_functions.put((FUNC_FLOOR_STRING).intern(), new
Integer(XPath.FUNC_FLOOR));
- m_functions.put((FUNC_CEILING_STRING).intern(), new
Integer(XPath.FUNC_CEILING));
- m_functions.put((FUNC_ROUND_STRING).intern(), new
Integer(XPath.FUNC_ROUND));
- m_functions.put((FUNC_SUM_STRING).intern(), new Integer(XPath.FUNC_SUM));
- m_functions.put((FUNC_STRING_STRING).intern(), new
Integer(XPath.FUNC_STRING));
- m_functions.put((FUNC_STARTS_WITH_STRING).intern(), new
Integer(XPath.FUNC_STARTS_WITH));
- m_functions.put((FUNC_CONTAINS_STRING).intern(), new
Integer(XPath.FUNC_CONTAINS));
- m_functions.put((FUNC_SUBSTRING_BEFORE_STRING).intern(), new
Integer(XPath.FUNC_SUBSTRING_BEFORE));
- m_functions.put((FUNC_SUBSTRING_AFTER_STRING).intern(), new
Integer(XPath.FUNC_SUBSTRING_AFTER));
- m_functions.put((FUNC_NORMALIZE_SPACE_STRING).intern(), new
Integer(XPath.FUNC_NORMALIZE_SPACE));
- m_functions.put((FUNC_TRANSLATE_STRING).intern(), new
Integer(XPath.FUNC_TRANSLATE));
- m_functions.put((FUNC_CONCAT_STRING).intern(), new
Integer(XPath.FUNC_CONCAT));
- //m_functions.put((FUNC_FORMAT_NUMBER_STRING).intern(), new
Integer(XPath.FUNC_FORMAT_NUMBER));
- m_functions.put((FUNC_SYSTEM_PROPERTY_STRING).intern(), new
Integer(XPath.FUNC_SYSTEM_PROPERTY));
- m_functions.put((FUNC_EXT_FUNCTION_AVAILABLE_STRING).intern(), new
Integer(XPath.FUNC_EXT_FUNCTION_AVAILABLE));
- m_functions.put((FUNC_EXT_ELEM_AVAILABLE_STRING).intern(), new
Integer(XPath.FUNC_EXT_ELEM_AVAILABLE));
- m_functions.put((FUNC_SUBSTRING_STRING).intern(), new
Integer(XPath.FUNC_SUBSTRING));
- m_functions.put((FUNC_STRING_LENGTH_STRING).intern(), new
Integer(XPath.FUNC_STRING_LENGTH));
- m_functions.put((FUNC_UNPARSED_ENTITY_URI_STRING).intern(), new
Integer(XPath.FUNC_UNPARSED_ENTITY_URI));
+ m_keywords.put(new StringKey(FROM_SELF_ABBREVIATED_STRING), new
Integer(XPath.FROM_SELF));
+ // m_keywords.put(new StringKey(FROM_ATTRIBUTE_STRING), new
Integer(XPath.FROM_ATTRIBUTE));
+ // m_keywords.put(new StringKey(FROM_DOC_STRING), new
Integer(XPath.FROM_DOC));
+ // m_keywords.put(new StringKey(FROM_DOCREF_STRING), new
Integer(XPath.FROM_DOCREF));
+ // m_keywords.put(new StringKey(FROM_ID_STRING), new
Integer(XPath.FROM_ID));
+ // m_keywords.put(new StringKey(FROM_IDREF_STRING), new
Integer(XPath.FROM_IDREF));
+
+ m_keywords.put(new StringKey(FUNC_ID_STRING), new
Integer(XPath.FUNC_ID));
+ m_keywords.put(new StringKey(FUNC_KEY_STRING), new
Integer(XPath.FUNC_KEY));
+ // m_keywords.put(new StringKey(FUNC_DOCUMENT_STRING), new
Integer(XPath.FUNC_DOC));
+
+ m_functions.put(new StringKey(FUNC_CURRENT_STRING), new
Integer(XPath.FUNC_CURRENT));
+ m_functions.put(new StringKey(FUNC_LAST_STRING), new
Integer(XPath.FUNC_LAST));
+ m_functions.put(new StringKey(FUNC_POSITION_STRING), new
Integer(XPath.FUNC_POSITION));
+ m_functions.put(new StringKey(FUNC_COUNT_STRING), new
Integer(XPath.FUNC_COUNT));
+ m_functions.put(new StringKey(FUNC_ID_STRING), new
Integer(XPath.FUNC_ID));
+ m_functions.put(new StringKey(FUNC_KEY_STRING), new
Integer(XPath.FUNC_KEY));
+ // m_functions.put(new StringKey(FUNC_DOCUMENT_STRING), new
Integer(XPath.FUNC_DOC));
+ m_functions.put(new StringKey(FUNC_LOCAL_PART_STRING), new
Integer(XPath.FUNC_LOCAL_PART));
+ m_functions.put(new StringKey(FUNC_NAMESPACE_STRING), new
Integer(XPath.FUNC_NAMESPACE));
+ m_functions.put(new StringKey(FUNC_NAME_STRING), new
Integer(XPath.FUNC_QNAME));
+ m_functions.put(new StringKey(FUNC_GENERATE_ID_STRING), new
Integer(XPath.FUNC_GENERATE_ID));
+ m_functions.put(new StringKey(FUNC_NOT_STRING), new
Integer(XPath.FUNC_NOT));
+ m_functions.put(new StringKey(FUNC_TRUE_STRING), new
Integer(XPath.FUNC_TRUE));
+ m_functions.put(new StringKey(FUNC_FALSE_STRING), new
Integer(XPath.FUNC_FALSE));
+ m_functions.put(new StringKey(FUNC_BOOLEAN_STRING), new
Integer(XPath.FUNC_BOOLEAN));
+ m_functions.put(new StringKey(FUNC_LANG_STRING), new
Integer(XPath.FUNC_LANG));
+ m_functions.put(new StringKey(FUNC_NUMBER_STRING), new
Integer(XPath.FUNC_NUMBER));
+ m_functions.put(new StringKey(FUNC_FLOOR_STRING), new
Integer(XPath.FUNC_FLOOR));
+ m_functions.put(new StringKey(FUNC_CEILING_STRING), new
Integer(XPath.FUNC_CEILING));
+ m_functions.put(new StringKey(FUNC_ROUND_STRING), new
Integer(XPath.FUNC_ROUND));
+ m_functions.put(new StringKey(FUNC_SUM_STRING), new
Integer(XPath.FUNC_SUM));
+ m_functions.put(new StringKey(FUNC_STRING_STRING), new
Integer(XPath.FUNC_STRING));
+ m_functions.put(new StringKey(FUNC_STARTS_WITH_STRING), new
Integer(XPath.FUNC_STARTS_WITH));
+ m_functions.put(new StringKey(FUNC_CONTAINS_STRING), new
Integer(XPath.FUNC_CONTAINS));
+ m_functions.put(new StringKey(FUNC_SUBSTRING_BEFORE_STRING), new
Integer(XPath.FUNC_SUBSTRING_BEFORE));
+ m_functions.put(new StringKey(FUNC_SUBSTRING_AFTER_STRING), new
Integer(XPath.FUNC_SUBSTRING_AFTER));
+ m_functions.put(new StringKey(FUNC_NORMALIZE_SPACE_STRING), new
Integer(XPath.FUNC_NORMALIZE_SPACE));
+ m_functions.put(new StringKey(FUNC_TRANSLATE_STRING), new
Integer(XPath.FUNC_TRANSLATE));
+ m_functions.put(new StringKey(FUNC_CONCAT_STRING), new
Integer(XPath.FUNC_CONCAT));
+ //m_functions.put(new StringKey(FUNC_FORMAT_NUMBER_STRING), new
Integer(XPath.FUNC_FORMAT_NUMBER));
+ m_functions.put(new StringKey(FUNC_SYSTEM_PROPERTY_STRING), new
Integer(XPath.FUNC_SYSTEM_PROPERTY));
+ m_functions.put(new StringKey(FUNC_EXT_FUNCTION_AVAILABLE_STRING), new
Integer(XPath.FUNC_EXT_FUNCTION_AVAILABLE));
+ m_functions.put(new StringKey(FUNC_EXT_ELEM_AVAILABLE_STRING), new
Integer(XPath.FUNC_EXT_ELEM_AVAILABLE));
+ m_functions.put(new StringKey(FUNC_SUBSTRING_STRING), new
Integer(XPath.FUNC_SUBSTRING));
+ m_functions.put(new StringKey(FUNC_STRING_LENGTH_STRING), new
Integer(XPath.FUNC_STRING_LENGTH));
+ m_functions.put(new StringKey(FUNC_UNPARSED_ENTITY_URI_STRING), new
Integer(XPath.FUNC_UNPARSED_ENTITY_URI));
// These aren't really functions.
- m_functions.put((NODETYPE_COMMENT_STRING).intern(), new
Integer(XPath.NODETYPE_COMMENT));
- m_functions.put((NODETYPE_TEXT_STRING).intern(), new
Integer(XPath.NODETYPE_TEXT));
- m_functions.put((NODETYPE_PI_STRING).intern(), new
Integer(XPath.NODETYPE_PI));
- m_functions.put((NODETYPE_NODE_STRING).intern(), new
Integer(XPath.NODETYPE_NODE));
+ m_functions.put(new StringKey(NODETYPE_COMMENT_STRING), new
Integer(XPath.NODETYPE_COMMENT));
+ m_functions.put(new StringKey(NODETYPE_TEXT_STRING), new
Integer(XPath.NODETYPE_TEXT));
+ m_functions.put(new StringKey(NODETYPE_PI_STRING), new
Integer(XPath.NODETYPE_PI));
+ m_functions.put(new StringKey(NODETYPE_NODE_STRING), new
Integer(XPath.NODETYPE_NODE));
- m_functions.put((FUNC_DOCLOCATION_STRING).intern(), new
Integer(XPath.FUNC_DOCLOCATION));
+ m_functions.put(new StringKey(FUNC_DOCLOCATION_STRING), new
Integer(XPath.FUNC_DOCLOCATION));
}
/**
1.7 +1 -13
xml-xalan/src/org/apache/xalan/xpath/xml/FormatterToHTML.java
Index: FormatterToHTML.java
===================================================================
RCS file:
/home/cvs/xml-xalan/src/org/apache/xalan/xpath/xml/FormatterToHTML.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- FormatterToHTML.java 1999/11/29 06:27:45 1.6
+++ FormatterToHTML.java 1999/12/02 06:04:07 1.7
@@ -267,19 +267,7 @@
if(m_shouldNotWriteXMLHeader == false)
{
- String encoding = this.m_encoding;
- if(null == encoding)
- {
- try
- {
- encoding = System.getProperty("file.encoding");
- encoding = FormatterToXML.convertJava2MimeEncoding( encoding );
- }
- catch(SecurityException se)
- {
- encoding = "ISO-8859-1";
- }
- }
+ String encoding = getMimeEncoding(this.m_encoding);
String version = (null == m_version) ? "1.0" : m_version;
1.8 +51 -57
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.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FormatterToXML.java 1999/11/29 06:27:45 1.7
+++ FormatterToXML.java 1999/12/02 06:04:07 1.8
@@ -280,30 +280,12 @@
// Determine the last printable character based on the output format
m_maxCharacter = format.getLastPrintable();
- String encoding = format.getEncoding();
- if(null == encoding)
- {
- try
- {
- encoding = System.getProperty("file.encoding");
- encoding = (null != encoding) ?
- FormatterToXML.convertJava2MimeEncoding( encoding ) :
DEFAULT_MIME_ENCODING;
- if(null == encoding)
- {
- encoding = DEFAULT_MIME_ENCODING;
- }
- }
- catch(SecurityException se)
- {
- encoding = DEFAULT_MIME_ENCODING;
- }
- }
-
- this.m_encoding = encoding;
+ if(null == this.m_encoding)
+ this.m_encoding = getMimeEncoding(format.getEncoding());
- m_isUTF8 = encoding.equals(DEFAULT_MIME_ENCODING);
+ m_isUTF8 = this.m_encoding.equals(DEFAULT_MIME_ENCODING);
- Object maxCharObj = s_revsize.get(encoding.toUpperCase());
+ Object maxCharObj = s_revsize.get(this.m_encoding.toUpperCase());
if(null != maxCharObj)
{
Character maxChar = (Character)maxCharObj;
@@ -324,29 +306,10 @@
*/
public synchronized void init( OutputStream output, OutputFormat format )
throws UnsupportedEncodingException
- {
- String encoding = format.getEncoding();
- if(null == encoding)
- {
- try
- {
- encoding = System.getProperty("file.encoding");
- encoding = (null != encoding) ?
- FormatterToXML.convertJava2MimeEncoding( encoding ) :
DEFAULT_MIME_ENCODING;
- if(null == encoding)
- {
- encoding = DEFAULT_MIME_ENCODING;
- }
- }
- catch(SecurityException se)
- {
- encoding = DEFAULT_MIME_ENCODING;
- }
- }
-
- this.m_encoding = encoding;
+ {
+ this.m_encoding = getMimeEncoding(format.getEncoding());
- String javaEncoding = this.convertMime2JavaEncoding(encoding);
+ String javaEncoding = this.convertMime2JavaEncoding(this.m_encoding);
init( new OutputStreamWriter( output, javaEncoding ), format );
}
@@ -379,19 +342,7 @@
if(m_shouldNotWriteXMLHeader == false)
{
- String encoding = this.m_encoding;
- if(null == encoding)
- {
- try
- {
- encoding = System.getProperty("file.encoding");
- encoding = FormatterToXML.convertJava2MimeEncoding( encoding );
- }
- catch(SecurityException se)
- {
- encoding = "ISO-8859-1";
- }
- }
+ String encoding = getMimeEncoding(this.m_encoding);
String version = (null == m_version) ? "1.0" : m_version;
@@ -1534,6 +1485,49 @@
return "UTF-8";
return javaEncodingIsISO ? encoding :
(String)s_revhash.get(encoding.toUpperCase());
+ }
+
+ /**
+ * Get the proper mime encoding. From the XSLT recommendation: "The
encoding
+ * attribute specifies the preferred encoding to use for outputting the
result
+ * tree. XSLT processors are required to respect values of UTF-8 and
UTF-16.
+ * For other values, if the XSLT processor does not support the specified
+ * encoding it may signal an error; if it does not signal an error it
should
+ * use UTF-8 or UTF-16 instead. The XSLT processor must not use an
encoding
+ * whose name does not match the EncName production of the XML
Recommendation
+ * [XML]. If no encoding attribute is specified, then the XSLT processor
should
+ * use either UTF-8 or UTF-16."
+ */
+ String getMimeEncoding(String encoding)
+ {
+ if(null == encoding)
+ {
+ try
+ {
+ // Get the default system character encoding. This may be
+ // incorrect if they passed in a writer, but right now there
+ // seems to be no way to get the encoding from a writer.
+ encoding = System.getProperty("file.encoding");
+
+ /*
+ * See if the mime type is equal to UTF8. If you don't
+ * do that, then convertJava2MimeEncoding will convert
+ * 8859_1 to "ISO-8859-1", which is not what we want,
+ * I think, and I don't think I want to alter the tables
+ * to convert everything to UTF-8.
+ */
+ encoding = (encoding.equals("Cp1252") ||
+ encoding.equals("ISO8859_1") ||
+ encoding.equals("8859_1") ||
+ encoding.equals("UTF8"))
+ ? "UTF-8" : FormatterToXML.convertJava2MimeEncoding(
encoding );
+ }
+ catch(SecurityException se)
+ {
+ encoding = "UTF-8";
+ }
+ }
+ return encoding;
}
1.2 +8 -0
xml-xalan/src/org/apache/xalan/xpath/xml/StringVector.java
Index: StringVector.java
===================================================================
RCS file:
/home/cvs/xml-xalan/src/org/apache/xalan/xpath/xml/StringVector.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StringVector.java 1999/11/30 16:51:16 1.1
+++ StringVector.java 1999/12/02 06:04:07 1.2
@@ -97,6 +97,14 @@
}
/**
+ * Get the length of the list.
+ */
+ public final int size()
+ {
+ return m_firstFree;
+ }
+
+ /**
* Append a string onto the vector.
*/
public final void addElement(String value)
1.11 +120 -120 xml-xalan/src/org/apache/xalan/xslt/Stylesheet.java
Index: Stylesheet.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/Stylesheet.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Stylesheet.java 1999/12/01 06:20:43 1.10
+++ Stylesheet.java 1999/12/02 06:04:08 1.11
@@ -1984,142 +1984,142 @@
Hashtable attributeKeys = new Hashtable();
// String pre = m_XSLNameSpaceURL+":";
-
elementKeys.put((Constants.ELEMNAME_APPLY_TEMPLATES_STRING).intern(), new
Integer(Constants.ELEMNAME_APPLY_TEMPLATES));
- elementKeys.put((Constants.ELEMNAME_WITHPARAM_STRING).intern(), new
Integer(Constants.ELEMNAME_WITHPARAM));
- elementKeys.put((Constants.ELEMNAME_CONSTRUCT_STRING).intern(), new
Integer(Constants.ELEMNAME_CONSTRUCT));
- elementKeys.put((Constants.ELEMNAME_CONTENTS_STRING).intern(), new
Integer(Constants.ELEMNAME_CONTENTS));
- elementKeys.put((Constants.ELEMNAME_COPY_STRING).intern(), new
Integer(Constants.ELEMNAME_COPY));
- elementKeys.put((Constants.ELEMNAME_COPY_OF_STRING).intern(), new
Integer(Constants.ELEMNAME_COPY_OF));
+ elementKeys.put(new
StringKey(Constants.ELEMNAME_APPLY_TEMPLATES_STRING), new
Integer(Constants.ELEMNAME_APPLY_TEMPLATES));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_WITHPARAM_STRING),
new Integer(Constants.ELEMNAME_WITHPARAM));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_CONSTRUCT_STRING),
new Integer(Constants.ELEMNAME_CONSTRUCT));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_CONTENTS_STRING),
new Integer(Constants.ELEMNAME_CONTENTS));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_COPY_STRING), new
Integer(Constants.ELEMNAME_COPY));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_COPY_OF_STRING),
new Integer(Constants.ELEMNAME_COPY_OF));
- elementKeys.put((Constants.ELEMNAME_ATTRIBUTESET_STRING).intern(),
new Integer(Constants.ELEMNAME_DEFINEATTRIBUTESET));
+ elementKeys.put(new
StringKey(Constants.ELEMNAME_ATTRIBUTESET_STRING), new
Integer(Constants.ELEMNAME_DEFINEATTRIBUTESET));
- elementKeys.put((Constants.ELEMNAME_USE_STRING).intern(), new
Integer(Constants.ELEMNAME_USE));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_USE_STRING), new
Integer(Constants.ELEMNAME_USE));
- elementKeys.put((Constants.ELEMNAME_VARIABLE_STRING).intern(), new
Integer(Constants.ELEMNAME_VARIABLE));
- elementKeys.put((Constants.ELEMNAME_PARAMVARIABLE_STRING).intern(),
new Integer(Constants.ELEMNAME_PARAMVARIABLE));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_VARIABLE_STRING),
new Integer(Constants.ELEMNAME_VARIABLE));
+ elementKeys.put(new
StringKey(Constants.ELEMNAME_PARAMVARIABLE_STRING), new
Integer(Constants.ELEMNAME_PARAMVARIABLE));
- elementKeys.put((Constants.ELEMNAME_DISPLAYIF_STRING).intern(), new
Integer(Constants.ELEMNAME_DISPLAYIF));
- elementKeys.put((Constants.ELEMNAME_EMPTY_STRING).intern(), new
Integer(Constants.ELEMNAME_EMPTY));
- elementKeys.put((Constants.ELEMNAME_EVAL_STRING).intern(), new
Integer(Constants.ELEMNAME_EVAL));
- elementKeys.put((Constants.ELEMNAME_CALLTEMPLATE_STRING).intern(),
new Integer(Constants.ELEMNAME_CALLTEMPLATE));
- elementKeys.put((Constants.ELEMNAME_TEMPLATE_STRING).intern(), new
Integer(Constants.ELEMNAME_TEMPLATE));
- elementKeys.put((Constants.ELEMNAME_STYLESHEET_STRING).intern(), new
Integer(Constants.ELEMNAME_STYLESHEET));
- elementKeys.put((Constants.ELEMNAME_TRANSFORM_STRING).intern(), new
Integer(Constants.ELEMNAME_STYLESHEET));
- elementKeys.put((Constants.ELEMNAME_IMPORT_STRING).intern(), new
Integer(Constants.ELEMNAME_IMPORT));
- elementKeys.put((Constants.ELEMNAME_INCLUDE_STRING).intern(), new
Integer(Constants.ELEMNAME_INCLUDE));
- elementKeys.put((Constants.ELEMNAME_FOREACH_STRING).intern(), new
Integer(Constants.ELEMNAME_FOREACH));
- elementKeys.put((Constants.ELEMNAME_VALUEOF_STRING).intern(), new
Integer(Constants.ELEMNAME_VALUEOF));
- elementKeys.put((Constants.ELEMNAME_KEY_STRING).intern(), new
Integer(Constants.ELEMNAME_KEY));
- elementKeys.put((Constants.ELEMNAME_STRIPSPACE_STRING).intern(), new
Integer(Constants.ELEMNAME_STRIPSPACE));
- elementKeys.put((Constants.ELEMNAME_PRESERVESPACE_STRING).intern(),
new Integer(Constants.ELEMNAME_PRESERVESPACE));
- elementKeys.put((Constants.ELEMNAME_NUMBER_STRING).intern(), new
Integer(Constants.ELEMNAME_NUMBER));
- elementKeys.put((Constants.ELEMNAME_IF_STRING).intern(), new
Integer(Constants.ELEMNAME_IF));
- elementKeys.put((Constants.ELEMNAME_CHOOSE_STRING).intern(), new
Integer(Constants.ELEMNAME_CHOOSE));
- elementKeys.put((Constants.ELEMNAME_WHEN_STRING).intern(), new
Integer(Constants.ELEMNAME_WHEN));
- elementKeys.put((Constants.ELEMNAME_OTHERWISE_STRING).intern(), new
Integer(Constants.ELEMNAME_OTHERWISE));
- elementKeys.put((Constants.ELEMNAME_TEXT_STRING).intern(), new
Integer(Constants.ELEMNAME_TEXT));
- elementKeys.put((Constants.ELEMNAME_ELEMENT_STRING).intern(), new
Integer(Constants.ELEMNAME_ELEMENT));
- elementKeys.put((Constants.ELEMNAME_ATTRIBUTE_STRING).intern(), new
Integer(Constants.ELEMNAME_ATTRIBUTE));
- elementKeys.put((Constants.ELEMNAME_SORT_STRING).intern(), new
Integer(Constants.ELEMNAME_SORT));
- elementKeys.put((Constants.ELEMNAME_PI_STRING).intern(), new
Integer(Constants.ELEMNAME_PI));
- elementKeys.put((Constants.ELEMNAME_COMMENT_STRING).intern(), new
Integer(Constants.ELEMNAME_COMMENT));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_DISPLAYIF_STRING),
new Integer(Constants.ELEMNAME_DISPLAYIF));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_EMPTY_STRING), new
Integer(Constants.ELEMNAME_EMPTY));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_EVAL_STRING), new
Integer(Constants.ELEMNAME_EVAL));
+ elementKeys.put(new
StringKey(Constants.ELEMNAME_CALLTEMPLATE_STRING), new
Integer(Constants.ELEMNAME_CALLTEMPLATE));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_TEMPLATE_STRING),
new Integer(Constants.ELEMNAME_TEMPLATE));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_STYLESHEET_STRING),
new Integer(Constants.ELEMNAME_STYLESHEET));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_TRANSFORM_STRING),
new Integer(Constants.ELEMNAME_STYLESHEET));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_IMPORT_STRING), new
Integer(Constants.ELEMNAME_IMPORT));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_INCLUDE_STRING),
new Integer(Constants.ELEMNAME_INCLUDE));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_FOREACH_STRING),
new Integer(Constants.ELEMNAME_FOREACH));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_VALUEOF_STRING),
new Integer(Constants.ELEMNAME_VALUEOF));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_KEY_STRING), new
Integer(Constants.ELEMNAME_KEY));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_STRIPSPACE_STRING),
new Integer(Constants.ELEMNAME_STRIPSPACE));
+ elementKeys.put(new
StringKey(Constants.ELEMNAME_PRESERVESPACE_STRING), new
Integer(Constants.ELEMNAME_PRESERVESPACE));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_NUMBER_STRING), new
Integer(Constants.ELEMNAME_NUMBER));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_IF_STRING), new
Integer(Constants.ELEMNAME_IF));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_CHOOSE_STRING), new
Integer(Constants.ELEMNAME_CHOOSE));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_WHEN_STRING), new
Integer(Constants.ELEMNAME_WHEN));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_OTHERWISE_STRING),
new Integer(Constants.ELEMNAME_OTHERWISE));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_TEXT_STRING), new
Integer(Constants.ELEMNAME_TEXT));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_ELEMENT_STRING),
new Integer(Constants.ELEMNAME_ELEMENT));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_ATTRIBUTE_STRING),
new Integer(Constants.ELEMNAME_ATTRIBUTE));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_SORT_STRING), new
Integer(Constants.ELEMNAME_SORT));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_PI_STRING), new
Integer(Constants.ELEMNAME_PI));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_COMMENT_STRING),
new Integer(Constants.ELEMNAME_COMMENT));
- elementKeys.put((Constants.ELEMNAME_COUNTER_STRING).intern(), new
Integer(Constants.ELEMNAME_COUNTER));
- elementKeys.put((Constants.ELEMNAME_COUNTERS_STRING).intern(), new
Integer(Constants.ELEMNAME_COUNTERS));
-
elementKeys.put((Constants.ELEMNAME_COUNTERINCREMENT_STRING).intern(), new
Integer(Constants.ELEMNAME_COUNTERINCREMENT));
- elementKeys.put((Constants.ELEMNAME_COUNTERRESET_STRING).intern(),
new Integer(Constants.ELEMNAME_COUNTERRESET ));
- elementKeys.put((Constants.ELEMNAME_COUNTERSCOPE_STRING).intern(),
new Integer(Constants.ELEMNAME_COUNTERSCOPE ));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_COUNTER_STRING),
new Integer(Constants.ELEMNAME_COUNTER));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_COUNTERS_STRING),
new Integer(Constants.ELEMNAME_COUNTERS));
+ elementKeys.put(new
StringKey(Constants.ELEMNAME_COUNTERINCREMENT_STRING), new
Integer(Constants.ELEMNAME_COUNTERINCREMENT));
+ elementKeys.put(new
StringKey(Constants.ELEMNAME_COUNTERRESET_STRING), new
Integer(Constants.ELEMNAME_COUNTERRESET ));
+ elementKeys.put(new
StringKey(Constants.ELEMNAME_COUNTERSCOPE_STRING), new
Integer(Constants.ELEMNAME_COUNTERSCOPE ));
- elementKeys.put((Constants.ELEMNAME_APPLY_IMPORTS_STRING).intern(),
new Integer(Constants.ELEMNAME_APPLY_IMPORTS ));
+ elementKeys.put(new
StringKey(Constants.ELEMNAME_APPLY_IMPORTS_STRING), new
Integer(Constants.ELEMNAME_APPLY_IMPORTS ));
- elementKeys.put((Constants.ELEMNAME_EXTENSION_STRING).intern(), new
Integer(Constants.ELEMNAME_EXTENSION));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_EXTENSION_STRING),
new Integer(Constants.ELEMNAME_EXTENSION));
- elementKeys.put((Constants.ELEMNAME_MESSAGE_STRING).intern(), new
Integer(Constants.ELEMNAME_MESSAGE));
- elementKeys.put((Constants.ELEMNAME_LOCALE_STRING).intern(), new
Integer(Constants.ELEMNAME_LOCALE));
- elementKeys.put((Constants.ELEMNAME_FALLBACK_STRING).intern(), new
Integer(Constants.ELEMNAME_FALLBACK));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_MESSAGE_STRING),
new Integer(Constants.ELEMNAME_MESSAGE));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_LOCALE_STRING), new
Integer(Constants.ELEMNAME_LOCALE));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_FALLBACK_STRING),
new Integer(Constants.ELEMNAME_FALLBACK));
- elementKeys.put((Constants.ELEMNAME_DECIMALFORMAT_STRING).intern(),
new Integer(Constants.ELEMNAME_DECIMALFORMAT));
+ elementKeys.put(new
StringKey(Constants.ELEMNAME_DECIMALFORMAT_STRING), new
Integer(Constants.ELEMNAME_DECIMALFORMAT));
- elementKeys.put((Constants.ELEMNAME_OUTPUT_STRING).intern(), new
Integer(Constants.ELEMNAME_OUTPUT));
- elementKeys.put((Constants.ELEMNAME_NSALIAS_STRING).intern(), new
Integer(Constants.ELEMNAME_NSALIAS));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_OUTPUT_STRING), new
Integer(Constants.ELEMNAME_OUTPUT));
+ elementKeys.put(new StringKey(Constants.ELEMNAME_NSALIAS_STRING),
new Integer(Constants.ELEMNAME_NSALIAS));
//
elementKeys.put(m_XSLT4JNameSpaceURL+":"+Constants.ELEMNAME_EXTENSIONHANDLER_STRING,
new Integer(Constants.ELEMNAME_EXTENSIONHANDLER));
- //
m_XSLT4JElementKeys.put((Constants.ELEMNAME_EXTENSION_STRING).intern(), new
Integer(Constants.ELEMNAME_EXTENSION));
-
m_XSLT4JElementKeys.put(Constants.ELEMNAME_CSSSTYLECONVERSION_STRING, new
Integer(Constants.ELEMNAME_CSSSTYLECONVERSION));
+ // m_XSLT4JElementKeys.put(new
StringKey(Constants.ELEMNAME_EXTENSION_STRING).intern(), new
Integer(Constants.ELEMNAME_EXTENSION));
+ m_XSLT4JElementKeys.put(new
StringKey(Constants.ELEMNAME_CSSSTYLECONVERSION_STRING), new
Integer(Constants.ELEMNAME_CSSSTYLECONVERSION));
-
m_XSLT4JElementKeys.put((Constants.ELEMNAME_COMPONENT_STRING).intern(), new
Integer(Constants.ELEMNAME_COMPONENT));
+ m_XSLT4JElementKeys.put(new
StringKey(Constants.ELEMNAME_COMPONENT_STRING), new
Integer(Constants.ELEMNAME_COMPONENT));
m_XSLT4JElementKeys.put(Constants.ELEMNAME_SCRIPT_STRING, new
Integer(Constants.ELEMNAME_SCRIPT));
- attributeKeys.put((Constants.ATTRNAME_OUTPUT_METHOD).intern(), new
Integer(Constants.TATTRNAME_OUTPUT_METHOD));
- attributeKeys.put((Constants.ATTRNAME_AMOUNT).intern(), new
Integer(Constants.TATTRNAME_AMOUNT));
- attributeKeys.put((Constants.ATTRNAME_ANCESTOR).intern(), new
Integer(Constants.TATTRNAME_ANCESTOR));
- attributeKeys.put((Constants.ATTRNAME_ARCHIVE).intern(), new
Integer(Constants.TATTRNAME_ARCHIVE));
- attributeKeys.put((Constants.ATTRNAME_ATTRIBUTE).intern(), new
Integer(Constants.TATTRNAME_ATTRIBUTE));
- attributeKeys.put((Constants.ATTRNAME_ATTRIBUTE_SET).intern(), new
Integer(Constants.TATTRNAME_ATTRIBUTE_SET));
- attributeKeys.put((Constants.ATTRNAME_CASEORDER).intern(), new
Integer(Constants.TATTRNAME_CASEORDER));
- attributeKeys.put((Constants.ATTRNAME_CLASS).intern(), new
Integer(Constants.TATTRNAME_CLASS));
- attributeKeys.put((Constants.ATTRNAME_CLASSID).intern(), new
Integer(Constants.TATTRNAME_CLASSID));
- attributeKeys.put((Constants.ATTRNAME_CODEBASE).intern(), new
Integer(Constants.TATTRNAME_CODEBASE));
- attributeKeys.put((Constants.ATTRNAME_CODETYPE).intern(), new
Integer(Constants.TATTRNAME_CODETYPE));
- attributeKeys.put((Constants.ATTRNAME_CONDITION).intern(), new
Integer(Constants.TATTRNAME_CONDITION));
- attributeKeys.put((Constants.ATTRNAME_COPYTYPE).intern(), new
Integer(Constants.TATTRNAME_COPYTYPE));
- attributeKeys.put((Constants.ATTRNAME_COUNT).intern(), new
Integer(Constants.TATTRNAME_COUNT));
- attributeKeys.put((Constants.ATTRNAME_DATATYPE).intern(), new
Integer(Constants.TATTRNAME_DATATYPE));
- attributeKeys.put((Constants.ATTRNAME_DEFAULT).intern(), new
Integer(Constants.TATTRNAME_DEFAULT));
- attributeKeys.put((Constants.ATTRNAME_DEFAULTSPACE).intern(), new
Integer(Constants.TATTRNAME_DEFAULTSPACE));
- attributeKeys.put((Constants.ATTRNAME_DEPTH).intern(), new
Integer(Constants.TATTRNAME_DEPTH));
- attributeKeys.put((Constants.ATTRNAME_DIGITGROUPSEP).intern(), new
Integer(Constants.TATTRNAME_DIGITGROUPSEP));
-
attributeKeys.put((Constants.ATTRNAME_DISABLE_OUTPUT_ESCAPING).intern(), new
Integer(Constants.TATTRNAME_DISABLE_OUTPUT_ESCAPING));
- attributeKeys.put((Constants.ATTRNAME_ELEMENT).intern(), new
Integer(Constants.TATTRNAME_ELEMENT));
- attributeKeys.put((Constants.ATTRNAME_ELEMENTS).intern(), new
Integer(Constants.TATTRNAME_ELEMENTS));
- attributeKeys.put((Constants.ATTRNAME_EXPR).intern(), new
Integer(Constants.TATTRNAME_EXPR));
-
attributeKeys.put((Constants.ATTRNAME_EXTENSIONELEMENTPREFIXES).intern(), new
Integer(Constants.TATTRNAME_EXTENSIONELEMENTPREFIXES));
- attributeKeys.put((Constants.ATTRNAME_FORMAT).intern(), new
Integer(Constants.TATTRNAME_FORMAT));
- attributeKeys.put((Constants.ATTRNAME_FROM).intern(), new
Integer(Constants.TATTRNAME_FROM));
- attributeKeys.put((Constants.ATTRNAME_GROUPINGSEPARATOR).intern(),
new Integer(Constants.TATTRNAME_GROUPINGSEPARATOR));
- attributeKeys.put((Constants.ATTRNAME_GROUPINGSIZE).intern(), new
Integer(Constants.TATTRNAME_GROUPINGSIZE));
- attributeKeys.put((Constants.ATTRNAME_HREF).intern(), new
Integer(Constants.TATTRNAME_HREF));
- attributeKeys.put((Constants.ATTRNAME_ID).intern(), new
Integer(Constants.TATTRNAME_ID));
- attributeKeys.put((Constants.ATTRNAME_IMPORTANCE).intern(), new
Integer(Constants.TATTRNAME_IMPORTANCE));
- attributeKeys.put((Constants.ATTRNAME_INDENTRESULT).intern(), new
Integer(Constants.TATTRNAME_INDENTRESULT));
- attributeKeys.put((Constants.ATTRNAME_LANG).intern(), new
Integer(Constants.TATTRNAME_LANG));
- attributeKeys.put((Constants.ATTRNAME_LETTERVALUE).intern(), new
Integer(Constants.TATTRNAME_LETTERVALUE));
- attributeKeys.put((Constants.ATTRNAME_LEVEL).intern(), new
Integer(Constants.TATTRNAME_LEVEL));
- attributeKeys.put((Constants.ATTRNAME_MATCH).intern(), new
Integer(Constants.TATTRNAME_MATCH));
- attributeKeys.put((Constants.ATTRNAME_METHOD).intern(), new
Integer(Constants.TATTRNAME_METHOD));
- attributeKeys.put((Constants.ATTRNAME_MODE).intern(), new
Integer(Constants.TATTRNAME_MODE));
- attributeKeys.put((Constants.ATTRNAME_NAME).intern(), new
Integer(Constants.TATTRNAME_NAME));
- attributeKeys.put((Constants.ATTRNAME_NAMESPACE).intern(), new
Integer(Constants.TATTRNAME_NAMESPACE));
- attributeKeys.put((Constants.ATTRNAME_NDIGITSPERGROUP).intern(), new
Integer(Constants.TATTRNAME_NDIGITSPERGROUP));
- attributeKeys.put((Constants.ATTRNAME_NS).intern(), new
Integer(Constants.TATTRNAME_NS));
- attributeKeys.put((Constants.ATTRNAME_ONLY).intern(), new
Integer(Constants.TATTRNAME_ONLY));
- attributeKeys.put((Constants.ATTRNAME_ORDER).intern(), new
Integer(Constants.TATTRNAME_ORDER));
-
attributeKeys.put((Constants.ATTRNAME_OUTPUT_CDATA_SECTION_ELEMENTS).intern(),
new Integer(Constants.TATTRNAME_OUTPUT_CDATA_SECTION_ELEMENTS));
-
attributeKeys.put((Constants.ATTRNAME_OUTPUT_DOCTYPE_PUBLIC).intern(), new
Integer(Constants.TATTRNAME_OUTPUT_DOCTYPE_PUBLIC));
-
attributeKeys.put((Constants.ATTRNAME_OUTPUT_DOCTYPE_SYSTEM).intern(), new
Integer(Constants.TATTRNAME_OUTPUT_DOCTYPE_SYSTEM));
- attributeKeys.put((Constants.ATTRNAME_OUTPUT_ENCODING).intern(), new
Integer(Constants.TATTRNAME_OUTPUT_ENCODING));
- attributeKeys.put((Constants.ATTRNAME_OUTPUT_INDENT).intern(), new
Integer(Constants.TATTRNAME_OUTPUT_INDENT));
- attributeKeys.put((Constants.ATTRNAME_OUTPUT_MEDIATYPE).intern(),
new Integer(Constants.TATTRNAME_OUTPUT_MEDIATYPE));
- attributeKeys.put((Constants.ATTRNAME_OUTPUT_STANDALONE).intern(),
new Integer(Constants.TATTRNAME_OUTPUT_STANDALONE));
- attributeKeys.put((Constants.ATTRNAME_OUTPUT_VERSION).intern(), new
Integer(Constants.TATTRNAME_OUTPUT_VERSION));
- attributeKeys.put((Constants.ATTRNAME_OUTPUT_OMITXMLDECL).intern(),
new Integer(Constants.TATTRNAME_OUTPUT_OMITXMLDECL));
- attributeKeys.put((Constants.ATTRNAME_PRIORITY).intern(), new
Integer(Constants.TATTRNAME_PRIORITY));
- attributeKeys.put((Constants.ATTRNAME_REFID).intern(), new
Integer(Constants.TATTRNAME_REFID));
- attributeKeys.put((Constants.ATTRNAME_RESULTNS).intern(), new
Integer(Constants.TATTRNAME_RESULTNS));
- attributeKeys.put((Constants.ATTRNAME_SELECT).intern(), new
Integer(Constants.TATTRNAME_SELECT));
- attributeKeys.put((Constants.ATTRNAME_SEQUENCESRC).intern(), new
Integer(Constants.TATTRNAME_SEQUENCESRC));
- attributeKeys.put((Constants.ATTRNAME_STYLE).intern(), new
Integer(Constants.TATTRNAME_STYLE));
- attributeKeys.put((Constants.ATTRNAME_TEST).intern(), new
Integer(Constants.TATTRNAME_TEST));
- attributeKeys.put((Constants.ATTRNAME_TOSTRING).intern(), new
Integer(Constants.TATTRNAME_TOSTRING));
- attributeKeys.put((Constants.ATTRNAME_TYPE).intern(), new
Integer(Constants.TATTRNAME_TYPE));
- attributeKeys.put((Constants.ATTRNAME_USE).intern(), new
Integer(Constants.TATTRNAME_USE));
- attributeKeys.put((Constants.ATTRNAME_USEATTRIBUTESETS).intern(),
new Integer(Constants.TATTRNAME_USEATTRIBUTESETS));
- attributeKeys.put((Constants.ATTRNAME_VALUE).intern(), new
Integer(Constants.TATTRNAME_VALUE));
-
- attributeKeys.put((Constants.ATTRNAME_XMLNSDEF).intern(), new
Integer(Constants.TATTRNAME_XMLNSDEF));
- attributeKeys.put((Constants.ATTRNAME_XMLNS).intern(), new
Integer(Constants.TATTRNAME_XMLNS));
- attributeKeys.put((Constants.ATTRNAME_XMLSPACE).intern(), new
Integer(Constants.TATTRNAME_XMLSPACE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_OUTPUT_METHOD),
new Integer(Constants.TATTRNAME_OUTPUT_METHOD));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_AMOUNT), new
Integer(Constants.TATTRNAME_AMOUNT));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_ANCESTOR), new
Integer(Constants.TATTRNAME_ANCESTOR));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_ARCHIVE), new
Integer(Constants.TATTRNAME_ARCHIVE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_ATTRIBUTE), new
Integer(Constants.TATTRNAME_ATTRIBUTE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_ATTRIBUTE_SET),
new Integer(Constants.TATTRNAME_ATTRIBUTE_SET));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_CASEORDER), new
Integer(Constants.TATTRNAME_CASEORDER));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_CLASS), new
Integer(Constants.TATTRNAME_CLASS));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_CLASSID), new
Integer(Constants.TATTRNAME_CLASSID));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_CODEBASE), new
Integer(Constants.TATTRNAME_CODEBASE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_CODETYPE), new
Integer(Constants.TATTRNAME_CODETYPE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_CONDITION), new
Integer(Constants.TATTRNAME_CONDITION));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_COPYTYPE), new
Integer(Constants.TATTRNAME_COPYTYPE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_COUNT), new
Integer(Constants.TATTRNAME_COUNT));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_DATATYPE), new
Integer(Constants.TATTRNAME_DATATYPE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_DEFAULT), new
Integer(Constants.TATTRNAME_DEFAULT));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_DEFAULTSPACE),
new Integer(Constants.TATTRNAME_DEFAULTSPACE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_DEPTH), new
Integer(Constants.TATTRNAME_DEPTH));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_DIGITGROUPSEP),
new Integer(Constants.TATTRNAME_DIGITGROUPSEP));
+ attributeKeys.put(new
StringKey(Constants.ATTRNAME_DISABLE_OUTPUT_ESCAPING), new
Integer(Constants.TATTRNAME_DISABLE_OUTPUT_ESCAPING));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_ELEMENT), new
Integer(Constants.TATTRNAME_ELEMENT));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_ELEMENTS), new
Integer(Constants.TATTRNAME_ELEMENTS));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_EXPR), new
Integer(Constants.TATTRNAME_EXPR));
+ attributeKeys.put(new
StringKey(Constants.ATTRNAME_EXTENSIONELEMENTPREFIXES), new
Integer(Constants.TATTRNAME_EXTENSIONELEMENTPREFIXES));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_FORMAT), new
Integer(Constants.TATTRNAME_FORMAT));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_FROM), new
Integer(Constants.TATTRNAME_FROM));
+ attributeKeys.put(new
StringKey(Constants.ATTRNAME_GROUPINGSEPARATOR), new
Integer(Constants.TATTRNAME_GROUPINGSEPARATOR));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_GROUPINGSIZE),
new Integer(Constants.TATTRNAME_GROUPINGSIZE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_HREF), new
Integer(Constants.TATTRNAME_HREF));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_ID), new
Integer(Constants.TATTRNAME_ID));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_IMPORTANCE), new
Integer(Constants.TATTRNAME_IMPORTANCE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_INDENTRESULT),
new Integer(Constants.TATTRNAME_INDENTRESULT));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_LANG), new
Integer(Constants.TATTRNAME_LANG));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_LETTERVALUE), new
Integer(Constants.TATTRNAME_LETTERVALUE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_LEVEL), new
Integer(Constants.TATTRNAME_LEVEL));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_MATCH), new
Integer(Constants.TATTRNAME_MATCH));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_METHOD), new
Integer(Constants.TATTRNAME_METHOD));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_MODE), new
Integer(Constants.TATTRNAME_MODE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_NAME), new
Integer(Constants.TATTRNAME_NAME));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_NAMESPACE), new
Integer(Constants.TATTRNAME_NAMESPACE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_NDIGITSPERGROUP),
new Integer(Constants.TATTRNAME_NDIGITSPERGROUP));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_NS), new
Integer(Constants.TATTRNAME_NS));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_ONLY), new
Integer(Constants.TATTRNAME_ONLY));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_ORDER), new
Integer(Constants.TATTRNAME_ORDER));
+ attributeKeys.put(new
StringKey(Constants.ATTRNAME_OUTPUT_CDATA_SECTION_ELEMENTS), new
Integer(Constants.TATTRNAME_OUTPUT_CDATA_SECTION_ELEMENTS));
+ attributeKeys.put(new
StringKey(Constants.ATTRNAME_OUTPUT_DOCTYPE_PUBLIC), new
Integer(Constants.TATTRNAME_OUTPUT_DOCTYPE_PUBLIC));
+ attributeKeys.put(new
StringKey(Constants.ATTRNAME_OUTPUT_DOCTYPE_SYSTEM), new
Integer(Constants.TATTRNAME_OUTPUT_DOCTYPE_SYSTEM));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_OUTPUT_ENCODING),
new Integer(Constants.TATTRNAME_OUTPUT_ENCODING));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_OUTPUT_INDENT),
new Integer(Constants.TATTRNAME_OUTPUT_INDENT));
+ attributeKeys.put(new
StringKey(Constants.ATTRNAME_OUTPUT_MEDIATYPE), new
Integer(Constants.TATTRNAME_OUTPUT_MEDIATYPE));
+ attributeKeys.put(new
StringKey(Constants.ATTRNAME_OUTPUT_STANDALONE), new
Integer(Constants.TATTRNAME_OUTPUT_STANDALONE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_OUTPUT_VERSION),
new Integer(Constants.TATTRNAME_OUTPUT_VERSION));
+ attributeKeys.put(new
StringKey(Constants.ATTRNAME_OUTPUT_OMITXMLDECL), new
Integer(Constants.TATTRNAME_OUTPUT_OMITXMLDECL));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_PRIORITY), new
Integer(Constants.TATTRNAME_PRIORITY));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_REFID), new
Integer(Constants.TATTRNAME_REFID));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_RESULTNS), new
Integer(Constants.TATTRNAME_RESULTNS));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_SELECT), new
Integer(Constants.TATTRNAME_SELECT));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_SEQUENCESRC), new
Integer(Constants.TATTRNAME_SEQUENCESRC));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_STYLE), new
Integer(Constants.TATTRNAME_STYLE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_TEST), new
Integer(Constants.TATTRNAME_TEST));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_TOSTRING), new
Integer(Constants.TATTRNAME_TOSTRING));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_TYPE), new
Integer(Constants.TATTRNAME_TYPE));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_USE), new
Integer(Constants.TATTRNAME_USE));
+ attributeKeys.put(new
StringKey(Constants.ATTRNAME_USEATTRIBUTESETS), new
Integer(Constants.TATTRNAME_USEATTRIBUTESETS));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_VALUE), new
Integer(Constants.TATTRNAME_VALUE));
+
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_XMLNSDEF), new
Integer(Constants.TATTRNAME_XMLNSDEF));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_XMLNS), new
Integer(Constants.TATTRNAME_XMLNS));
+ attributeKeys.put(new StringKey(Constants.ATTRNAME_XMLSPACE), new
Integer(Constants.TATTRNAME_XMLSPACE));
m_attributeKeys = attributeKeys;
m_elementKeys = elementKeys;
1.16 +8 -2 xml-xalan/src/org/apache/xalan/xslt/XSLTEngineImpl.java
Index: XSLTEngineImpl.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/XSLTEngineImpl.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- XSLTEngineImpl.java 1999/12/01 20:08:50 1.15
+++ XSLTEngineImpl.java 1999/12/02 06:04:08 1.16
@@ -2324,12 +2324,13 @@
* Translate CSS attributes and put them in a style tag.
* @deprecated
*/
+ /*
void translateCSSAttrsToStyleAttr(AttributeListImpl attList)
{
if(m_translateCSS)
{
String styleAttrValueString = null;
- Vector toBeRemoved = new Vector();
+ StringVector toBeRemoved = new StringVector();
int nAttributes = attList.getLength();
for(int i = 0; i < nAttributes; i++)
{
@@ -2350,7 +2351,7 @@
int nAttrsToRemove = toBeRemoved.size();
for(int i = 0; i < nAttrsToRemove; i++)
{
- attList.removeAttribute((String)toBeRemoved.elementAt(i));
+ attList.removeAttribute(toBeRemoved.elementAt(i));
}
if(null != styleAttrValueString)
{
@@ -2358,12 +2359,14 @@
}
}
}
+ */
/**
* Returns whether or not an attribute key
* is a CSS2 attribute.
* @deprecated
*/
+ /*
protected boolean isCSSAttribute(String name)
{
if(null == m_cssKeys)
@@ -2373,6 +2376,7 @@
}
return (null != m_cssKeys.get(name));
}
+ */
/**
* Stuff a hash table with CSS2 keys & dummy values
@@ -2384,6 +2388,7 @@
* left.
* @deprecated
*/
+ /*
protected void initCSS2Table()
{
Integer dummyVal = new Integer(1);
@@ -2503,6 +2508,7 @@
m_cssKeys.put("word-spacing", dummyVal);
m_cssKeys.put("z-index", dummyVal);
}
+ */
//==========================================================
// SECTION: Functions for controling whitespace
1.5 +6 -1 xml-xalan/src/org/apache/xalan/xslt/XSLTProcessor.java
Index: XSLTProcessor.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/XSLTProcessor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XSLTProcessor.java 1999/11/28 04:25:14 1.4
+++ XSLTProcessor.java 1999/12/02 06:04:08 1.5
@@ -212,7 +212,12 @@
/**
* Push a top-level stylesheet parameter. This value can
- * be evaluated via xsl:param-variable.
+ * be evaluated via xsl:param-variable. Note that the value
+ * passed is an expression, and not a string. This means that
+ * setStylesheetParam("foo", "hello"); will look for the
+ * element "hello". If you want to pass a string, you'll
+ * need to put quotes around it:
+ * setStylesheetParam("foo", "'hello'"); will look for the
* @param key The name of the param.
* @param expression An expression that will be evaluated.
*/