jkesselm 00/11/09 10:31:22
Modified: java/src/org/apache/xalan/templates StylesheetRoot.java
Log:
Resynchronizing with trax changes
Revision Changes Path
1.18 +11 -5
xml-xalan/java/src/org/apache/xalan/templates/StylesheetRoot.java
Index: StylesheetRoot.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/templates/StylesheetRoot.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- StylesheetRoot.java 2000/11/08 20:23:19 1.17
+++ StylesheetRoot.java 2000/11/09 18:31:22 1.18
@@ -488,15 +488,18 @@
}
/**
- * Get a stylesheet from the global import list.
+ * Get a stylesheet from the global import list.
+ * TODO: JKESS PROPOSES SPECIAL-CASE FOR NO IMPORT LIST, TO MATCH COUNT.
+ *
+ * NEEDSDOC @param i
*
- * NEEDSDOC @param i
- *
* NEEDSDOC ($objectName$) @return
*/
public StylesheetComposed getGlobalImport(int i)
{
- return (StylesheetComposed) m_globalImportList.elementAt(i);
+ return (i==0)
+ ? this
+ : (StylesheetComposed) m_globalImportList.elementAt(i);
}
/**
@@ -504,10 +507,13 @@
* @return The total number of imported stylesheets, including
* the root stylesheet, thus the number will always be 1 or
* greater.
+ * TODO: JKESS PROPOSES SPECIAL-CASE FOR NO IMPORT LIST, TO MATCH
DESCRIPTION.
*/
public int getGlobalImportCount()
{
- return m_globalImportList.size();
+ return (m_globalImportList!=null)
+ ? m_globalImportList.size()
+ : 1;
}
/**