Package org.eclipse.wst.xsl.core
public class XSLCore extends java.lang.ObjectThe interface to all aspects of the XSL core functionality.
This is responsible for building and maintaining the cache of built XSL models.
Field Summary | |
public static java.lang.String | XSL_CONTENT_TYPE The XSL content type (= org.eclipse.wst.xml.core.xslsource) |
public static java.lang.String | XSL_NAMESPACE_URI The XSL namespace URI (= http://www.w3.org/1999/XSL/Transform) |
Method Summary | |
public org.eclipse.wst.xsl.core.model.StylesheetModel | buildStylesheet(IFile file) Completely rebuild the source file from its DOM |
public void | clean(IProject project
,
IProgressMonitor monitor) Clean all of the stylesheets from the given project. |
public static org.w3c.dom.Attr | getCurrentAttrNode(org.w3c.dom.Node node
,
int offset) Returns an Attr node for the current Node if one exits at the specified offset. |
public static org.w3c.dom.Node | getCurrentNode(IDocument document
,
int offset) Returns the current Node at the specified offset. |
public static org.eclipse.wst.xsl.core.XSLCore | getInstance() Get the singleton XSLCore instance. |
public org.eclipse.wst.xsl.core.model.StylesheetModel | getStylesheet(IFile file) Get the cached stylesheet, or build it if it has not yet been built. |
public static boolean | isXMLFile(IFile file) Determine whether the given file is an XML file by inspecting its content types. |
public static boolean | isXSLFile(IFile file) Determine whether the given file is an XSL file by inspecting its content types. |
public static boolean | isXSLNamespace(org.w3c.dom.Node node) Takes a given Node and returns whether it is part of the the
XSLT Namespace. |
public static IFile | resolveFile(IFile currentFile
,
java.lang.String uri) Locates a file for the given current file and URI. |
Field Detail |
public static java.lang.String XSL_CONTENT_TYPE
The XSL content type (= org.eclipse.wst.xml.core.xslsource) |
public static java.lang.String XSL_NAMESPACE_URI
The XSL namespace URI (= http://www.w3.org/1999/XSL/Transform) |
Methods Detail |
public org.eclipse.wst.xsl.core.model.StylesheetModel buildStylesheet(IFile file)
Completely rebuild the source file from its DOM
file
org.eclipse.wst.xsl.core.model.StylesheetModel
- the stylesheet model, or null if it could not be created.
public void clean(IProject project
,
IProgressMonitor monitor)
Clean all of the stylesheets from the given project.
project
- the project to be cleaned
monitor
- a progress monitor to track the clean progress
public org.w3c.dom.Attr getCurrentAttrNode(org.w3c.dom.Node node
,
int offset)
Returns an Attr node for the current Node if one exits at the specified offset.
node
offset
org.w3c.dom.Attr
- A w3c.dom.Attr
public org.w3c.dom.Node getCurrentNode(IDocument document
,
int offset)
Returns the current Node at the specified offset.
document
offset
org.w3c.dom.Node
- an w3c.dom.Node
public org.eclipse.wst.xsl.core.XSLCore getInstance()
Get the singleton XSLCore
instance.
org.eclipse.wst.xsl.core.XSLCore
- the XSLCore
instance
public org.eclipse.wst.xsl.core.model.StylesheetModel getStylesheet(IFile file)
Get the cached stylesheet, or build it if it has not yet been built.
file
org.eclipse.wst.xsl.core.model.StylesheetModel
- source file, or null if could not be built
public boolean isXMLFile(IFile file)
Determine whether the given file is an XML file by inspecting its content types.
file
- the file to inspect
boolean
- true if this file is an XML file
public boolean isXSLFile(IFile file)
Determine whether the given file is an XSL file by inspecting its content types.
file
- the file to inspect
boolean
- true if this file is an XSL file
public boolean isXSLNamespace(org.w3c.dom.Node node)
Takes a given Node
and returns whether it is part of the the
XSLT Namespace.
node
- The Node to be checked.
boolean
- True if part of the XSLT namespace, false otherwise.
public IFile resolveFile(IFile currentFile
,
java.lang.String uri)
Locates a file for the given current file and URI.
currentFile
- the file to resolve relative to
uri
- the relative URI
IFile
- the file at the URI relative to this currentFile