public class XslParser
extends java.lang.Object
XslParser
class contains methods for reading and saving XSL stylesheet files.Modifier and Type | Field and Description |
---|---|
static int |
INDENT
The size of indent used in output XSL files
|
Constructor and Description |
---|
XslParser() |
Modifier and Type | Method and Description |
---|---|
static org.w3c.dom.Document |
createXsltFile()
Creates a new DOM structure of an empty XSL stylesheet.
|
static org.w3c.dom.Document |
readXsltFile(java.lang.String file,
ConfigData configData)
Opens and reads the input XSL file.
|
static void |
removeComments(org.w3c.dom.Document document)
Removes all comments in DOM structure of the XSL stylesheet.
|
static void |
removeNode(org.w3c.dom.Node node)
Remove the input node.
|
static void |
removeNodes(java.util.List<org.w3c.dom.Node> nodeList)
Removes all nodes from the list.
|
static void |
saveXsltFile(java.lang.String file,
org.w3c.dom.Document document,
ConfigData configData)
Saves changes of actually opened XSL stylesheet file and saves the DOM structure to the XSL file.
|
public static final int INDENT
public static org.w3c.dom.Document readXsltFile(java.lang.String file, ConfigData configData) throws OpenFileException
file
- the name of the XSL file that will be opened.configData
- the data containing editor data structure.OpenFileException
- if the file cannot be opened.public static void saveXsltFile(java.lang.String file, org.w3c.dom.Document document, ConfigData configData) throws SaveFileException
file
- the name of the XSL file that will be saved.document
- the DOM structure of the file that will be saved.SaveFileException
- if the file cannot be saved.public static org.w3c.dom.Document createXsltFile()
public static void removeComments(org.w3c.dom.Document document)
document
- the DOM structure of the XSL stylesheet.public static void removeNodes(java.util.List<org.w3c.dom.Node> nodeList)
nodeList
- the list of nodes that will be removed.public static void removeNode(org.w3c.dom.Node node)
node
- the node that will be removed.