You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mm...@locus.apache.org on 2000/12/05 23:43:51 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/templates ElemLiteralResult.java NamespaceAlias.java Stylesheet.java StylesheetRoot.java
mmidy 00/12/05 14:43:50
Modified: java/src/org/apache/xalan/templates ElemLiteralResult.java
NamespaceAlias.java Stylesheet.java
StylesheetRoot.java
Log:
Update javadoc
Revision Changes Path
1.14 +153 -21 xml-xalan/java/src/org/apache/xalan/templates/ElemLiteralResult.java
Index: ElemLiteralResult.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemLiteralResult.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ElemLiteralResult.java 2000/12/02 00:28:17 1.13
+++ ElemLiteralResult.java 2000/12/05 22:43:47 1.14
@@ -94,10 +94,12 @@
private boolean isLiteralResultAsStylesheet = false;
/**
- * NEEDSDOC Method setIsLiteralResultAsStylesheet
+ * Set whether this element represents a root element
+ * that is also the stylesheet element.
*
*
- * NEEDSDOC @param b
+ * @param b boolean flag indicating whether this element
+ * represents a root element that is also the stylesheet element.
*/
public void setIsLiteralResultAsStylesheet(boolean b)
{
@@ -105,10 +107,12 @@
}
/**
- * NEEDSDOC Method getIsLiteralResultAsStylesheet
+ * Return whether this element represents a root element
+ * that is also the stylesheet element.
*
*
- * NEEDSDOC (getIsLiteralResultAsStylesheet) @return
+ * @return boolean flag indicating whether this element
+ * represents a root element that is also the stylesheet element.
*/
public boolean getIsLiteralResultAsStylesheet()
{
@@ -128,7 +132,7 @@
/**
* Set a literal result attribute (AVTs only).
*
- * NEEDSDOC @param avt
+ * @param avt literal result attribute to add (AVT only)
*/
public void addLiteralResultAttribute(AVT avt)
{
@@ -142,7 +146,7 @@
/**
* Set a literal result attribute (used for xsl attributes).
*
- * NEEDSDOC @param att
+ * @param att literal result attribute to add
*/
public void addLiteralResultAttribute(String att)
{
@@ -156,9 +160,9 @@
/**
* Get a literal result attribute by name.
*
- * NEEDSDOC @param name
+ * @param name Name of literal result attribute to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return literal result attribute (AVT)
*/
public AVT getLiteralResultAttribute(String name)
{
@@ -288,7 +292,7 @@
}
/**
- * The raw name of the element to be created.
+ * The local name of the element to be created.
*/
private String m_localName;
@@ -353,7 +357,7 @@
* Set the "extension-element-prefixes" property.
* @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v Vector of URI to set as the "extension-element-prefixes" property
*/
public void setExtensionElementPrefixes(StringVector v)
{
@@ -361,12 +365,12 @@
}
/**
- * Get and "extension-element-prefix" property.
+ * Get an "extension-element-prefix" property.
* @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of URI ("extension-element-prefix" property) to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return URI at given index ("extension-element-prefix" property)
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -384,7 +388,7 @@
* Get the number of "extension-element-prefixes" Strings.
* @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return the number of "extension-element-prefixes" Strings
*/
public int getExtensionElementPrefixCount()
{
@@ -393,12 +397,12 @@
}
/**
- * Get and "extension-element-prefix" property.
+ * Find out if the given "extension-element-prefix" property is defined.
* @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
*
- * NEEDSDOC @param uri
+ * @param uri The URI to find
*
- * NEEDSDOC ($objectName$) @return
+ * @return True if the given URI is found
*/
public boolean containsExtensionElementURI(String uri)
{
@@ -413,7 +417,7 @@
* Get an int constant identifying the type of element.
* @see org.apache.xalan.templates.Constants
*
- * NEEDSDOC ($objectName$) @return
+ * @return The token ID for this element
*/
public int getXSLToken()
{
@@ -423,7 +427,7 @@
/**
* Return the node name.
*
- * NEEDSDOC ($objectName$) @return
+ * @return The element's name
*/
public String getNodeName()
{
@@ -441,7 +445,7 @@
* Set the "version" property.
* @see <a href="http://www.w3.org/TR/xslt#forwards">forwards in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v Version property value to set
*/
public void setVersion(String v)
{
@@ -471,6 +475,133 @@
}
/**
+ * Tell if the result namespace decl should be excluded. Should be called before
+ * namespace aliasing (I think).
+ *
+ * @param prefix Prefix of namespace to check
+ * @param uri URI of namespace to check
+ *
+ * @return True if the given namespace should be excluded
+ *
+ * @throws TransformerException
+ */
+ private boolean excludeResultNSDecl(String prefix, String uri)
+ throws TransformerException
+ {
+
+ if (null != m_excludeResultPrefixes)
+ {
+ if (m_excludeResultPrefixes.contains(prefix))
+ return true;
+ }
+
+ return false;
+ }
+
+ /*
+ * Combine the parent's namespaces with this namespace
+ * for fast processing, taking care to reference the
+ * parent's namespace if this namespace adds nothing new.
+ * (Recursive method, walking the elements depth-first,
+ * processing parents before children).
+ * Overide super method to handle exclude-result-prefix attribute.
+ *
+ * @throws TransformerException
+ *
+ public void resolvePrefixTables() throws TransformerException
+ {
+
+ // Always start with a fresh prefix table!
+ m_prefixTable = null;
+
+ Vector m_declaredPrefixes = getDeclaredPrefixes();
+
+ // If we have declared declarations, then we look for
+ // a parent that has namespace decls, and add them
+ // to this element's decls. Otherwise we just point
+ // to the parent that has decls.
+ if (null != m_declaredPrefixes)
+ {
+
+ // Add this element's declared prefixes to the
+ // prefix table.
+ int n = m_declaredPrefixes.size();
+
+ for (int i = 0; i < n; i++)
+ {
+ XMLNSDecl decl = (XMLNSDecl) m_declaredPrefixes.elementAt(i);
+ String prefix = decl.getPrefix();
+ String uri = decl.getURI();
+ boolean shouldExclude = excludeResultNSDecl(prefix, uri);
+
+ // Create a new prefix table if one has not already been created.
+ if (null == m_prefixTable)
+ m_prefixTable = new Vector();
+
+ m_prefixTable.addElement(new XMLNSDecl(prefix, uri, shouldExclude));
+ }
+ }
+
+ ElemTemplateElement parent = (ElemTemplateElement) this.getParentNode();
+
+ if (null != parent)
+ {
+
+ // The prefix table of the parent should never be null!
+ Vector prefixes = parent.m_prefixTable;
+
+ if (null == m_excludeResultPrefixes && null == m_prefixTable)
+ {
+
+ // Nothing to combine, so just use parent's table!
+ this.m_prefixTable = parent.m_prefixTable;
+ }
+ else
+ {
+ if (null == m_prefixTable)
+ m_prefixTable = new Vector();
+
+ // Add the prefixes from the parent's prefix table.
+ int n = prefixes.size();
+
+ for (int i = 0; i < n; i++)
+ {
+ XMLNSDecl decl = (XMLNSDecl) prefixes.elementAt(i);
+ boolean isexcluded = decl.getIsExcluded();
+
+ if (!isexcluded)
+ {
+ boolean shouldExclude = excludeResultNSDecl(decl.getPrefix(),
+ decl.getURI());
+
+ if (shouldExclude != isexcluded)
+ {
+ decl = new XMLNSDecl(decl.getPrefix(), decl.getURI(),
+ shouldExclude);
+ }
+ }
+
+ m_prefixTable.addElement(decl);
+ }
+ }
+ }
+ else if (null == m_prefixTable)
+ {
+
+ // Must be stylesheet element without any result prefixes!
+ m_prefixTable = new Vector();
+ }
+
+ // Resolve the children's prefix tables.
+ for (ElemTemplateElement child = m_firstChild; child != null;
+ child = child.m_nextSibling)
+ {
+ child.resolvePrefixTables();
+ }
+ }
+ */
+
+ /**
* Copy a Literal Result Element into the Result tree, copy the
* non-excluded namespace attributes, copy the attributes not
* of the XSLT namespace, and execute the children of the LRE.
@@ -539,7 +670,8 @@
* Compiling templates requires that we be able to list the AVTs
* ADDED 9/5/2000 to support compilation experiment
*
- * NEEDSDOC ($objectName$) @return
+ * @return an Enumeration of the literal result attributes associated
+ * with this element.
*/
public Enumeration enumerateLiteralResultAttributes()
{
1.6 +5 -1 xml-xalan/java/src/org/apache/xalan/templates/NamespaceAlias.java
Index: NamespaceAlias.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/NamespaceAlias.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- NamespaceAlias.java 2000/12/03 19:27:25 1.5
+++ NamespaceAlias.java 2000/12/05 22:43:48 1.6
@@ -67,6 +67,8 @@
/**
* Constructor NamespaceAlias
+ *
+ * @param docOrderNumber The document order number
*
*/
public NamespaceAlias(int docOrderNumber)
@@ -158,7 +160,7 @@
/**
* Set the result namespace.
*
- * @param v non
+ * @param v non-null namespace value
*/
public void setResultNamespace(String v)
{
@@ -177,6 +179,8 @@
/**
* This function is called to recompose() all of the namespace alias properties elements.
+ *
+ * @param root The owning root stylesheet
*/
public void recompose(StylesheetRoot root)
{
1.19 +105 -104 xml-xalan/java/src/org/apache/xalan/templates/Stylesheet.java
Index: Stylesheet.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/Stylesheet.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Stylesheet.java 2000/12/02 00:28:17 1.18
+++ Stylesheet.java 2000/12/05 22:43:48 1.19
@@ -149,7 +149,7 @@
* inheritance chain until it calls getStylesheet
* on a Stylesheet object, which will return itself.
*
- * NEEDSDOC ($objectName$) @return
+ * @return The owning stylesheet, itself.
*/
public Stylesheet getStylesheet()
{
@@ -160,7 +160,7 @@
* Tell if this can be cast to a StylesheetComposed, meaning, you
* can ask questions from getXXXComposed functions.
*
- * NEEDSDOC ($objectName$) @return
+ * @return False if this is not a StylesheetComposed
*/
public boolean isAggregatedType()
{
@@ -170,7 +170,7 @@
/**
* Tell if this is the root of the stylesheet tree.
*
- * NEEDSDOC ($objectName$) @return
+ * @return False is this is not the root of the stylesheet tree.
*/
public boolean isRoot()
{
@@ -185,7 +185,7 @@
/**
* Read the stylesheet from a serialization stream.
*
- * NEEDSDOC @param stream
+ * @param stream Input stream to read from
*
* @throws IOException
* @throws TransformerException
@@ -208,10 +208,10 @@
}
/**
- * NEEDSDOC Method writeObject
+ * Write out the given output stream
*
*
- * NEEDSDOC @param stream
+ * @param stream The output stream to write out
*
* @throws IOException
*/
@@ -235,7 +235,7 @@
* Set the "xmlns:xsl" property.
* @see <a href="http://www.w3.org/TR/xslt#xslt-namespace">xslt-namespace in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v The value to be set for the "xmlns:xsl" property.
*/
public void setXmlnsXsl(String v)
{
@@ -246,7 +246,7 @@
* Get the "xmlns:xsl" property.
* @see <a href="http://www.w3.org/TR/xslt#xslt-namespace">xslt-namespace in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return The value of the "xmlns:xsl" property.
*/
public String getXmlnsXsl()
{
@@ -262,7 +262,8 @@
* Set the "extension-element-prefixes" property.
* @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v The value to be set for the "extension-element-prefixes"
+ * property: a vector of extension element URIs.
*/
public void setExtensionElementPrefixes(StringVector v)
{
@@ -273,9 +274,9 @@
* Get and "extension-element-prefix" property.
* @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of extension element URI in list
*
- * NEEDSDOC ($objectName$) @return
+ * @return The extension element URI at the given index
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -293,7 +294,7 @@
* Get the number of "extension-element-prefixes" Strings.
* @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return Number of URIs in the list
*/
public int getExtensionElementPrefixCount()
{
@@ -302,12 +303,12 @@
}
/**
- * Get and "extension-element-prefix" property.
+ * Find out if this contains a given "extension-element-prefix" property.
* @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
*
- * NEEDSDOC @param uri
+ * @param uri URI of extension element to look for
*
- * NEEDSDOC ($objectName$) @return
+ * @return True if the given URI was found in the list
*/
public boolean containsExtensionElementURI(String uri)
{
@@ -333,7 +334,7 @@
* imported or included by children of that xsl:stylesheet element.
* @see <a href="http://www.w3.org/TR/xslt#literal-result-element">literal-result-element in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v A StringVector of prefixes to exclude
*/
public void setExcludeResultPrefixes(StringVector v)
{
@@ -350,9 +351,9 @@
* imported or included by children of that xsl:stylesheet element.
* @see <a href="http://www.w3.org/TR/xslt#literal-result-element">literal-result-element in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of prefix to get in list
*
- * NEEDSDOC ($objectName$) @return
+ * @return Prefix to be excluded at the given index
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -367,10 +368,10 @@
}
/**
- * Get the number of "extension-element-prefixes" Strings.
- * @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
+ * Get the number of "exclude-result-prefixes" Strings.
+ * @see <a href="http://www.w3.org/TR/xslt#literal-result-element">literal-result-element in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return The number of prefix strings to be excluded.
*/
public int getExcludeResultPrefixCount()
{
@@ -379,13 +380,13 @@
}
/**
- * Get whether or not the passed URL is contained flagged by
- * the "extension-element-prefixes" property.
- * @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a>
+ * Get whether or not the passed prefix is contained flagged by
+ * the "exclude-result-prefixes" property.
+ * @see <a href="http://www.w3.org/TR/xslt#literal-result-element">literal-result-element in XSLT Specification</a>
*
* @param prefix non-null reference to prefix that might be excluded.
*
- * @return true if the prefix should normally be excluded.
+ * @return true if the prefix should normally be excluded.>
*/
public boolean containsExcludeResultPrefix(String prefix)
{
@@ -408,7 +409,7 @@
* Set the "id" property.
* @see <a href="http://www.w3.org/TR/xslt#section-Embedding-Stylesheets">section-Embedding-Stylesheets in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v Value for the "id" property.
*/
public void setId(String v)
{
@@ -419,7 +420,7 @@
* Get the "id" property.
* @see <a href="http://www.w3.org/TR/xslt#section-Embedding-Stylesheets">section-Embedding-Stylesheets in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return The value of the "id" property.
*/
public String getId()
{
@@ -435,7 +436,7 @@
* Set the "version" property.
* @see <a href="http://www.w3.org/TR/xslt#forwards">forwards in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v Value for the "version" property.
*/
public void setVersion(String v)
{
@@ -446,7 +447,7 @@
* Get the "version" property.
* @see <a href="http://www.w3.org/TR/xslt#forwards">forwards in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return The value of the "version" property.
*/
public String getVersion()
{
@@ -462,7 +463,7 @@
* Add a stylesheet to the "import" list.
* @see <a href="http://www.w3.org/TR/xslt#import">import in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v Stylesheet to add to the import list
*/
public void setImport(StylesheetComposed v)
{
@@ -479,9 +480,9 @@
* Get a stylesheet from the "import" list.
* @see <a href="http://www.w3.org/TR/xslt#import">import in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of the stylesheet to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return The stylesheet at the given index
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -499,7 +500,7 @@
* Get the number of imported stylesheets.
* @see <a href="http://www.w3.org/TR/xslt#import">import in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return the number of imported stylesheets.
*/
public int getImportCount()
{
@@ -512,10 +513,10 @@
private Vector m_includes;
/**
- * Set a "xsl:include" property.
+ * Add a stylesheet to the "include" list.
* @see <a href="http://www.w3.org/TR/xslt#include">include in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v Stylesheet to add to the "include" list
*/
public void setInclude(Stylesheet v)
{
@@ -527,12 +528,12 @@
}
/**
- * Get an "xsl:include" property.
+ * Get the stylesheet at the given in index in "include" list
* @see <a href="http://www.w3.org/TR/xslt#include">include in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of stylesheet to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return Stylesheet at the given index
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -549,7 +550,7 @@
* Get the number of included stylesheets.
* @see <a href="http://www.w3.org/TR/xslt#import">import in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return the number of included stylesheets.
*/
public int getIncludeCount()
{
@@ -565,7 +566,7 @@
/**
* Process the xsl:decimal-format element.
*
- * NEEDSDOC @param edf
+ * @param edf Decimal-format element to push into stack
*/
public void setDecimalFormat(DecimalFormatProperties edf)
{
@@ -612,9 +613,9 @@
* @see <a href="http://www.w3.org/TR/xslt#format-number">format-number in XSLT Specification</a>
* @see ElemDecimalFormat.
*
- * NEEDSDOC @param i
+ * @param i Index of decimal-format property in stack
*
- * NEEDSDOC ($objectName$) @return
+ * @return The decimal-format property at the given index
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -632,7 +633,7 @@
* Get the number of xsl:decimal-format declarations.
* @see ElemDecimalFormat.
*
- * NEEDSDOC ($objectName$) @return
+ * @return the number of xsl:decimal-format declarations.
*/
public int getDecimalFormatCount()
{
@@ -650,7 +651,7 @@
* Set the "xsl:strip-space" properties.
* @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param wsi WhiteSpaceInfo element to add to list
*/
public void setStripSpaces(WhiteSpaceInfo wsi)
{
@@ -667,9 +668,9 @@
* Get an "xsl:strip-space" property.
* @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of WhiteSpaceInfo to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return WhiteSpaceInfo at given index
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -686,7 +687,7 @@
* Get the number of "xsl:strip-space" properties.
* @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return the number of "xsl:strip-space" properties.
*/
public int getStripSpaceCount()
{
@@ -704,7 +705,7 @@
* Set the "xsl:preserve-space" property.
* @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param wsi WhiteSpaceInfo element to add to list
*/
public void setPreserveSpaces(WhiteSpaceInfo wsi)
{
@@ -721,9 +722,9 @@
* Get a "xsl:preserve-space" property.
* @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of WhiteSpaceInfo to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return WhiteSpaceInfo at the given index
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -740,7 +741,7 @@
* Get the number of "xsl:preserve-space" properties.
* @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return the number of "xsl:preserve-space" properties.
*/
public int getPreserveSpaceCount()
{
@@ -757,7 +758,7 @@
* Set the "xsl:output" property.
* @see <a href="http://www.w3.org/TR/xslt#output">output in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v OutputFormatExtended element to add to the list
*/
public void setOutput(OutputFormatExtended v)
{
@@ -773,9 +774,9 @@
* Get an "xsl:output" property.
* @see <a href="http://www.w3.org/TR/xslt#output">output in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of OutputFormatExtended to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return OutputFormatExtended at the given index
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -792,7 +793,7 @@
* Get the number of "xsl:output" properties.
* @see <a href="http://www.w3.org/TR/xslt#output">output in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return the number of "xsl:output" properties.
*/
public int getOutputCount()
{
@@ -809,7 +810,7 @@
* Set the "xsl:key" property.
* @see <a href="http://www.w3.org/TR/xslt#key">key in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v KeyDeclaration element to add to the list of key declarations
*/
public void setKey(KeyDeclaration v)
{
@@ -824,9 +825,9 @@
* Get an "xsl:key" property.
* @see <a href="http://www.w3.org/TR/xslt#key">key in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of KeyDeclaration element to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return KeyDeclaration element at given index in list
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -843,7 +844,7 @@
* Get the number of "xsl:key" properties.
* @see <a href="http://www.w3.org/TR/xslt#key">key in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return the number of "xsl:key" properties.
*/
public int getKeyCount()
{
@@ -859,7 +860,7 @@
* Set the "xsl:attribute-set" property.
* @see <a href="http://www.w3.org/TR/xslt#attribute-sets">attribute-sets in XSLT Specification</a>
*
- * NEEDSDOC @param attrSet
+ * @param attrSet ElemAttributeSet to add to the list of attribute sets
*/
public void setAttributeSet(ElemAttributeSet attrSet)
{
@@ -876,9 +877,9 @@
* Get an "xsl:attribute-set" property.
* @see <a href="http://www.w3.org/TR/xslt#attribute-sets">attribute-sets in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of ElemAttributeSet to get in list
*
- * NEEDSDOC ($objectName$) @return
+ * @return ElemAttributeSet at the given index
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -896,7 +897,7 @@
* Get the number of "xsl:attribute-set" properties.
* @see <a href="http://www.w3.org/TR/xslt#attribute-sets">attribute-sets in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return the number of "xsl:attribute-set" properties.
*/
public int getAttributeSetCount()
{
@@ -912,7 +913,7 @@
* Set the "xsl:variable" property.
* @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v ElemVariable object to add to list of top level variables
*/
public void setVariable(ElemVariable v)
{
@@ -927,9 +928,9 @@
* Get an "xsl:variable" or "xsl:param" property.
* @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a>
*
- * NEEDSDOC @param qname
+ * @param qname Qualified name of variable or param to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return The ElemVariable with the given name in the list or null
*/
public ElemVariable getVariableOrParam(QName qname)
{
@@ -955,9 +956,9 @@
* Get an "xsl:variable" property.
* @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a>
*
- * NEEDSDOC @param qname
+ * @param qname Qualified name of the xsl:variable to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return ElemVariable with the given name in the list or null
*/
public ElemVariable getVariable(QName qname)
{
@@ -982,9 +983,9 @@
* Get an "xsl:variable" property.
* @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of variable to get in the list
*
- * NEEDSDOC ($objectName$) @return
+ * @return ElemVariable at the given index in the list
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -1001,7 +1002,7 @@
* Get the number of "xsl:variable" properties.
* @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return the number of "xsl:variable" properties.
*/
public int getVariableOrParamCount()
{
@@ -1023,9 +1024,9 @@
* Get an "xsl:param" property.
* @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a>
*
- * NEEDSDOC @param qname
+ * @param qname The qualified name of the param to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return ElemParam with the given name in the list or null
*/
public ElemParam getParam(QName qname)
{
@@ -1055,7 +1056,7 @@
* Set an "xsl:template" property.
* @see <a href="http://www.w3.org/TR/xslt#section-Defining-Template-Rules">section-Defining-Template-Rules in XSLT Specification</a>
*
- * NEEDSDOC @param v
+ * @param v ElemTemplate to add to list of templates
*/
public void setTemplate(ElemTemplate v)
{
@@ -1071,9 +1072,9 @@
* Get an "xsl:template" property.
* @see <a href="http://www.w3.org/TR/xslt#section-Defining-Template-Rules">section-Defining-Template-Rules in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of ElemTemplate in the list to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return ElemTemplate at the given index in the list
*
* @throws TransformerException
*/
@@ -1090,7 +1091,7 @@
* Get the number of "xsl:template" properties.
* @see <a href="http://www.w3.org/TR/xslt#section-Defining-Template-Rules">section-Defining-Template-Rules in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return the number of "xsl:template" properties.
*/
public int getTemplateCount()
{
@@ -1106,7 +1107,7 @@
* Set the "xsl:namespace-alias" property.
* @see <a href="http://www.w3.org/TR/xslt#literal-result-element">literal-result-element in XSLT Specification</a>
*
- * NEEDSDOC @param na
+ * @param na NamespaceAlias elemeent to add to the list
*/
public void setNamespaceAlias(NamespaceAlias na)
{
@@ -1118,12 +1119,12 @@
}
/**
- * Get an "xsl:variable" property.
- * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a>
+ * Get an "xsl:namespace-alias" property.
+ * @see <a href="http://www.w3.org/TR/xslt#literal-result-element">literal-result-element in XSLT Specification</a>
*
- * NEEDSDOC @param i
+ * @param i Index of NamespaceAlias element to get from the list
*
- * NEEDSDOC ($objectName$) @return
+ * @return NamespaceAlias element at the given index in the list
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -1138,10 +1139,10 @@
}
/**
- * Get the number of "xsl:variable" properties.
+ * Get the number of "xsl:namespace-alias" properties.
* @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return the number of "xsl:namespace-alias" properties.
*/
public int getNamespaceAliasCount()
{
@@ -1154,11 +1155,11 @@
private Hashtable m_NonXslTopLevel;
/**
- * Set a found non-xslt element.
+ * Set found a non-xslt element.
* @see <a href="http://www.w3.org/TR/xslt#stylesheet-element">stylesheet-element in XSLT Specification</a>
*
- * NEEDSDOC @param name
- * NEEDSDOC @param obj
+ * @param name Qualified name of the element
+ * @param obj The element object
*/
public void setNonXslTopLevel(QName name, Object obj)
{
@@ -1173,9 +1174,9 @@
* Get a non-xslt element.
* @see <a href="http://www.w3.org/TR/xslt#stylesheet-element">stylesheet-element in XSLT Specification</a>
*
- * NEEDSDOC @param name
+ * @param name Qualified name of the element to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return The object associate with the given name
*/
public Object getNonXslTopLevel(QName name)
{
@@ -1190,16 +1191,16 @@
*/
private String m_href = null;
- /** NEEDSDOC Field m_publicId */
+ /** The doctype-public element */
private String m_publicId;
- /** NEEDSDOC Field m_systemId */
+ /** The doctype-system element */
private String m_systemId;
/**
* Get the base identifier with which this stylesheet is associated.
*
- * NEEDSDOC ($objectName$) @return
+ * @return the base identifier with which this stylesheet is associated.
*/
public String getHref()
{
@@ -1207,9 +1208,9 @@
}
/**
- * Get the base identifier with which this stylesheet is associated.
+ * Set the base identifier with which this stylesheet is associated.
*
- * NEEDSDOC @param baseIdent
+ * @param baseIdent the base identifier with which this stylesheet is associated.
*/
public void setHref(String baseIdent)
{
@@ -1219,7 +1220,7 @@
/**
* Set the location information for this element.
*
- * NEEDSDOC @param locator
+ * @param locator SourceLocator object with location information
*/
public void setLocaterInfo(SourceLocator locator)
{
@@ -1257,7 +1258,7 @@
* Get the root of the stylesheet, where all the tables common
* to all stylesheets are kept.
*
- * NEEDSDOC ($objectName$) @return
+ * @return the root of the stylesheet
*/
public StylesheetRoot getStylesheetRoot()
{
@@ -1268,7 +1269,7 @@
* Set the root of the stylesheet, where all the tables common
* to all stylesheets are kept.
*
- * NEEDSDOC @param v
+ * @param v the root of the stylesheet
*/
public void setStylesheetRoot(StylesheetRoot v)
{
@@ -1286,7 +1287,7 @@
* Get the parent of the stylesheet. This will be null if this
* is the root stylesheet.
*
- * NEEDSDOC ($objectName$) @return
+ * @return the parent of the stylesheet.
*/
public Stylesheet getStylesheetParent()
{
@@ -1297,7 +1298,7 @@
* Set the parent of the stylesheet. This should be null if this
* is the root stylesheet.
*
- * NEEDSDOC @param v
+ * @param v the parent of the stylesheet.
*/
public void setStylesheetParent(Stylesheet v)
{
@@ -1308,7 +1309,7 @@
* Get the owning aggregated stylesheet, or this
* stylesheet if it is aggregated.
*
- * NEEDSDOC ($objectName$) @return
+ * @return the owning aggregated stylesheet or itself
*/
public StylesheetComposed getStylesheetComposed()
{
@@ -1326,7 +1327,7 @@
/**
* Get the type of the node. We'll pretend we're a Document.
*
- * NEEDSDOC ($objectName$) @return
+ * @return the type of the node: document node.
*/
public short getNodeType()
{
@@ -1348,7 +1349,7 @@
/**
* Return the node name.
*
- * NEEDSDOC ($objectName$) @return
+ * @return The node name
*/
public String getNodeName()
{
@@ -1362,8 +1363,8 @@
* and replace the original with the compiled instance.
* ADDED 9/5/2000 to support compilation experiment
*
- * NEEDSDOC @param v
- * NEEDSDOC @param i
+ * @param v Compiled template to replace with
+ * @param i Index of template to be replaced
*
* @throws TransformerException
*/
1.28 +25 -18 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.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- StylesheetRoot.java 2000/12/05 16:33:43 1.27
+++ StylesheetRoot.java 2000/12/05 22:43:48 1.28
@@ -125,6 +125,8 @@
/**
* Creates a StylesheetRoot and retains a pointer to the schema used to create this
* StylesheetRoot. The schema may be needed later for an element-available() function call.
+ *
+ * @param schema The schema used to create this stylesheet
* @exception TransformerConfigurationException if the baseIdentifier can not be resolved to a URL.
*/
public StylesheetRoot(XSLTSchema schema) throws TransformerConfigurationException
@@ -138,7 +140,7 @@
/**
* Tell if this is the root of the stylesheet tree.
*
- * NEEDSDOC ($objectName$) @return
+ * @return True since this is the root of the stylesheet tree.
*/
public boolean isRoot()
{
@@ -342,7 +344,7 @@
/**
* Call the compose function for each ElemTemplateElement.
*
- * NEEDSDOC @param templ
+ * @param templ ElemTemplateElement to compose
*/
static void composeTemplates(ElemTemplateElement templ)
{
@@ -420,9 +422,9 @@
* Get a stylesheet from the global import list.
* TODO: JKESS PROPOSES SPECIAL-CASE FOR NO IMPORT LIST, TO MATCH COUNT.
*
- * NEEDSDOC @param i
+ * @param i Index of stylesheet to get from global import list
*
- * NEEDSDOC ($objectName$) @return
+ * @return The stylesheet at the given index
*/
public StylesheetComposed getGlobalImport(int i)
{
@@ -431,6 +433,7 @@
/**
* Get the total number of imports in the global import list.
+ *
* @return The total number of imported stylesheets, including
* the root stylesheet, thus the number will always be 1 or
* greater.
@@ -477,7 +480,7 @@
/**
* Recompose the output format object from the included elements.
*
- * NEEDSDOC @param stylesheet
+ * @param of OutputFormatExtended to recompose
*/
void recomposeOutput(OutputFormatExtended of)
{
@@ -493,7 +496,8 @@
* object, not a cloned object, like getOutputFormat does.
* @see <a href="http://www.w3.org/TR/xslt#output">output in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return the combined "xsl:output" property with the properties
+ * combined from the included stylesheets.
*/
public OutputFormat getOutputComposed()
{
@@ -503,14 +507,14 @@
return m_outputFormatComposed;
}
- /** NEEDSDOC Field m_outputMethodSet */
+ /** Flag indicating whether an output method has been set by the user */
private boolean m_outputMethodSet = false;
/**
* <meta name="usage" content="internal"/>
* Find out if an output method has been set by the user.
*
- * NEEDSDOC ($objectName$) @return
+ * @return Value indicating whether an output method has been set by the user
*/
public boolean isOutputMethodSet()
{
@@ -546,9 +550,9 @@
* Get a list "xsl:attribute-set" properties that match the qname.
* @see <a href="http://www.w3.org/TR/xslt#attribute-sets">attribute-sets in XSLT Specification</a>
*
- * NEEDSDOC @param name
+ * @param name Qualified name of attribute set properties to get
*
- * NEEDSDOC ($objectName$) @return
+ * @return A vector of attribute sets matching the given name
*
* @throws ArrayIndexOutOfBoundsException
*/
@@ -610,8 +614,9 @@
* <p>Which means, as far as I can tell, the decimal-format
* properties are not additive.</p>
*
- * NEEDSDOC @param name
- * @return null if name is not found.
+ * @param name Qualified name of the decimal format to find
+ * @return DecimalFormatSymbols object matching the given name or
+ * null if name is not found.
*/
public DecimalFormatSymbols getDecimalFormatComposed(QName name)
{
@@ -638,7 +643,7 @@
* Get the composed "xsl:key" properties.
* @see <a href="http://www.w3.org/TR/xslt#key">key in XSLT Specification</a>
*
- * NEEDSDOC ($objectName$) @return
+ * @return A vector of the composed "xsl:key" properties.
*/
public Vector getKeysComposed()
{
@@ -694,6 +699,7 @@
/**
* Accessor method to retrieve the <code>TemplateList</code> associated with
* this StylesheetRoot.
+ *
* @return The composed <code>TemplateList</code>.
*/
public final TemplateList getTemplateListComposed()
@@ -718,12 +724,13 @@
* well as this stylesheet.
* @see <a href="http://www.w3.org/TR/xslt#section-Defining-Template-Rules">section-Defining-Template-Rules in XSLT Specification</a>
*
- * NEEDSDOC @param support
- * NEEDSDOC @param targetNode
- * NEEDSDOC @param mode
- * NEEDSDOC @param quietConflictWarnings
+ * @param support The XPath runtime state.
+ * @param targetNode Node to match
+ * @param mode Template mode
+ * @param quietConflictWarnings Flag for conflict warnings
*
- * NEEDSDOC ($objectName$) @return
+ *
+ * @return The ElemTemplate matching the target node
*
* @throws TransformerException
*/