Xalan-C++ API Documentation
Xalan-C++ API Documentation
The Xalan C++ XSLT Processor Version 1.6
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
Stylesheet Class Reference
This class represents the base stylesheet or an "import" stylesheet.
More...
#include <Stylesheet.hpp>
Inheritance diagram for Stylesheet
Collaboration diagram for Stylesheet:
List of all members.
Public Types
Public Methods
- Stylesheet ( StylesheetRoot& root, const XalanDOMString& baseIdentifier, StylesheetConstructionContext& constructionContext)
- Constructor for a Stylesheet needs a Document. More...
- virtual ~Stylesheet ()
- 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.
- virtual void postConstruction (StylesheetConstructionContext& constructionContext)
- Called after construction is completed.
- bool isAttrOK ( const XalanDOMChar* attrName, const AttributeListType& atts, int which, StylesheetConstructionContext& constructionContext) const
- See if this is a xmlns attribute, and, if so, process it. More...
- const XalanDOMString* getNamespaceFromStack (const XalanDOMString& nodeName) const
- Get the namespace from a qualified name. More...
- const XalanDOMString* getNamespaceFromStack (const XalanDOMChar* nodeName) 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...
- 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...
- void setBaseIdentifier (const XalanDOMString& str)
- Set 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 LocatorType* 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 addAttributeSet (ElemAttributeSet* attrSet)
- Add an attribute set to the list. More...
- void applyAttrSets ( const XalanQName** attributeSetsNames, size_type attributeSetsNamesCount, StylesheetExecutionContext& executionContext, XalanNode* sourceNode) const
- Apply the set of named attributes to a node in a given context with a given mode. 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 LocatorType* locator)
- URLStackType& getIncludeStack ()
- Retrieve the stack of who's including who. More...
- void processKeyElement ( const PrefixResolver& nsContext, const AttributeListType& atts, const LocatorType* 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* locateElementMatchPatternList2 (const XalanDOMString& theName) const
- Given a name, locate the start of a list of possible templates that match that name. More...
- const PatternTableVectorType* locateAttributeMatchPatternList2 (const XalanDOMString& theName) const
- Given a name, locate the start of a list of possible templates that match that name. More...
- const PatternTableVectorType* locateMatchPatternList2 ( 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)
Static Public Methods
Protected Attributes
Static Protected Attributes
Detailed Description
This class represents the base stylesheet or an "import" stylesheet.
"include" stylesheets are combined with the including stylesheet.
Member Typedef Documentation
typedef std::vector<ElemVariable*> Stylesheet::ElemVariableVectorType
|
|
typedef std::vector<KeyDeclaration> Stylesheet::KeyDeclarationVectorType
|
|
typedef std::deque<MatchPattern2> Stylesheet::MatchPattern2Container
|
|
typedef XalanQName::NamespaceVectorType Stylesheet::NamespaceVectorType
|
|
typedef XalanQName::NamespacesStackType Stylesheet::NamespacesStackType
|
|
typedef StylesheetExecutionContext::ParamVectorType Stylesheet::ParamVectorType
|
|
typedef std::vector<const MatchPattern2*> Stylesheet::PatternTableVectorType
|
|
typedef std::vector<Stylesheet*> Stylesheet::StylesheetVectorType
|
|
typedef size_t Stylesheet::size_type
|
|
Constructor & Destructor Documentation
Constructor for a Stylesheet needs a Document.
-
Exceptions:
-
virtual Stylesheet::~Stylesheet (
|
) [virtual]
|
|
Member Function Documentation
Add an attribute set to the list.
-
Parameters:
-
attrSet
|
pointer to attribute set to add |
void Stylesheet::addImport (
|
Stylesheet * theStylesheet ) []
|
|
Add an imported stylesheet.
-
Parameters:
-
theStylesheet
|
The stylesheet to add. |
void Stylesheet::addObjectIfNotFound (
|
const MatchPattern2 * thePattern,
|
|
const MatchPattern2 * theArray[],
|
|
unsigned int & theArraySize ) [static]
|
|
Add object to array of match patterns if not already there.
theArraySize size will be incremented if the pattern was added.
-
Parameters:
-
thePattern
|
pattern to add |
theArray
|
vector of patterns to add to |
theArraySize
|
The size of the array |
Add object to vector of match patterns if not already there.
-
Parameters:
-
thePattern
|
pattern to add |
theVector
|
vector of patterns to add to |
Add a template to the list of names templates.
-
Parameters:
-
theTemplate
|
template to add |
constructionContext
|
context for construction |
Apply the set of named attributes to a node in a given context with a given mode.
-
Parameters:
-
attributeSetsNames
|
The vector of attribute set names |
attributeSetsNamesCount
|
The size of the vector |
executionContext
|
The current execution context |
sourceNode
|
The source node |
Locate a template via the "name" attribute.
-
Parameters:
-
name
|
qualified name of template |
-
Returns:
-
pointer to template found or 0 if none found
Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft.
-
Parameters:
-
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 |
-
Returns:
-
pointer to rule that best matches targetElem
Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft.
-
Parameters:
-
executionContext
|
current execution context |
targetNode
|
element that needs a rule |
-
Returns:
-
pointer to rule that best matches targetNode
Retrieve the base identifier with which this stylesheet is associated.
-
Returns:
-
string for base identifier
const XalanDOMString & Stylesheet::getCurrentIncludeBaseIdentifier (
|
) const []
|
|
Retrieve the base identifier for the most recently included stylesheet.
This will return the same value as getBaseIdentifier(), if no include is being processed.
-
Returns:
-
string for base identifier
Retrieve the XalanDecimalFormatSymbols instance associated with the QName.
-
Parameters:
-
theQName
|
the QName for the lookup |
-
Returns:
-
a pointer to the matching instance, or 0 if none was found
Retrieve the stack of who's including who.
-
Returns:
-
stack of includes
Retrieve the list of namespace declarations currently in effect.
-
Returns:
-
vector of namespace vectors
Retrieve the list of namespace declarations currently in effect.
-
Returns:
-
vector of namespace vectors
Retrieve a namespace corresponding to a prefix.
This assumes that the PrevixResolver holds its own namespace context, or is a namespace context itself.
-
Parameters:
-
-
Returns:
-
namespace that prefix resolves to, or null if prefix is not found
Reimplemented from PrefixResolver.
Get the namespace from a prefix by searching the stack of namespace lists.
-
Parameters:
-
-
Returns:
-
namespace corresponding to prefix, or null if not found.
Get the namespace from a prefix by searching the stack of namespace lists.
-
Parameters:
-
-
Returns:
-
namespace corresponding to prefix, or null if not found.
Get the namespace from a qualified name.
-
Parameters:
-
-
Returns:
-
namespace string for node, or null if not found.
Get the namespace from a qualified name.
-
Parameters:
-
-
Returns:
-
namespace string for node, or null if not found.
Retrieve the stack of namespace lists.
-
Returns:
-
vector of namespace vectors
Retrieve the stack of namespace lists.
-
Returns:
-
vector of namespace vectors
Retrieve the root stylesheet object.
-
Returns:
-
reference to the stylesheet object
Retrieve the root stylesheet object.
-
Returns:
-
const reference to the stylesheet object
Retrieve the base URI for the resolver.
-
Returns:
-
URI string
Reimplemented from PrefixResolver.
double Stylesheet::getXSLTVerDeclared (
|
) const []
|
|
Retrieve XSLT version number.
-
Returns:
-
number representing XSLT version
Process an attribute that has the value of 'yes' or 'no'.
-
Parameters:
-
aname
|
name of attribute |
val
|
value |
constructionContext
|
context for construction |
-
Returns:
-
true if value equals string constant for "yes," false otherwise
See if this is a xmlns attribute, and, if so, process it.
-
Parameters:
-
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) |
-
Returns:
-
true if this is a namespace name
bool Stylesheet::isWrapperless (
|
) const []
|
|
whether there is a wrapper template.
-
Returns:
-
true is there is a wrapper
Given a name, locate the start of a list of possible templates that match that name.
If none match, then use the default list.
-
Parameters:
-
theName
|
The name to match |
Given a name, locate the start of a list of possible templates that match that name.
If none match, then use the default list.
-
Parameters:
-
theName
|
The name to match |
Given a XalanNode, locate the start of a list of possible templates that match it.
-
Parameters:
-
XalanNode
|
The node to match |
Return the handler for a given extension namespace.
-
Parameters:
-
uri
|
the URI of the extension namespace. |
-
Returns:
-
pointer to extension handler
void Stylesheet::popNamespaces (
|
) []
|
|
Pop a namespace declaration from the namespace stack.
Called after construction is completed.
Reimplemented in StylesheetRoot.
Process an xsl:decimal-format element.
-
Parameters:
-
elemDecimalFormat
|
the element |
See if a namespace should be excluded.
-
Parameters:
-
theConstructionContext
|
the current construction context. |
theValue
|
the prefix of the namespace. |
-
Returns:
-
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).
-
Parameters:
-
constructionContext
|
The current construction context. |
uri
|
The namespace URI of the extension. |
Process the xsl:key element.
-
Parameters:
-
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. |
Process an xsl:namespace-alias element.
-
Parameters:
-
name
|
the element name. |
attrs
|
the current attribute list |
constructionContext
|
the active construction context |
Push the namespace declarations from the current attribute list onto the namespace stack.
-
Parameters:
-
atts
|
attribute list constaining namespaces |
Set a list of top level variables in the specified execution context stylesheet.
-
Parameters:
-
executionContext
|
current execution context |
topLevelParams
|
list of top level parameters |
Set the base identifier with which this stylesheet is associated.
-
Parameters:
-
str
|
string for base identifier |
Set the list of namespace declarations currently in effect.
-
Parameters:
-
ns
|
vector of namespace vectors |
void Stylesheet::setTopLevelVariable (
|
ElemVariable * var ) []
|
|
Set a top level variable.
-
Parameters:
-
var
|
top-level variable declared with "xsl:variable" or xsl:param-variable. |
void Stylesheet::setXSLTNamespaceURI (
|
const XalanDOMString & theURI ) []
|
|
void Stylesheet::setXSLTVerDeclared (
|
double ver ) []
|
|
Set XSLT version number.
-
Parameters:
-
ver
|
number representing XSLT version |
Member Data Documentation
The base URL of the XSL document.
Table of KeyDeclaration objects, which are set by the xsl:key element.
The root of the stylesheet tree.
The documentation for this class was generated from the following file:
Interpreting class diagrams
Doxygen and
GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.6
Copyright © 2000, 2001, 2002, 2003 The Apache Software Foundation. All Rights Reserved.
|
|