This class provides information from xsl:output elements. It is mainly
a wrapper for
Properties
, but can not extend that class
because it must be part of the
ElemTemplateElement
heararchy.
An OutputProperties list can contain another OutputProperties list as
its "defaults"; this second property list is searched if the property key
is not found in the original property list.
clone
public Object clone()
Clone this OutputProperties, including a clone of the wrapped Properties
reference.
- A new OutputProperties reference, mutation of which should not
effect this object.
compose
public void compose(StylesheetRoot sroot)
throws TransformerException
This function is called after everything else has been
recomposed, and allows the template to set remaining
values that may be based on some other property that
depends on recomposition.
- compose in interface ElemTemplateElement
copyFrom
public void copyFrom(Properties src)
Copy the keys and values from the source to this object. This will
not copy the default values. This is meant to be used by going from
a higher precedence object to a lower precedence object, so that if a
key already exists, this method will not reset it.
src
- non-null reference to the source properties.
copyFrom
public void copyFrom(Properties src,
boolean shouldResetDefaults)
Copy the keys and values from the source to this object. This will
not copy the default values. This is meant to be used by going from
a higher precedence object to a lower precedence object, so that if a
key already exists, this method will not reset it.
src
- non-null reference to the source properties.shouldResetDefaults
- true if the defaults should be reset based on
the method property.
copyFrom
public void copyFrom(OutputProperties opsrc)
throws TransformerException
Copy the keys and values from the source to this object. This will
not copy the default values. This is meant to be used by going from
a higher precedence object to a lower precedence object, so that if a
key already exists, this method will not reset it.
opsrc
- non-null reference to an OutputProperties.
getBooleanProperty
public boolean getBooleanProperty(String key)
Searches for the boolean property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
false
if the property is not found, or if the value is other
than "yes".
- the value in this property list as a boolean value, or false
if null or not "yes".
getBooleanProperty
public boolean getBooleanProperty(QName key)
Searches for the boolean property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
false
if the property is not found, or if the value is other
than "yes".
- the value in this property list as a boolean value, or false
if null or not "yes".
getDefaultMethodProperties
public static Properties getDefaultMethodProperties(String method)
Use org.apache.xml.serializer.OuputPropertiesFactory.
getDefaultMethodProperties directly.
Creates an empty OutputProperties with the defaults specified by
a property file. The method argument is used to construct a string of
the form output_[method].properties (for instance, output_html.properties).
The output_xml.properties file is always used as the base.
At the moment, anything other than 'text', 'xml', and 'html', will
use the output_xml.properties file.
method
- non-null reference to method name.
- Properties object that holds the defaults for the given method.
getIntProperty
public int getIntProperty(String key)
Searches for the int property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
false
if the property is not found, or if the value is other
than "yes".
- the value in this property list as a int value, or false
if null or not a number.
getIntProperty
public int getIntProperty(QName key)
Searches for the int property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
false
if the property is not found, or if the value is other
than "yes".
- the value in this property list as a int value, or false
if null or not a number.
getProperties
public Properties getProperties()
Get the Properties object that this class wraps.
- non-null reference to Properties object.
getProperty
public String getProperty(String key)
Searches for the property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
null
if the property is not found.
- the value in this property list with the specified key value.
getProperty
public String getProperty(QName key)
Searches for the property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
null
if the property is not found.
- the value in this property list with the specified key value.
getQNameProperties
public Vector getQNameProperties(String key)
Searches for the list of qname properties with the specified key in
the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
null
if the property is not found.
- the value in this property list as a vector of QNames, or false
if null or not "yes".
getQNameProperties
public static Vector getQNameProperties(String key,
Properties props)
Searches for the list of qname properties with the specified key in
the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
null
if the property is not found.
key
- the property key.props
- the list of properties to search in.
- the value in this property list as a vector of QNames, or false
if null or not "yes".
getQNameProperties
public Vector getQNameProperties(QName key)
Searches for the list of qname properties with the specified key in
the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
null
if the property is not found.
- the value in this property list as a vector of QNames, or false
if null or not "yes".
getQNameProperty
public QName getQNameProperty(String key)
Searches for the qname property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
null
if the property is not found.
- the value in this property list as a QName value, or false
if null or not "yes".
getQNameProperty
public static QName getQNameProperty(String key,
Properties props)
Searches for the qname property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
null
if the property is not found.
key
- the property key.props
- the list of properties to search in.
- the value in this property list as a QName value, or false
if null or not "yes".
getQNameProperty
public QName getQNameProperty(QName key)
Searches for the qname property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
null
if the property is not found.
- the value in this property list as a QName value, or false
if null or not "yes".
isLegalPropertyKey
public static boolean isLegalPropertyKey(String key)
Report if the key given as an argument is a legal xsl:output key.
key
- non-null reference to key name.
recompose
public void recompose(StylesheetRoot root)
throws TransformerException
This function is called to recompose all of the output format extended elements.
- recompose in interface ElemTemplateElement
root
- non-null reference to the stylesheet root object.
setBooleanProperty
public void setBooleanProperty(String key,
boolean value)
Set an output property.
key
- the key to be placed into the property list.value
- the value corresponding to key.
setBooleanProperty
public void setBooleanProperty(QName key,
boolean value)
Set an output property.
key
- the key to be placed into the property list.value
- the value corresponding to key.
setIntProperty
public void setIntProperty(String key,
int value)
Set an output property.
key
- the key to be placed into the property list.value
- the value corresponding to key.
setIntProperty
public void setIntProperty(QName key,
int value)
Set an output property.
key
- the key to be placed into the property list.value
- the value corresponding to key.
setMethodDefaults
public void setMethodDefaults(String method)
Reset the default properties based on the method.
method
- the method value.
setProperty
public void setProperty(String key,
String value)
Set an output property.
key
- the key to be placed into the property list.value
- the value corresponding to key.
setProperty
public void setProperty(QName key,
String value)
Set an output property.
key
- the key to be placed into the property list.value
- the value corresponding to key.
setQNameProperties
public void setQNameProperties(String key,
Vector v)
Set an output property with a QName list value. The QNames will be turned
into strings with the namespace in curly brackets.
key
- the key to be placed into the property list.v
- non-null list of QNames corresponding to key.
setQNameProperties
public void setQNameProperties(QName key,
Vector v)
Set an output property with a QName list value. The QNames will be turned
into strings with the namespace in curly brackets.
key
- the key to be placed into the property list.v
- non-null list of QNames corresponding to key.
setQNameProperty
public void setQNameProperty(String key,
QName value)
Set an output property with a QName value. The QName will be turned
into a string with the namespace in curly brackets.
key
- the key to be placed into the property list.value
- the value corresponding to key.
setQNameProperty
public void setQNameProperty(QName key,
QName value)
Set an output property with a QName value. The QName will be turned
into a string with the namespace in curly brackets.
key
- the key to be placed into the property list.value
- the value corresponding to key.