public class StylesheetImpl extends AbstractStylesheet
Modifier and Type | Field and Description |
---|---|
protected boolean |
_defaultDisableEscaping |
protected java.util.HashMap |
templates |
char[] |
text |
_errorPage, _output, _stylesheet, _uriResolver
CACHE_DEPENDS, DEPENDS, GLOBAL_PARAM
Constructor and Description |
---|
StylesheetImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
_xsl_init(XslWriter out,
org.w3c.dom.Node context,
Env env) |
protected void |
addFunction(java.lang.String name,
XPathFun fun) |
void |
anyNumber(XslWriter out,
org.w3c.dom.Node node,
Env env,
AbstractPattern countPattern,
AbstractPattern fromPattern,
XslNumberFormat format) |
void |
applyNode(XslWriter out,
org.w3c.dom.Node node,
Env env) |
protected void |
applyNode(XslWriter out,
org.w3c.dom.Node node,
Env env,
int min,
int max) |
protected void |
applyNodeDefault(XslWriter out,
org.w3c.dom.Node node,
Env env)
The default rule when no templates match.
|
protected void |
copy(AbstractStylesheet stylesheet)
Copies the current stylesheet into the new stylesheet.
|
void |
exprNumber(XslWriter out,
org.w3c.dom.Node node,
Env env,
Expr expr,
XslNumberFormat format) |
boolean |
getGenerateLocation() |
java.lang.String |
getNodeValue(org.w3c.dom.Node node) |
OutputFormat |
getOutputFormat() |
java.lang.Object |
getProperty(java.lang.String name)
Returns a stylesheet property.
|
protected Template |
getTemplate(java.util.HashMap templates,
org.w3c.dom.Node node,
Env env,
int min,
int max)
Gets a template.
|
void |
init(Path path)
Initialize the stylesheet with the search path.
|
protected static Template[] |
mergeTemplates(Template[] star,
Template[] templates)
Merges two template arrays into the final one.
|
void |
multiNumber(XslWriter out,
org.w3c.dom.Node node,
Env env,
AbstractPattern countPattern,
AbstractPattern fromPattern,
XslNumberFormat format) |
protected org.w3c.dom.Document |
ownerDocument(org.w3c.dom.Node node) |
void |
printValue(XslWriter out,
org.w3c.dom.Node node) |
void |
setGenerateLocation(boolean generateLocation) |
void |
setOutputFormat(OutputFormat output) |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets a stylesheet property.
|
protected void |
setSpaces(java.util.HashMap<java.lang.String,java.lang.String> preserve,
java.util.HashMap<java.lang.String,java.lang.String> preservePrefix,
java.util.HashMap<java.lang.String,java.lang.String> strip,
java.util.HashMap<java.lang.String,java.lang.String> stripPrefix) |
void |
singleNumber(XslWriter out,
org.w3c.dom.Node node,
Env env,
AbstractPattern countPattern,
AbstractPattern fromPattern,
XslNumberFormat format) |
void |
transform(org.w3c.dom.Node xml,
XMLWriter writer,
TransformerImpl transformer)
Transforms the input node to the output writer
|
protected java.util.ArrayList |
xslSort(org.w3c.dom.Node node,
Env env,
AbstractPattern pattern,
Sort[] sortList) |
addCacheDepend, addDepend, clone, getCacheDepends, getDepends, getOutputProperties, getPath, getURIResolver, isModified, newTransformer, setURIResolver
public char[] text
protected java.util.HashMap templates
protected boolean _defaultDisableEscaping
protected void copy(AbstractStylesheet stylesheet)
AbstractStylesheet
copy
in class AbstractStylesheet
stylesheet
- the new stylesheet which will contain the copied values.public OutputFormat getOutputFormat()
public void setOutputFormat(OutputFormat output)
protected void setSpaces(java.util.HashMap<java.lang.String,java.lang.String> preserve, java.util.HashMap<java.lang.String,java.lang.String> preservePrefix, java.util.HashMap<java.lang.String,java.lang.String> strip, java.util.HashMap<java.lang.String,java.lang.String> stripPrefix)
public void setProperty(java.lang.String name, java.lang.Object value)
AbstractStylesheet
setProperty
in class AbstractStylesheet
public void setGenerateLocation(boolean generateLocation)
public boolean getGenerateLocation()
public java.lang.Object getProperty(java.lang.String name)
AbstractStylesheet
getProperty
in class AbstractStylesheet
protected void addFunction(java.lang.String name, XPathFun fun)
public void init(Path path) throws java.lang.Exception
AbstractStylesheet
init
in class AbstractStylesheet
path
- the path of the stylepath used to search for stylesheets.java.lang.Exception
public void transform(org.w3c.dom.Node xml, XMLWriter writer, TransformerImpl transformer) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.transform.TransformerException
transform
in class AbstractStylesheet
xml
- the input node to be transformedwriter
- output writer receiving the outputtransformer
- the transformer to be usedorg.xml.sax.SAXException
java.io.IOException
javax.xml.transform.TransformerException
protected void _xsl_init(XslWriter out, org.w3c.dom.Node context, Env env) throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document ownerDocument(org.w3c.dom.Node node)
public void applyNode(XslWriter out, org.w3c.dom.Node node, Env env) throws java.lang.Exception
java.lang.Exception
protected void applyNode(XslWriter out, org.w3c.dom.Node node, Env env, int min, int max) throws java.lang.Exception
java.lang.Exception
protected Template getTemplate(java.util.HashMap templates, org.w3c.dom.Node node, Env env, int min, int max) throws XPathException
min
- minimum allowed importancemax
- maximum allowed importanceXPathException
protected void applyNodeDefault(XslWriter out, org.w3c.dom.Node node, Env env) throws java.lang.Exception
out
- the current writer.node
- the current node.env
- the xpath environment.java.lang.Exception
public void printValue(XslWriter out, org.w3c.dom.Node node) throws java.io.IOException
java.io.IOException
public java.lang.String getNodeValue(org.w3c.dom.Node node)
protected java.util.ArrayList xslSort(org.w3c.dom.Node node, Env env, AbstractPattern pattern, Sort[] sortList) throws java.lang.Exception
java.lang.Exception
public void singleNumber(XslWriter out, org.w3c.dom.Node node, Env env, AbstractPattern countPattern, AbstractPattern fromPattern, XslNumberFormat format) throws java.lang.Exception
java.lang.Exception
public void multiNumber(XslWriter out, org.w3c.dom.Node node, Env env, AbstractPattern countPattern, AbstractPattern fromPattern, XslNumberFormat format) throws java.lang.Exception
java.lang.Exception
public void anyNumber(XslWriter out, org.w3c.dom.Node node, Env env, AbstractPattern countPattern, AbstractPattern fromPattern, XslNumberFormat format) throws java.lang.Exception
java.lang.Exception
public void exprNumber(XslWriter out, org.w3c.dom.Node node, Env env, Expr expr, XslNumberFormat format) throws java.lang.Exception
java.lang.Exception