|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.utils.UnImplNode org.apache.xalan.templates.ElemTemplateElement org.apache.xalan.templates.OutputProperties
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.
Field Summary | |
private static Properties |
m_html_properties
The default properties when method="html". |
private Properties |
m_properties
The output properties. |
private Hashtable |
m_propertiesLevels
This ugly field is used during recomposition to track the import precedence at which each attribute was first specified, so we can flag errors about values being set multiple time at the same precedence level. |
private static Integer |
m_synch_object
Synchronization object for lazy initialization of the above tables. |
private static Properties |
m_text_properties
The default properties when method="text". |
private static Properties |
m_xml_properties
The default properties of all output files. |
private static Class[] |
NO_CLASSES
a zero length Class array used in loadPropertiesFile() |
private static Object[] |
NO_OBJS
a zero length Object array used in loadPropertiesFile() |
(package private) static String |
S_BUILTIN_EXTENSIONS_UNIVERSAL
Built-in extensions namespace, reexpressed in {namespaceURI} syntax suitable for prepending to a localname to produce a "universal name". |
(package private) static String |
S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL
The old built-in extension namespace |
(package private) static int |
S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL_LEN
|
static String |
S_KEY_CONTENT_HANDLER
Fully qualified name of class with a default constructor that implements the ContentHandler interface, where the result tree events will be sent to. |
static String |
S_KEY_ENTITIES
File name of file that specifies character to entity reference mappings. |
static String |
S_KEY_INDENT_AMOUNT
The number of whitespaces to indent by, if indent="yes". |
static String |
S_OMIT_META_TAG
Use a value of "yes" if the META tag should be omitted where it would otherwise be supplied. |
static String |
S_USE_URL_ESCAPING
Use a value of "yes" if the href values for HTML serialization should use %xx escaping. |
(package private) static String |
S_XALAN_PREFIX
|
(package private) static int |
S_XALAN_PREFIX_LEN
|
(package private) static String |
S_XSLT_PREFIX
|
(package private) static int |
S_XSLT_PREFIX_LEN
|
Fields inherited from class org.apache.xalan.templates.ElemTemplateElement |
m_docOrderNumber, m_firstChild, m_hasVariableDecl, m_nextSibling, m_parentNode, m_prefixTable |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
OutputProperties()
Creates an empty OutputProperties with no default values. |
|
OutputProperties(Properties defaults)
Creates an empty OutputProperties with the specified defaults. |
|
OutputProperties(String method)
Creates an empty OutputProperties with the defaults specified by a property file. |
Method Summary | |
private void |
checkDuplicates(OutputProperties newProps)
Check to see if a set of properties is at the same import level as the last set of properties set that was passed as an argument to this method. |
Object |
clone()
Clone this OutputProperties, including a clone of the wrapped Properties reference. |
void |
compose(StylesheetRoot sroot)
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. |
void |
copyFrom(OutputProperties opsrc)
Copy the keys and values from the source to this object. |
void |
copyFrom(Properties src)
Copy the keys and values from the source to this object. |
void |
copyFrom(Properties src,
boolean shouldResetDefaults)
Copy the keys and values from the source to this object. |
private static String |
fixupPropertyString(String s,
boolean doClipping)
Fix up a string in an output properties file according to the rules of loadPropertiesFile(java.lang.String, java.util.Properties) . |
boolean |
getBooleanProperty(QName key)
Searches for the boolean property with the specified key in the property list. |
boolean |
getBooleanProperty(String key)
Searches for the boolean property with the specified key in the property list. |
static boolean |
getBooleanProperty(String key,
Properties props)
Searches for the boolean property with the specified key in the property list. |
static Properties |
getDefaultMethodProperties(String method)
Creates an empty OutputProperties with the defaults specified by a property file. |
int |
getIntProperty(QName key)
Searches for the int property with the specified key in the property list. |
int |
getIntProperty(String key)
Searches for the int property with the specified key in the property list. |
static int |
getIntProperty(String key,
Properties props)
Searches for the int property with the specified key in the property list. |
Properties |
getProperties()
Get the Properties object that this class wraps. |
String |
getProperty(QName key)
Searches for the property with the specified key in the property list. |
String |
getProperty(String key)
Searches for the property with the specified key in the property list. |
Vector |
getQNameProperties(QName key)
Searches for the list of qname properties with the specified key in the property list. |
Vector |
getQNameProperties(String key)
Searches for the list of qname properties with the specified key in the property list. |
static Vector |
getQNameProperties(String key,
Properties props)
Searches for the list of qname properties with the specified key in the property list. |
QName |
getQNameProperty(QName key)
Searches for the qname property with the specified key in the property list. |
QName |
getQNameProperty(String key)
Searches for the qname property with the specified key in the property list. |
static QName |
getQNameProperty(String key,
Properties props)
Searches for the qname property with the specified key in the property list. |
boolean |
isLegalPropertyKey(String key)
Report if the key given as an argument is a legal xsl:output key. |
private static Properties |
loadPropertiesFile(String resourceName,
Properties defaults)
Load the properties file from a resource stream. |
void |
recompose(StylesheetRoot root)
This function is called to recompose all of the output format extended elements. |
void |
setBooleanProperty(QName key,
boolean value)
Set an output property. |
void |
setBooleanProperty(String key,
boolean value)
Set an output property. |
void |
setIntProperty(QName key,
int value)
Set an output property. |
void |
setIntProperty(String key,
int value)
Set an output property. |
void |
setMethodDefaults(String method)
Reset the default properties based on the method. |
void |
setProperty(QName key,
String value)
Set an output property. |
void |
setProperty(String key,
String value)
Set an output property. |
void |
setQNameProperties(QName key,
Vector v)
Set an output property with a QName list value. |
void |
setQNameProperties(String key,
Vector v)
Set an output property with a QName list value. |
void |
setQNameProperty(QName key,
QName value)
Set an output property with a QName value. |
void |
setQNameProperty(String key,
QName value)
Set an output property with a QName value. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final String S_XSLT_PREFIX
static final int S_XSLT_PREFIX_LEN
static final String S_XALAN_PREFIX
static final int S_XALAN_PREFIX_LEN
static final String S_BUILTIN_EXTENSIONS_UNIVERSAL
static final String S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL
static final int S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL_LEN
private transient Hashtable m_propertiesLevels
StylesheetRoot
object.
private Properties m_properties
public static String S_KEY_INDENT_AMOUNT
public static String S_KEY_CONTENT_HANDLER
public static String S_KEY_ENTITIES
public static String S_USE_URL_ESCAPING
public static String S_OMIT_META_TAG
private static Properties m_xml_properties
private static Properties m_html_properties
private static Properties m_text_properties
private static Integer m_synch_object
private static final Class[] NO_CLASSES
private static final Object[] NO_OBJS
Constructor Detail |
public OutputProperties()
public OutputProperties(Properties defaults)
defaults
- the defaults.public OutputProperties(String method)
At the moment, anything other than 'text', 'xml', and 'html', will use the output_xml.properties file.
method
- non-null reference to method name.Method Detail |
private static String fixupPropertyString(String s, boolean doClipping)
loadPropertiesFile(java.lang.String, java.util.Properties)
.
s
- non-null reference to string that may need to be fixed up.
private static Properties loadPropertiesFile(String resourceName, Properties defaults) throws IOException
resourceName
- non-null reference to resource name.defaults
- Default properties, which may be null.
IOException
public static Properties getDefaultMethodProperties(String method)
At the moment, anything other than 'text', 'xml', and 'html', will use the output_xml.properties file.
method
- non-null reference to method name.
public Object clone()
clone
in class Object
Cloneable
public void setProperty(QName key, String value)
key
- the key to be placed into the property list.value
- the value corresponding to key.OutputKeys
public void setProperty(String key, String value)
key
- the key to be placed into the property list.value
- the value corresponding to key.OutputKeys
public String getProperty(QName key)
null
if the property is not found.
key
- the property key.
public String getProperty(String key)
null
if the property is not found.
key
- the property key.
public void setBooleanProperty(QName key, boolean value)
key
- the key to be placed into the property list.value
- the value corresponding to key.OutputKeys
public void setBooleanProperty(String key, boolean value)
key
- the key to be placed into the property list.value
- the value corresponding to key.OutputKeys
public boolean getBooleanProperty(QName key)
false
if the property is not found, or if the value is other
than "yes".
key
- the property key.
public boolean getBooleanProperty(String key)
false
if the property is not found, or if the value is other
than "yes".
key
- the property key.
public static boolean getBooleanProperty(String key, Properties props)
false
if the property is not found, or if the value is other
than "yes".
key
- the property key.props
- the list of properties that will be searched.
public void setIntProperty(QName key, int value)
key
- the key to be placed into the property list.value
- the value corresponding to key.OutputKeys
public void setIntProperty(String key, int value)
key
- the key to be placed into the property list.value
- the value corresponding to key.OutputKeys
public int getIntProperty(QName key)
false
if the property is not found, or if the value is other
than "yes".
key
- the property key.
public int getIntProperty(String key)
false
if the property is not found, or if the value is other
than "yes".
key
- the property key.
public static int getIntProperty(String key, Properties props)
false
if the property is not found, or if the value is other
than "yes".
key
- the property key.props
- the list of properties that will be searched.
public void setQNameProperty(QName key, QName value)
key
- the key to be placed into the property list.value
- the value corresponding to key.OutputKeys
public void setMethodDefaults(String method)
method
- the method value.OutputKeys
public void setQNameProperty(String key, QName value)
key
- the key to be placed into the property list.value
- the value corresponding to key.OutputKeys
public QName getQNameProperty(QName key)
null
if the property is not found.
key
- the property key.
public QName getQNameProperty(String key)
null
if the property is not found.
key
- the property key.
public static QName getQNameProperty(String key, Properties props)
null
if the property is not found.
key
- the property key.props
- the list of properties to search in.
public void setQNameProperties(QName key, Vector v)
key
- the key to be placed into the property list.v
- non-null list of QNames corresponding to key.OutputKeys
public void setQNameProperties(String key, Vector v)
key
- the key to be placed into the property list.v
- non-null list of QNames corresponding to key.OutputKeys
public Vector getQNameProperties(QName key)
null
if the property is not found.
key
- the property key.
public Vector getQNameProperties(String key)
null
if the property is not found.
key
- the property key.
public static Vector getQNameProperties(String key, Properties props)
null
if the property is not found.
key
- the property key.props
- the list of properties to search in.
public void recompose(StylesheetRoot root) throws javax.xml.transform.TransformerException
recompose
in class ElemTemplateElement
root
- non-null reference to the stylesheet root object.
javax.xml.transform.TransformerException
public void compose(StylesheetRoot sroot) throws javax.xml.transform.TransformerException
compose
in class ElemTemplateElement
javax.xml.transform.TransformerException
public Properties getProperties()
public void copyFrom(Properties src)
src
- non-null reference to the source properties.public void copyFrom(Properties src, boolean shouldResetDefaults)
src
- non-null reference to the source properties.shouldResetDefaults
- true if the defaults should be reset based on
the method property.public void copyFrom(OutputProperties opsrc) throws javax.xml.transform.TransformerException
opsrc
- non-null reference to an OutputProperties.
javax.xml.transform.TransformerException
private void checkDuplicates(OutputProperties newProps) throws javax.xml.transform.TransformerException
newProps
- non-null reference to OutputProperties that is about to
be added to this set.
javax.xml.transform.TransformerException
public boolean isLegalPropertyKey(String key)
key
- non-null reference to key name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |