Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes

Stylesheet Class Reference

This class represents the base stylesheet or an "import" stylesheet. More...

#include <Stylesheet.hpp>

Inherits PrefixResolver.

Inherited by StylesheetRoot.

Collaboration diagram for Stylesheet:
Collaboration graph
[legend]

List of all members.

Public Types

Public Member Functions

Static Public Member Functions

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.

Definition at line 86 of file Stylesheet.hpp.


Member Typedef Documentation

Definition at line 99 of file Stylesheet.hpp.

Definition at line 106 of file Stylesheet.hpp.

Definition at line 95 of file Stylesheet.hpp.

Definition at line 103 of file Stylesheet.hpp.

Definition at line 112 of file Stylesheet.hpp.

Definition at line 96 of file Stylesheet.hpp.

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.


Constructor & Destructor Documentation

Stylesheet::Stylesheet ( StylesheetRoot root,
const XalanDOMString baseIdentifier,
StylesheetConstructionContext constructionContext 
)

Constructor for a Stylesheet needs a Document.

Exceptions:
XSLProcessorException thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing.
virtual Stylesheet::~Stylesheet (  )  [virtual]

Member Function Documentation

void Stylesheet::addImport ( Stylesheet theStylesheet  )  [inline]

Add an imported stylesheet.

Parameters:
theStylesheet The stylesheet to add.

Definition at line 480 of file Stylesheet.hpp.

static void Stylesheet::addObjectIfNotFound ( const XalanMatchPatternData thePattern,
PatternTableVectorType theVector 
) [static]

Add object to vector of match patterns if not already there.

Parameters:
thePattern pattern to add
theVector vector of patterns to add to
static void Stylesheet::addObjectIfNotFound ( const XalanMatchPatternData thePattern,
const XalanMatchPatternData theArray[],
XalanSize_t &  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
void Stylesheet::addTemplate ( ElemTemplate theTemplate,
StylesheetConstructionContext constructionContext 
)

Add a template to the list of names templates.

Parameters:
theTemplate template to add
constructionContext context for construction
void Stylesheet::addWhitespaceElement ( const XalanSpaceNodeTester theTester  ) 
static Stylesheet* Stylesheet::create ( MemoryManager &  theManager,
StylesheetRoot root,
const XalanDOMString baseIdentifier,
StylesheetConstructionContext constructionContext 
) [static]
const ElemTemplate* Stylesheet::findNamedTemplate ( const XalanQName qname  )  const

Locate a template via the "name" attribute.

Parameters:
name qualified name of template
Returns:
pointer to template found or 0 if none found
const ElemTemplate* Stylesheet::findTemplate ( StylesheetExecutionContext executionContext,
XalanNode targetNode 
) const [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.

Parameters:
executionContext current execution context
targetNode element that needs a rule
Returns:
pointer to rule that best matches targetNode

Definition at line 545 of file Stylesheet.hpp.

const ElemTemplate* 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.

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
const XalanDOMString& Stylesheet::getBaseIdentifier (  )  const [inline]

Retrieve the base identifier with which this stylesheet is associated.

Returns:
string for base identifier

Definition at line 421 of file Stylesheet.hpp.

const XalanDOMString& Stylesheet::getCurrentIncludeBaseIdentifier (  )  const [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.

Returns:
string for base identifier

Definition at line 435 of file Stylesheet.hpp.

const XalanDecimalFormatSymbols* Stylesheet::getDecimalFormatSymbols ( const XalanQName theQName  )  const

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
const ElemTemplate* Stylesheet::getFirstTemplate (  )  const [inline]

Definition at line 709 of file Stylesheet.hpp.

URLStackType& Stylesheet::getIncludeStack (  )  [inline]

Retrieve the stack of who's including who.

Returns:
stack of includes

Definition at line 507 of file Stylesheet.hpp.

MemoryManager& Stylesheet::getMemoryManager (  )  [inline]

Reimplemented in StylesheetRoot.

Definition at line 134 of file Stylesheet.hpp.

const NamespaceVectorType& Stylesheet::getNamespaceDecls (  )  const [inline]

Retrieve the list of namespace declarations currently in effect.

Returns:
vector of namespace vectors

Definition at line 223 of file Stylesheet.hpp.

NamespaceVectorType& Stylesheet::getNamespaceDecls (  )  [inline]

Retrieve the list of namespace declarations currently in effect.

Returns:
vector of namespace vectors

Definition at line 234 of file Stylesheet.hpp.

const XalanDOMString* Stylesheet::getNamespaceForPrefix ( const XalanDOMString prefix,
StylesheetConstructionContext constructionContext 
) const

Get the namespace for a prefix, and report an error if it wasn't found.

Parameters:
prefix prefix to search
constructionContext The current construction context
Returns:
namespace corresponding to prefix, or null if not found.
virtual const XalanDOMString* Stylesheet::getNamespaceForPrefix ( const XalanDOMString prefix  )  const [virtual]

Retrieve a namespace corresponding to a prefix.

This assumes that the PrevixResolver holds its own namespace context, or is a namespace context itself.

Parameters:
prefix Prefix to resolve
Returns:
namespace that prefix resolves to, or null if prefix is not found

Implements PrefixResolver.

const XalanDOMString* Stylesheet::getNamespaceForPrefix ( const XalanDOMChar *  prefix,
StylesheetConstructionContext constructionContext 
) const

Get the namespace for a prefix, and report an error if it wasn't found.

Parameters:
prefix prefix to search
constructionContext The current construction context
Returns:
namespace corresponding to prefix, or null if not found.
const XalanDOMString* Stylesheet::getNamespaceForPrefixFromStack ( const XalanDOMString prefix  )  const [inline]

Get the namespace from a prefix by searching the stack of namespace lists.

Parameters:
prefix prefix to search
Returns:
namespace corresponding to prefix, or null if not found.

Definition at line 328 of file Stylesheet.hpp.

const XalanDOMString* Stylesheet::getNamespaceForPrefixFromStack ( const XalanDOMChar *  prefix  )  const [inline]

Get the namespace from a prefix by searching the stack of namespace lists.

Parameters:
prefix prefix to search
Returns:
namespace corresponding to prefix, or null if not found.

Definition at line 341 of file Stylesheet.hpp.

const XalanDOMString* Stylesheet::getNamespaceFromStack ( const XalanDOMString nodeName,
XalanDOMString theBuffer 
) const [inline]

Get the namespace from a qualified name.

Parameters:
nodeName name of node
Returns:
namespace string for node, or null if not found.

Definition at line 302 of file Stylesheet.hpp.

const XalanDOMString* Stylesheet::getNamespaceFromStack ( const XalanDOMChar *  nodeName,
XalanDOMString theBuffer 
) const

Get the namespace from a qualified name.

Parameters:
nodeName name of node
Returns:
namespace string for node, or null if not found.
NamespacesStackType& Stylesheet::getNamespaces (  )  [inline]

Retrieve the stack of namespace lists.

Returns:
vector of namespace vectors

Definition at line 200 of file Stylesheet.hpp.

const NamespacesStackType& Stylesheet::getNamespaces (  )  const [inline]

Retrieve the stack of namespace lists.

Returns:
vector of namespace vectors

Definition at line 189 of file Stylesheet.hpp.

const NamespacesHandler& Stylesheet::getNamespacesHandler (  )  const [inline]

Definition at line 206 of file Stylesheet.hpp.

NamespacesHandler& Stylesheet::getNamespacesHandler (  )  [inline]

Definition at line 212 of file Stylesheet.hpp.

const StylesheetRoot& Stylesheet::getStylesheetRoot (  )  const [inline]

Retrieve the root stylesheet object.

Returns:
const reference to the stylesheet object

Definition at line 167 of file Stylesheet.hpp.

StylesheetRoot& Stylesheet::getStylesheetRoot (  )  [inline]

Retrieve the root stylesheet object.

Returns:
reference to the stylesheet object

Definition at line 178 of file Stylesheet.hpp.

virtual const XalanDOMString& Stylesheet::getURI (  )  const [virtual]

Retrieve the base URI for the resolver.

Returns:
URI string

Implements PrefixResolver.

const XalanDOMString& Stylesheet::getXSLTNamespaceURI (  )  const [inline]

Definition at line 697 of file Stylesheet.hpp.

double Stylesheet::getXSLTVerDeclared (  )  const [inline]

Retrieve XSLT version number.

Returns:
number representing XSLT version

Definition at line 145 of file Stylesheet.hpp.

bool Stylesheet::getYesOrNo ( const XalanDOMChar *  aname,
const XalanDOMChar *  val,
StylesheetConstructionContext constructionContext 
) const

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
ElemTemplateElement* Stylesheet::initWrapperless ( StylesheetConstructionContext constructionContext,
const Locator *  locator 
)
bool 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.

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 [inline]

whether there is a wrapper template

Returns:
true is there is a wrapper

Definition at line 491 of file Stylesheet.hpp.

const PatternTableVectorType* 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.

Parameters:
theName The name to match
const PatternTableVectorType* 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.

Parameters:
theName The name to match
const PatternTableVectorType* Stylesheet::locateMatchPatternDataList ( const XalanNode theNode,
XalanNode::NodeType  targetNodeType 
) const

Given a XalanNode, locate the start of a list of possible templates that match it.

Parameters:
XalanNode The node to match
ExtensionNSHandler* Stylesheet::lookupExtensionNSHandler ( const XalanDOMString uri  )  const [inline]

Return the handler for a given extension namespace.

Parameters:
uri the URI of the extension namespace.
Returns:
pointer to extension handler

Definition at line 655 of file Stylesheet.hpp.

void Stylesheet::popNamespaces (  )  [inline]

Pop a namespace declaration from the namespace stack.

Definition at line 263 of file Stylesheet.hpp.

virtual void Stylesheet::postConstruction ( StylesheetConstructionContext constructionContext  )  [virtual]

Called after construction is completed.

Reimplemented in StylesheetRoot.

void Stylesheet::processDecimalFormatElement ( StylesheetConstructionContext constructionContext,
const AttributeListType atts,
const Locator *  locator = 0 
)

Process an xsl:decimal-format element.

Parameters:
elemDecimalFormat the element
void Stylesheet::processExcludeResultPrefixes ( StylesheetConstructionContext theConstructionContext,
const XalanDOMChar *  theValue 
) [inline]

See if a namespace should be excluded.

Parameters:
theConstructionContext the current construction context.
theValue the prefix of the namespace.
Returns:

Definition at line 380 of file Stylesheet.hpp.

void 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).

Parameters:
constructionContext The current construction context.
uri The namespace URI of the extension.
void Stylesheet::processKeyElement ( const PrefixResolver nsContext,
const AttributeListType atts,
const Locator *  locator,
StylesheetConstructionContext constructionContext 
)

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.
void Stylesheet::processNSAliasElement ( const XalanDOMChar *  name,
const AttributeListType atts,
StylesheetConstructionContext constructionContext 
)

Process an xsl:namespace-alias element.

Parameters:
name the element name.
attrs the current attribute list
constructionContext the active construction context
void Stylesheet::pushNamespaces ( const AttributeListType atts  ) 

Push the namespace declarations from the current attribute list onto the namespace stack.

Parameters:
atts attribute list constaining namespaces
void Stylesheet::pushTopLevelVariables ( StylesheetExecutionContext executionContext,
const ParamVectorType topLevelParams 
) const

Set a list of top level variables in the specified execution context stylesheet.

Parameters:
executionContext current execution context
topLevelParams list of top level parameters
void Stylesheet::setNamespaceDecls ( const NamespaceVectorType ns  )  [inline]

Set the list of namespace declarations currently in effect.

Parameters:
ns vector of namespace vectors

Definition at line 245 of file Stylesheet.hpp.

void Stylesheet::setTopLevelVariable ( ElemVariable var  )  [inline]

Set a top level variable.

Parameters:
var top-level variable declared with "xsl:variable" or xsl:param-variable.

Definition at line 670 of file Stylesheet.hpp.

void Stylesheet::setXSLTNamespaceURI ( const XalanDOMString theURI  )  [inline]

Definition at line 703 of file Stylesheet.hpp.

void Stylesheet::setXSLTVerDeclared ( double  ver  )  [inline]

Set XSLT version number.

Parameters:
ver number representing XSLT version

Definition at line 156 of file Stylesheet.hpp.


Member Data Documentation

The base URL of the XSL document.

Definition at line 724 of file Stylesheet.hpp.

Table of KeyDeclaration objects, which are set by the xsl:key element.

Definition at line 730 of file Stylesheet.hpp.

The root of the stylesheet tree.

Definition at line 719 of file Stylesheet.hpp.

Definition at line 732 of file Stylesheet.hpp.

Definition at line 734 of file Stylesheet.hpp.


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.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo