|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xalan.xslt.UnImplNode | +--org.apache.xalan.xslt.Stylesheet
Represents the base stylesheet or an "import" stylesheet; "include" stylesheets are combined with the including stylesheet. At the moment these stylesheets can not be reused within the stylesheet tree or between trees. This needs to be fixed in the future.
Field Summary | |
StringToStringTable |
m_prefix_aliases
|
Stylesheet |
m_stylesheetParent
The parent of the stylesheet. |
StylesheetRoot |
m_stylesheetRoot
The root of the stylesheet, where all the tables common to all stylesheets are kept. |
static java.lang.String |
STYLESHEET_EXT
Extension to be used when serializing to disk. |
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 | |
Stylesheet(StylesheetRoot root,
XSLTEngineImpl processor,
java.lang.String baseIdentifier)
Constructor for a Stylesheet needs a Document. |
Method Summary | |
void |
addExtensionNamespace(java.lang.String uri,
ExtensionNSHandler nsh)
Add an extension namespace handler. |
Attr |
createAttribute(java.lang.String name)
Unimplemented. |
Attr |
createAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
Unimplemented. |
CDATASection |
createCDATASection(java.lang.String data)
Unimplemented. |
Comment |
createComment(java.lang.String data)
Unimplemented. |
DocumentFragment |
createDocumentFragment()
Unimplemented. |
Element |
createElement(java.lang.String tagName)
Unimplemented. |
Element |
createElementNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
Unimplemented. |
EntityReference |
createEntityReference(java.lang.String name)
Unimplemented. |
ProcessingInstruction |
createProcessingInstruction(java.lang.String target,
java.lang.String data)
Unimplemented. |
Text |
createTextNode(java.lang.String data)
Unimplemented. |
XObject |
evalXPathStr(XPathSupport execContext,
java.lang.String str,
Node context,
PrefixResolver nsNode)
Evaluate an xpath string and return the result. |
ElemTemplate |
findTemplate(XSLTEngineImpl transformContext,
Node sourceTree,
Node targetNode,
QName mode,
boolean useImports)
Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft. |
java.util.Vector |
getAttributeSets()
Set table of attribute sets, keyed by set name. |
java.lang.String |
getBaseIdentifier()
Get the base identifier with which this stylesheet is associated. |
java.util.Stack |
getDecimalFormatDeclarations()
Get table of tables of element decimal-format. |
java.text.DecimalFormatSymbols |
getDecimalFormatElem(java.lang.String name)
Given a valid element decimal-format name, return the decimalFormatSymbols with that name. |
boolean |
getDefaultSpace()
Get if this stylesheet has the default space handling turned off or on according to the xml:space attribute. |
DocumentType |
getDoctype()
Unimplemented. |
Element |
getDocumentElement()
Unimplemented. |
Element |
getElementById(java.lang.String elementId)
Unimplemented. |
NodeList |
getElementsByTagName(java.lang.String tagname)
Unimplemented. |
NodeList |
getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
Unimplemented. |
StringToStringTable |
getExcludeResultPrefixes()
Set lookup table of exclude-result-prefixes. |
DOMImplementation |
getImplementation()
Unimplemented. |
java.util.Vector |
getImports()
Get vector of the -imported- XSL Stylesheets. |
java.util.Vector |
getKeyDeclarations()
Get table of KeyDeclaration objects, which are set by the xsl:key element. |
java.lang.String |
getNamespaceForPrefix(java.lang.String prefix)
Get the namespace from a prefix. |
java.lang.String |
getNamespaceForPrefix(java.lang.String prefix,
Node context)
Given a namespace, get the corrisponding prefix. |
boolean |
getNeedToBuildKeysTable()
Get if an xsl:key directive is found. |
NodeList |
getNodeSetByKey(XSLTEngineImpl tcontext,
Node doc,
java.lang.String name,
java.lang.String ref,
PrefixResolver nscontext)
Given a valid element key, return the corresponding node list. |
short |
getNodeType()
Get the type of the node. |
Stylesheet |
getStylesheetParent()
Get the parent of the stylesheet. |
StylesheetRoot |
getStylesheetRoot()
Get the root of the stylesheet, where all the tables common to all stylesheets are kept. |
TemplateList |
getTemplateList()
Get the list of templates. |
java.util.Vector |
getTopLevelVariables()
Get table for defined constants, keyed on the names. |
java.util.Vector |
getWhitespacePreservingElements()
Get lookup table of all space preserving elements. |
java.util.Vector |
getWhitespaceStrippingElements()
Set lookup table of all space stripping elements. |
XPathFactory |
getXPathFactory()
Get the factory for making xpaths. |
XPathProcessor |
getXPathProcessor()
Get the XPath processor object. |
Node |
importNode(Node importedNode,
boolean deep)
Unimplemented. |
protected void |
init(XSLTEngineImpl processor)
Do common initialization. |
protected void |
initXPath(XSLTEngineImpl processor,
XPathFactory xpathFactory)
Init anything to do with XPath. |
java.lang.String |
lookForAlias(java.lang.String uri)
Return the alias namespace uri for a given namespace uri if one is found. |
ExtensionNSHandler |
lookupExtensionNSHandler(java.lang.String uri)
Return the handler for a given extension namespace. |
void |
setAttributeSets(java.util.Vector v)
Get table of attribute sets, keyed by set name. |
void |
setBaseIdentifier(java.lang.String baseIdent)
Get the base identifier with which this stylesheet is associated. |
void |
setDecimalFormatDeclarations(java.util.Stack v)
Set table of tables of element decimal-format. |
void |
setDefaultSpace(boolean v)
Set if this stylesheet has the default space handling turned off or on according to the xml:space attribute. |
void |
setExcludeResultPrefixes(StringToStringTable v)
Get lookup table of exclude-result-prefixes. |
void |
setImports(java.util.Vector v)
Set vector of the -imported- XSL Stylesheets. |
void |
setKeyDeclarations(java.util.Vector v)
Set table of KeyDeclaration objects, which are set by the xsl:key element. |
void |
setNeedToBuildKeysTable(boolean v)
Set if an xsl:key directive is found. |
void |
setStylesheetParent(Stylesheet v)
Set the parent of the stylesheet. |
void |
setStylesheetRoot(StylesheetRoot v)
Set the root of the stylesheet, where all the tables common to all stylesheets are kept. |
void |
setTemplateList(TemplateList v)
Set the list of templates. |
void |
setTopLevelVariables(java.util.Vector v)
Set table for defined constants, keyed on the names. |
void |
setWhitespacePreservingElements(java.util.Vector v)
Set lookup table of all space preserving elements. |
void |
setWhitespaceStrippingElements(java.util.Vector v)
Set lookup table of all space stripping elements. |
void |
setXPathFactory(XPathFactory factory)
Set the factory for making XPaths. |
void |
setXPathProcessor(XPathProcessor processor)
Set the XPath processor object. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public StylesheetRoot m_stylesheetRoot
public Stylesheet m_stylesheetParent
public StringToStringTable m_prefix_aliases
public static final java.lang.String STYLESHEET_EXT
Constructor Detail |
public Stylesheet(StylesheetRoot root, XSLTEngineImpl processor, java.lang.String baseIdentifier) throws XSLProcessorException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException, SAXException
Method Detail |
public java.util.Vector getImports()
public void setImports(java.util.Vector v)
public java.util.Vector getAttributeSets()
public void setAttributeSets(java.util.Vector v)
public java.lang.String getBaseIdentifier()
public void setBaseIdentifier(java.lang.String baseIdent)
public StylesheetRoot getStylesheetRoot()
public void setStylesheetRoot(StylesheetRoot v)
public Stylesheet getStylesheetParent()
public void setStylesheetParent(Stylesheet v)
public TemplateList getTemplateList()
public void setTemplateList(TemplateList v)
public boolean getDefaultSpace()
public void setDefaultSpace(boolean v)
public java.util.Vector getWhitespacePreservingElements()
public void setWhitespacePreservingElements(java.util.Vector v)
public java.util.Vector getWhitespaceStrippingElements()
public void setWhitespaceStrippingElements(java.util.Vector v)
public StringToStringTable getExcludeResultPrefixes()
public void setExcludeResultPrefixes(StringToStringTable v)
public java.util.Vector getTopLevelVariables()
public void setTopLevelVariables(java.util.Vector v)
public java.util.Vector getKeyDeclarations()
public void setKeyDeclarations(java.util.Vector v)
public boolean getNeedToBuildKeysTable()
public void setNeedToBuildKeysTable(boolean v)
public java.util.Stack getDecimalFormatDeclarations()
ElemDecimalFormat.
public void setDecimalFormatDeclarations(java.util.Stack v)
ElemDecimalFormat.
protected void init(XSLTEngineImpl processor) throws XSLProcessorException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException, SAXException
public java.lang.String lookForAlias(java.lang.String uri)
uri
- the URI of the namespace.public java.lang.String getNamespaceForPrefix(java.lang.String prefix, Node context)
public java.lang.String getNamespaceForPrefix(java.lang.String prefix)
public ElemTemplate findTemplate(XSLTEngineImpl transformContext, Node sourceTree, Node targetNode, QName mode, boolean useImports) throws SAXException
stylesheetTree
- Where the XSL rules are to be found.sourceTree
- Where the targetElem is to be found.targetElem
- The element that needs a rule.mode
- A string indicating the display mode.useImports
- means that this is an xsl:apply-imports commend.foundStylesheet
- If non-null, the Stylesheet that the found template
belongs to will be returned in the foundStylesheet[0].public NodeList getNodeSetByKey(XSLTEngineImpl tcontext, Node doc, java.lang.String name, java.lang.String ref, PrefixResolver nscontext) throws SAXException
public java.text.DecimalFormatSymbols getDecimalFormatElem(java.lang.String name)
public void addExtensionNamespace(java.lang.String uri, ExtensionNSHandler nsh)
uri
- the URI of the extension namespace.nsh
- handlerpublic ExtensionNSHandler lookupExtensionNSHandler(java.lang.String uri)
uri
- the URI of the extension namespace.protected void initXPath(XSLTEngineImpl processor, XPathFactory xpathFactory)
public XObject evalXPathStr(XPathSupport execContext, java.lang.String str, Node context, PrefixResolver nsNode) throws SAXException
public short getNodeType()
public DocumentType getDoctype()
public DOMImplementation getImplementation()
public Element getDocumentElement()
public Element createElement(java.lang.String tagName) throws DOMException
tagName
- The name of the element type to instantiate. For XML,
this is case-sensitive. For HTML, the tagName
parameter may be provided in any case, but it must be mapped to the
canonical uppercase form by the DOM implementation.Element
object with the
nodeName
attribute set to tagName
, and
localName
, prefix
, and
namespaceURI
set to null
.public DocumentFragment createDocumentFragment()
DocumentFragment
.public Text createTextNode(java.lang.String data)
data
- The data for the node.Text
object.public Comment createComment(java.lang.String data)
data
- The data for the node.Comment
object.public CDATASection createCDATASection(java.lang.String data) throws DOMException
data
- The data for the CDATASection
contents.CDATASection
object.public ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data) throws DOMException
target
- The target part of the processing instruction.data
- The data for the node.ProcessingInstruction
object.public Attr createAttribute(java.lang.String name) throws DOMException
name
- The name of the attribute.Attr
object with the nodeName
attribute set to name
, and localName
,
prefix
, and namespaceURI
set to
null
.public EntityReference createEntityReference(java.lang.String name) throws DOMException
name
- The name of the entity to reference.EntityReference
object.public NodeList getElementsByTagName(java.lang.String tagname)
tagname
- The name of the tag to match on. The special value "*"
matches all tags.NodeList
object containing all the matched
Elements
.public Node importNode(Node importedNode, boolean deep) throws DOMException
importedNode
- The node to import.deep
- If true
, recursively import the subtree
under the specified node; if false
, import only the
node itself, as explained above. This does not apply to
Attr
, EntityReference
, and
Notation
nodes.Document
.public Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws DOMException
namespaceURI
- The namespace URI of the element to create.qualifiedName
- The qualified name of the element type to
instantiate.Element
object with the following
attributes: Attribute ValueNode.nodeName
qualifiedName
Node.namespaceURI
namespaceURI
Node.prefix
prefix, extracted
from qualifiedName
, or null
if there is no
prefixNode.localName
local name , extracted from
qualifiedName
Element.tagName
qualifiedName
qualifiedName
is
malformed, if the qualifiedName
has a prefix and the
namespaceURI
is null
or an empty string,
or if the qualifiedName
has a prefix that is "xml" and
the namespaceURI
is different from
"http://www.w3.org/XML/1998/namespace" .public Attr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws DOMException
namespaceURI
- The namespace URI of the attribute to create.qualifiedName
- The qualified name of the attribute to
instantiate.Attr
object with the following attributes:
Attribute ValueNode.nodeName
qualifiedName
Node.namespaceURI
namespaceURI
Node.prefix
prefix, extracted from
qualifiedName
, or null
if there is no
prefixNode.localName
local name , extracted from
qualifiedName
Attr.name
qualifiedName
qualifiedName
is
malformed, if the qualifiedName
has a prefix and the
namespaceURI
is null
or an empty string,
if the qualifiedName
has a prefix that is "xml" and the
namespaceURI
is different from
"http://www.w3.org/XML/1998/namespace", if the
qualifiedName
has a prefix that is "xmlns" and the
namespaceURI
is different from
"http://www.w3.org/2000/xmlns/", or if the qualifiedName
is "xmlns" and the namespaceURI
is different from
"http://www.w3.org/2000/xmlns/".public NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
namespaceURI
- The namespace URI of the elements to match on.
The special value "*" matches all namespaces.localName
- The local name of the elements to match on. The
special value "*" matches all local names.NodeList
object containing all the matched
Elements
.public Element getElementById(java.lang.String elementId)
elementId
- The unique id
value for an element.public void setXPathFactory(XPathFactory factory)
public XPathFactory getXPathFactory()
public void setXPathProcessor(XPathProcessor processor)
processor
- A XPathProcessor interface.public XPathProcessor getXPathProcessor()
|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |