Xalan-C++ API Reference
1.12.0
|
This class represents the base stylesheet or an "import" stylesheet. More...
#include <xalanc/XSLT/Stylesheet.hpp>
Public Member Functions | |
Stylesheet (StylesheetRoot &root, const XalanDOMString &baseIdentifier, StylesheetConstructionContext &constructionContext) | |
Constructor for a Stylesheet needs a Document. More... | |
virtual | ~Stylesheet () |
MemoryManager & | getMemoryManager () |
double | getXSLTVerDeclared () const |
Retrieve XSLT version number. More... | |
void | setXSLTVerDeclared (double ver) |
Set XSLT version number. More... | |
const StylesheetRoot & | getStylesheetRoot () const |
Retrieve the root stylesheet object. More... | |
StylesheetRoot & | getStylesheetRoot () |
Retrieve the root stylesheet object. More... | |
const NamespacesStackType & | getNamespaces () const |
Retrieve the stack of namespace lists. More... | |
NamespacesStackType & | getNamespaces () |
Retrieve the stack of namespace lists. More... | |
const NamespacesHandler & | getNamespacesHandler () const |
NamespacesHandler & | getNamespacesHandler () |
const NamespaceVectorType & | getNamespaceDecls () const |
Retrieve the list of namespace declarations currently in effect. More... | |
NamespaceVectorType & | getNamespaceDecls () |
Retrieve the list of namespace declarations currently in effect. More... | |
void | setNamespaceDecls (const NamespaceVectorType &ns) |
Set the list of namespace declarations currently in effect. More... | |
void | pushNamespaces (const AttributeListType &atts) |
Push the namespace declarations from the current attribute list onto the namespace stack. More... | |
void | popNamespaces () |
Pop a namespace declaration from the namespace stack. More... | |
void | addWhitespaceElement (const XalanSpaceNodeTester &theTester) |
virtual void | postConstruction (StylesheetConstructionContext &constructionContext) |
Called after construction is completed. More... | |
bool | isAttrOK (const XalanDOMChar *attrName, const AttributeListType &atts, XalanSize_t which, StylesheetConstructionContext &constructionContext) const |
See if this is a xmlns attribute, and, if so, process it. More... | |
const XalanDOMString * | getNamespaceFromStack (const XalanDOMString &nodeName, XalanDOMString &theBuffer) const |
Get the namespace from a qualified name. More... | |
const XalanDOMString * | getNamespaceFromStack (const XalanDOMChar *nodeName, XalanDOMString &theBuffer) const |
Get the namespace from a qualified name. More... | |
const XalanDOMString * | getNamespaceForPrefixFromStack (const XalanDOMString &prefix) const |
Get the namespace from a prefix by searching the stack of namespace lists. More... | |
const XalanDOMString * | getNamespaceForPrefixFromStack (const XalanDOMChar *prefix) const |
Get the namespace from a prefix by searching the stack of namespace lists. More... | |
const XalanDOMString * | getNamespaceForPrefix (const XalanDOMString &prefix, StylesheetConstructionContext &constructionContext) const |
Get the namespace for a prefix, and report an error if it wasn't found. More... | |
const XalanDOMString * | getNamespaceForPrefix (const XalanDOMChar *prefix, StylesheetConstructionContext &constructionContext) const |
Get the namespace for a prefix, and report an error if it wasn't found. More... | |
void | processExcludeResultPrefixes (StylesheetConstructionContext &theConstructionContext, const XalanDOMChar *theValue) |
See if a namespace should be excluded. More... | |
void | addTemplate (ElemTemplate *theTemplate, StylesheetConstructionContext &constructionContext) |
Add a template to the list of names templates. More... | |
bool | getYesOrNo (const XalanDOMChar *aname, const XalanDOMChar *val, StylesheetConstructionContext &constructionContext) const |
Process an attribute that has the value of 'yes' or 'no'. More... | |
const XalanDOMString & | getBaseIdentifier () const |
Retrieve the base identifier with which this stylesheet is associated. More... | |
const XalanDOMString & | getCurrentIncludeBaseIdentifier () const |
Retrieve the base identifier for the most recently included stylesheet. More... | |
void | processNSAliasElement (const XalanDOMChar *name, const AttributeListType &atts, StylesheetConstructionContext &constructionContext) |
Process an xsl:namespace-alias element. More... | |
void | processDecimalFormatElement (StylesheetConstructionContext &constructionContext, const AttributeListType &atts, const Locator *locator=0) |
Process an xsl:decimal-format element. More... | |
const XalanDecimalFormatSymbols * | getDecimalFormatSymbols (const XalanQName &theQName) const |
Retrieve the XalanDecimalFormatSymbols instance associated with the QName. More... | |
void | addImport (Stylesheet *theStylesheet) |
Add an imported stylesheet. More... | |
bool | isWrapperless () const |
whether there is a wrapper template More... | |
ElemTemplateElement * | initWrapperless (StylesheetConstructionContext &constructionContext, const Locator *locator) |
URLStackType & | getIncludeStack () |
Retrieve the stack of who's including who. More... | |
void | processKeyElement (const PrefixResolver &nsContext, const AttributeListType &atts, const Locator *locator, StylesheetConstructionContext &constructionContext) |
Process the xsl:key element. More... | |
const ElemTemplate * | findNamedTemplate (const XalanQName &qname) const |
Locate a template via the "name" attribute. More... | |
const ElemTemplate * | findTemplate (StylesheetExecutionContext &executionContext, XalanNode *targetNode) const |
Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft. More... | |
const ElemTemplate * | findTemplate (StylesheetExecutionContext &executionContext, XalanNode *targetNode, XalanNode::NodeType targetNodeType, const XalanQName &mode, bool onlyUseImports) const |
Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft. More... | |
const PatternTableVectorType * | locateElementMatchPatternDataList (const XalanDOMString &theName) const |
Given a name, locate the start of a list of possible templates that match that name. More... | |
const PatternTableVectorType * | locateAttributeMatchPatternDataList (const XalanDOMString &theName) const |
Given a name, locate the start of a list of possible templates that match that name. More... | |
const PatternTableVectorType * | locateMatchPatternDataList (const XalanNode &theNode, XalanNode::NodeType targetNodeType) const |
Given a XalanNode, locate the start of a list of possible templates that match it. More... | |
void | processExtensionNamespace (StylesheetConstructionContext &theConstructionContext, const XalanDOMString &uri) |
Add an extension namespace handler. More... | |
ExtensionNSHandler * | lookupExtensionNSHandler (const XalanDOMString &uri) const |
Return the handler for a given extension namespace. More... | |
void | setTopLevelVariable (ElemVariable *var) |
Set a top level variable. More... | |
void | pushTopLevelVariables (StylesheetExecutionContext &executionContext, const ParamVectorType &topLevelParams) const |
Set a list of top level variables in the specified execution context stylesheet. More... | |
virtual const XalanDOMString * | getNamespaceForPrefix (const XalanDOMString &prefix) const |
Retrieve a namespace corresponding to a prefix. More... | |
virtual const XalanDOMString & | getURI () const |
Retrieve the base URI for the resolver. More... | |
const XalanDOMString & | getXSLTNamespaceURI () const |
void | setXSLTNamespaceURI (const XalanDOMString &theURI) |
const ElemTemplate * | getFirstTemplate () const |
Public Member Functions inherited from xalanc::PrefixResolver | |
PrefixResolver () | |
PrefixResolver (const PrefixResolver &) | |
virtual | ~PrefixResolver () |
Static Public Member Functions | |
static Stylesheet * | create (MemoryManager &theManager, StylesheetRoot &root, const XalanDOMString &baseIdentifier, StylesheetConstructionContext &constructionContext) |
static void | addObjectIfNotFound (const XalanMatchPatternData *thePattern, PatternTableVectorType &theVector) |
Add object to vector of match patterns if not already there. More... | |
static void | addObjectIfNotFound (const XalanMatchPatternData *thePattern, const XalanMatchPatternData *theArray[], XalanSize_t &theArraySize) |
Add object to array of match patterns if not already there. More... | |
Protected Attributes | |
StylesheetRoot & | m_stylesheetRoot |
The root of the stylesheet tree. More... | |
XalanDOMString | m_baseIdent |
The base URL of the XSL document. More... | |
KeyDeclarationVectorType | m_keyDeclarations |
Table of KeyDeclaration objects, which are set by the xsl:key element. More... | |
WhitespaceElementsVectorType | m_whitespaceElements |
Static Protected Attributes | |
static const XalanQNameByReference | s_emptyQName |
This class represents the base stylesheet or an "import" stylesheet.
"include" stylesheets are combined with the including stylesheet.
Definition at line 86 of file Stylesheet.hpp.
Definition at line 99 of file Stylesheet.hpp.
typedef XalanMap<XalanQNameByReference, const ElemTemplate* > xalanc::Stylesheet::ElemTemplateMapType |
Definition at line 106 of file Stylesheet.hpp.
Definition at line 95 of file Stylesheet.hpp.
typedef XalanMap<XalanDOMString, ExtensionNSHandler*> xalanc::Stylesheet::ExtensionNamespacesMapType |
Definition at line 103 of file Stylesheet.hpp.
Definition at line 112 of file Stylesheet.hpp.
Definition at line 96 of file Stylesheet.hpp.
typedef XalanMap<const XalanNode*, KeyTable* > xalanc::Stylesheet::KeyTablesTableType |
Definition at line 108 of file Stylesheet.hpp.
Definition at line 93 of file Stylesheet.hpp.
Definition at line 92 of file Stylesheet.hpp.
Definition at line 91 of file Stylesheet.hpp.
Definition at line 110 of file Stylesheet.hpp.
Definition at line 101 of file Stylesheet.hpp.
Definition at line 97 of file Stylesheet.hpp.
Definition at line 98 of file Stylesheet.hpp.
Definition at line 100 of file Stylesheet.hpp.
xalanc::Stylesheet::Stylesheet | ( | StylesheetRoot & | root, |
const XalanDOMString & | baseIdentifier, | ||
StylesheetConstructionContext & | constructionContext | ||
) |
Constructor for a Stylesheet needs a Document.
XSLProcessorException | thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing. |
|
virtual |
|
inline |
Add an imported stylesheet.
theStylesheet | The stylesheet to add. |
Definition at line 480 of file Stylesheet.hpp.
|
static |
Add object to array of match patterns if not already there.
theArraySize size will be incremented if the pattern was added.
thePattern | pattern to add |
theArray | vector of patterns to add to |
theArraySize | The size of the array |
|
static |
Add object to vector of match patterns if not already there.
thePattern | pattern to add |
theVector | vector of patterns to add to |
void xalanc::Stylesheet::addTemplate | ( | ElemTemplate * | theTemplate, |
StylesheetConstructionContext & | constructionContext | ||
) |
Add a template to the list of names templates.
theTemplate | template to add |
constructionContext | context for construction |
void xalanc::Stylesheet::addWhitespaceElement | ( | const XalanSpaceNodeTester & | theTester | ) |
|
static |
const ElemTemplate* xalanc::Stylesheet::findNamedTemplate | ( | const XalanQName & | qname | ) | const |
Locate a template via the "name" attribute.
name | qualified name of template |
|
inline |
Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft.
executionContext | current execution context |
targetNode | element that needs a rule |
Definition at line 545 of file Stylesheet.hpp.
References xalanc::XalanNode::getNodeType().
const ElemTemplate* xalanc::Stylesheet::findTemplate | ( | StylesheetExecutionContext & | executionContext, |
XalanNode * | targetNode, | ||
XalanNode::NodeType | targetNodeType, | ||
const XalanQName & | mode, | ||
bool | onlyUseImports | ||
) | const |
Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft.
executionContext | current execution context |
targetNode | node that needs a rule |
targetNodeType | the type of targetNode |
mode | string indicating the mode |
onlyUseImports | only use imports, do not use any templates from the stylesheet itself |
|
inline |
Retrieve the base identifier with which this stylesheet is associated.
Definition at line 421 of file Stylesheet.hpp.
|
inline |
Retrieve the base identifier for the most recently included stylesheet.
This will return the same value as getBaseIdentifier(), if no include is being processed.
Definition at line 435 of file Stylesheet.hpp.
References xalanc::XalanDOMString::empty().
const XalanDecimalFormatSymbols* xalanc::Stylesheet::getDecimalFormatSymbols | ( | const XalanQName & | theQName | ) | const |
Retrieve the XalanDecimalFormatSymbols instance associated with the QName.
theQName | the QName for the lookup |
|
inline |
Definition at line 709 of file Stylesheet.hpp.
|
inline |
Retrieve the stack of who's including who.
Definition at line 507 of file Stylesheet.hpp.
|
inline |
Definition at line 134 of file Stylesheet.hpp.
|
inline |
Retrieve the list of namespace declarations currently in effect.
Definition at line 234 of file Stylesheet.hpp.
|
inline |
Retrieve the list of namespace declarations currently in effect.
Definition at line 223 of file Stylesheet.hpp.
const XalanDOMString* xalanc::Stylesheet::getNamespaceForPrefix | ( | const XalanDOMChar * | prefix, |
StylesheetConstructionContext & | constructionContext | ||
) | const |
Get the namespace for a prefix, and report an error if it wasn't found.
prefix | prefix to search |
constructionContext | The current construction context |
|
virtual |
Retrieve a namespace corresponding to a prefix.
This assumes that the PrevixResolver holds its own namespace context, or is a namespace context itself.
prefix | Prefix to resolve |
Implements xalanc::PrefixResolver.
const XalanDOMString* xalanc::Stylesheet::getNamespaceForPrefix | ( | const XalanDOMString & | prefix, |
StylesheetConstructionContext & | constructionContext | ||
) | const |
Get the namespace for a prefix, and report an error if it wasn't found.
prefix | prefix to search |
constructionContext | The current construction context |
|
inline |
Get the namespace from a prefix by searching the stack of namespace lists.
prefix | prefix to search |
Definition at line 341 of file Stylesheet.hpp.
|
inline |
Get the namespace from a prefix by searching the stack of namespace lists.
prefix | prefix to search |
Definition at line 328 of file Stylesheet.hpp.
const XalanDOMString* xalanc::Stylesheet::getNamespaceFromStack | ( | const XalanDOMChar * | nodeName, |
XalanDOMString & | theBuffer | ||
) | const |
Get the namespace from a qualified name.
nodeName | name of node |
|
inline |
Get the namespace from a qualified name.
nodeName | name of node |
Definition at line 302 of file Stylesheet.hpp.
References xalanc::XalanDOMString::c_str().
|
inline |
Retrieve the stack of namespace lists.
Definition at line 200 of file Stylesheet.hpp.
|
inline |
Retrieve the stack of namespace lists.
Definition at line 189 of file Stylesheet.hpp.
|
inline |
Definition at line 212 of file Stylesheet.hpp.
|
inline |
Definition at line 206 of file Stylesheet.hpp.
|
inline |
Retrieve the root stylesheet object.
Definition at line 178 of file Stylesheet.hpp.
|
inline |
Retrieve the root stylesheet object.
Definition at line 167 of file Stylesheet.hpp.
|
virtual |
|
inline |
Definition at line 697 of file Stylesheet.hpp.
|
inline |
Retrieve XSLT version number.
Definition at line 145 of file Stylesheet.hpp.
bool xalanc::Stylesheet::getYesOrNo | ( | const XalanDOMChar * | aname, |
const XalanDOMChar * | val, | ||
StylesheetConstructionContext & | constructionContext | ||
) | const |
Process an attribute that has the value of 'yes' or 'no'.
aname | name of attribute |
val | value |
constructionContext | context for construction |
ElemTemplateElement* xalanc::Stylesheet::initWrapperless | ( | StylesheetConstructionContext & | constructionContext, |
const Locator * | locator | ||
) |
bool xalanc::Stylesheet::isAttrOK | ( | const XalanDOMChar * | attrName, |
const AttributeListType & | atts, | ||
XalanSize_t | which, | ||
StylesheetConstructionContext & | constructionContext | ||
) | const |
See if this is a xmlns attribute, and, if so, process it.
attrName | qualified name of attribute |
atts | attribute list where the element comes from (not used at this time) |
which | index into the attribute list (not used at this time) |
|
inline |
whether there is a wrapper template
Definition at line 491 of file Stylesheet.hpp.
const PatternTableVectorType* xalanc::Stylesheet::locateAttributeMatchPatternDataList | ( | const XalanDOMString & | theName | ) | const |
Given a name, locate the start of a list of possible templates that match that name.
If none match, then use the default list.
theName | The name to match |
const PatternTableVectorType* xalanc::Stylesheet::locateElementMatchPatternDataList | ( | const XalanDOMString & | theName | ) | const |
Given a name, locate the start of a list of possible templates that match that name.
If none match, then use the default list.
theName | The name to match |
const PatternTableVectorType* xalanc::Stylesheet::locateMatchPatternDataList | ( | const XalanNode & | theNode, |
XalanNode::NodeType | targetNodeType | ||
) | const |
|
inline |
Return the handler for a given extension namespace.
uri | the URI of the extension namespace. |
Definition at line 655 of file Stylesheet.hpp.
|
inline |
Pop a namespace declaration from the namespace stack.
Definition at line 263 of file Stylesheet.hpp.
|
virtual |
Called after construction is completed.
Reimplemented in xalanc::StylesheetRoot.
void xalanc::Stylesheet::processDecimalFormatElement | ( | StylesheetConstructionContext & | constructionContext, |
const AttributeListType & | atts, | ||
const Locator * | locator = 0 |
||
) |
Process an xsl:decimal-format element.
elemDecimalFormat | the element |
|
inline |
See if a namespace should be excluded.
theConstructionContext | the current construction context. |
theValue | the prefix of the namespace. |
Definition at line 380 of file Stylesheet.hpp.
void xalanc::Stylesheet::processExtensionNamespace | ( | StylesheetConstructionContext & | theConstructionContext, |
const XalanDOMString & | uri | ||
) |
Add an extension namespace handler.
This provides methods for calling an element extension as well as for function calls (which is passed on to XPath).
constructionContext | The current construction context. |
uri | The namespace URI of the extension. |
void xalanc::Stylesheet::processKeyElement | ( | const PrefixResolver & | nsContext, |
const AttributeListType & | atts, | ||
const Locator * | locator, | ||
StylesheetConstructionContext & | constructionContext | ||
) |
Process the xsl:key element.
nsContext | The PrefixResolver instance for namespace prefixes. |
atts | The attribute list for element. #param locator The Locator instance for error reporting, if any. May be 0. |
constructionContext | The current construction context. |
void xalanc::Stylesheet::processNSAliasElement | ( | const XalanDOMChar * | name, |
const AttributeListType & | atts, | ||
StylesheetConstructionContext & | constructionContext | ||
) |
Process an xsl:namespace-alias element.
name | the element name. |
attrs | the current attribute list |
constructionContext | the active construction context |
void xalanc::Stylesheet::pushNamespaces | ( | const AttributeListType & | atts | ) |
Push the namespace declarations from the current attribute list onto the namespace stack.
atts | attribute list constaining namespaces |
void xalanc::Stylesheet::pushTopLevelVariables | ( | StylesheetExecutionContext & | executionContext, |
const ParamVectorType & | topLevelParams | ||
) | const |
Set a list of top level variables in the specified execution context stylesheet.
executionContext | current execution context |
topLevelParams | list of top level parameters |
|
inline |
Set the list of namespace declarations currently in effect.
ns | vector of namespace vectors |
Definition at line 245 of file Stylesheet.hpp.
|
inline |
Set a top level variable.
var | top-level variable declared with "xsl:variable" or xsl:param-variable. |
Definition at line 670 of file Stylesheet.hpp.
|
inline |
Definition at line 703 of file Stylesheet.hpp.
|
inline |
Set XSLT version number.
ver | number representing XSLT version |
Definition at line 156 of file Stylesheet.hpp.
|
protected |
The base URL of the XSL document.
Definition at line 724 of file Stylesheet.hpp.
|
protected |
Table of KeyDeclaration objects, which are set by the xsl:key element.
Definition at line 730 of file Stylesheet.hpp.
|
protected |
The root of the stylesheet tree.
Definition at line 719 of file Stylesheet.hpp.
|
protected |
Definition at line 732 of file Stylesheet.hpp.
|
staticprotected |
Definition at line 734 of file Stylesheet.hpp.
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Generated on Sun May 31 2020 10:37:33 for Xalan-C++ API Reference by 1.8.17