Xalan-C++ API Reference  1.12.0
Public Types | Public Member Functions | List of all members
xalanc::StylesheetConstructionContext Class Referenceabstract

#include <xalanc/XSLT/StylesheetConstructionContext.hpp>

Inheritance diagram for xalanc::StylesheetConstructionContext:
[legend]
Collaboration diagram for xalanc::StylesheetConstructionContext:
[legend]

Public Types

enum  eElementToken {
  ELEMNAME_UNDEFINED = -2, ELEMNAME_EMPTY = -1, ELEMNAME_WITH_PARAM, ELEMNAME_APPLY_TEMPLATES,
  ELEMNAME_CHOOSE, ELEMNAME_COMMENT, ELEMNAME_COPY, ELEMNAME_COPY_OF,
  ELEMNAME_ATTRIBUTE, ELEMNAME_ATTRIBUTE_SET, ELEMNAME_EXTENSION, ELEMNAME_FOR_EACH,
  ELEMNAME_KEY, ELEMNAME_IF, ELEMNAME_IMPORT, ELEMNAME_INCLUDE,
  ELEMNAME_CALL_TEMPLATE, ELEMNAME_PARAM, ELEMNAME_NUMBER, ELEMNAME_OTHERWISE,
  ELEMNAME_PI, ELEMNAME_PRESERVE_SPACE, ELEMNAME_TEMPLATE, ELEMNAME_SORT,
  ELEMNAME_STRIP_SPACE, ELEMNAME_STYLESHEET, ELEMNAME_TEXT, ELEMNAME_VALUE_OF,
  ELEMNAME_WHEN, ELEMNAME_FALLBACK, ELEMNAME_ELEMENT, ELEMNAME_APPLY_IMPORTS,
  ELEMNAME_VARIABLE, ELEMNAME_MESSAGE, ELEMNAME_OUTPUT, ELEMNAME_DECIMAL_FORMAT,
  ELEMNAME_NAMESPACE_ALIAS, ELEMNAME_LITERAL_RESULT, ELEMNAME_TEXT_LITERAL_RESULT, ELEMNAME_FORWARD_COMPATIBLE,
  ELEMNAME_EXTENSION_CALL, ELEMNAME_EXTENSION_HANDLER
}
 IDs for XSL element types. More...
 
typedef XalanQName::NamespacesStackType NamespacesStackType
 
typedef URISupport::URLAutoPtrType URLAutoPtrType
 
- Public Types inherited from xalanc::XPathConstructionContext
typedef GetCachedString GetAndReleaseCachedString
 
- Public Types inherited from xalanc::ProblemListenerBase
enum  eSource {
  eXMLPARSER = 0, eXMLParser = 0, eXSLPROCESSOR = 1, eXSLTProcessor = 1,
  eXPATH = 2, eXPath = 2, eSourceCount
}
 
enum  eClassification {
  eMESSAGE = 0, eMessage = 0, eWARNING = 1, eWarning = 1,
  eERROR = 2, eError = 2, eClassificationCount
}
 
typedef eSource eProblemSource
 

Public Member Functions

 StylesheetConstructionContext (MemoryManager &theManager)
 
virtual ~StylesheetConstructionContext ()
 
virtual void problem (eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)=0
 Function that is called when a problem event occurs. More...
 
virtual void problem (eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)=0
 Function that is called when a problem event occurs. More...
 
virtual void reset ()=0
 Reset the instance. More...
 
virtual const XalanDOMStringgetPooledString (const XalanDOMString &theString)=0
 Get a pooled string given the source string. More...
 
virtual const XalanDOMStringgetPooledString (const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
 Get a pooled string given the source character array. More...
 
virtual XalanDOMStringgetCachedString ()=0
 Get a cached string for temporary use. More...
 
virtual bool releaseCachedString (XalanDOMString &theString)=0
 Return a cached string. More...
 
virtual StylesheetRootcreate (const XalanDOMString &theBaseIdentifier)=0
 Create a new StylesheetRoot instance. More...
 
virtual StylesheetRootcreate (const XSLTInputSource &theInputSource)=0
 Create a new StylesheetRoot instance. More...
 
virtual Stylesheetcreate (StylesheetRoot &theStylesheetRoot, const XalanDOMString &theBaseIdentifier)=0
 Create a new Stylesheet instance. More...
 
virtual void destroy (StylesheetRoot *theStylesheetRoot)=0
 Destroy a StylesheetRoot instance. More...
 
virtual URLAutoPtrType getURLFromString (const XalanDOMString &urlString)=0
 Determine the fully qualified URI for a string. More...
 
virtual XalanDOMStringgetURLStringFromString (const XalanDOMString &urlString, XalanDOMString &theResult)=0
 Determine the fully qualified URI for a string. More...
 
virtual URLAutoPtrType getURLFromString (const XalanDOMString &urlString, const XalanDOMString &base)=0
 Determine the fully qualified URI for a string. More...
 
virtual XalanDOMStringgetURLStringFromString (const XalanDOMString &urlString, const XalanDOMString &base, XalanDOMString &theResult)=0
 Determine the fully qualified URI for a string. More...
 
virtual const XalanDOMStringgetXSLTNamespaceURI () const =0
 Retrieve the URI for the current XSLT namespace, for example, "http://www.w3.org/1999/XSL/Transform". More...
 
virtual XPathcreateMatchPattern (const Locator *locator, const XalanDOMString &str, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)=0
 Create and initialize an xpath for a match pattern and return it. More...
 
virtual XPathcreateMatchPattern (const Locator *locator, const XalanDOMChar *str, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)=0
 Create and initialize an xpath for a match pattern and return it. More...
 
virtual XPathcreateXPath (const Locator *locator, const XalanDOMString &str, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)=0
 Create and initialize an xpath and return it. More...
 
virtual XPathcreateXPath (const Locator *locator, const XalanDOMChar *str, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)=0
 Create and initialize an xpath and return it. More...
 
virtual XPathcreateXPath (const Locator *locator, const XalanDOMChar *str, XalanDOMString::size_type len, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)=0
 Create and initialize an xpath and return it. More...
 
virtual const Locator * getLocatorFromStack () const =0
 Get the locator from the top of the locator stack. More...
 
virtual void pushLocatorOnStack (const Locator *locator)=0
 Push a locator on to the locator stack. More...
 
virtual void popLocatorStack ()=0
 Pop the locator from the top of the locator stack. More...
 
virtual const XalanDOMStringgetXalanXSLNameSpaceURL () const =0
 Get the Xalan namespace for built-in extensions. More...
 
virtual XalanDocumentparseXML (const XalanDOMString &urlString, DocumentHandler *docHandler, XalanDocument *docToRegister, ErrorHandler *theErrorHandler=0)=0
 Read in the XML file, either producing a Document or calling SAX events, and register the document in a table. More...
 
virtual bool isXMLSpaceAttribute (const XalanDOMChar *theAttributeName, const Stylesheet &theStylesheet, const Locator *theLocator=0)=0
 Given an name, determine if it is the xml:space attribute. More...
 
virtual bool isXSLUseAttributeSetsAttribute (const XalanDOMChar *theAttributeName, const Stylesheet &theStylesheet, const Locator *theLocator=0)=0
 Given an name, determine if it is the xsl:use-attribute-sets attribute. More...
 
virtual bool isValidQName (const XalanDOMChar *theName, const Stylesheet &theStylesheet, const Locator *theLocator=0)=0
 Given an name, determine if it is a valid QName. More...
 
virtual eElementToken getElementToken (const XalanDOMString &name) const =0
 Given an XSL tag name, return an integer token that corresponds to the enums defined above. More...
 
virtual double getXSLTVersionSupported () const =0
 Get the latest XSLT version currently supported. More...
 
virtual XalanDOMChar * allocateXalanDOMCharVector (XalanDOMString::size_type theLength)=0
 Allocate a vector of XalanDOMChar of the specified size. More...
 
virtual XalanDOMChar * allocateXalanDOMCharVector (const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos, bool fTerminate=true)=0
 Allocate a vector of XalanDOMChar of the specified size. More...
 
virtual const AVTcreateAVT (const Locator *locator, const XalanDOMChar *name, const XalanDOMChar *stringedValue, const PrefixResolver &resolver)=0
 Create an AVT instance. More...
 
virtual const AVTPartcreateAVTPart (const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
 Create an AVTPart instance. More...
 
virtual const AVTPartcreateAVTPart (const Locator *locator, const XalanDOMChar *str, XalanDOMString::size_type len, const PrefixResolver &resolver)=0
 Create an AVTPart instance. More...
 
virtual const AVT ** allocateAVTPointerVector (size_type theLength)=0
 Allocate a vector of const AVT* of the specified length. More...
 
virtual const AVTPart ** allocateAVTPartPointerVector (size_type theLength)=0
 Allocate a vector of const AVTPart* of the specified length. More...
 
virtual const XalanQNamecreateXalanQName (const XalanDOMString &qname, const NamespacesStackType &namespaces, const Locator *locator=0, bool fUseDefault=false)=0
 Create a XalanQName-derived instance. More...
 
virtual const XalanQNamecreateXalanQName (const XalanDOMChar *qname, const NamespacesStackType &namespaces, const Locator *locator=0, bool fUseDefault=false)=0
 Create a XalanQName-derived instance. More...
 
virtual const XalanQName ** tokenizeQNames (size_type &count, const XalanDOMChar *qnameTokens, const NamespacesStackType &namespaces, const Locator *locator=0, bool fUseDefault=false)=0
 Tokenize a string and return the QNames corresponding to those tokens. More...
 
virtual ElemTemplateElementcreateElement (int token, Stylesheet &stylesheetTree, const AttributeList &atts, const Locator *locator=0)=0
 Create a stylesheet element for the provided type. More...
 
virtual ElemTemplateElementcreateElement (int token, Stylesheet &stylesheetTree, const XalanDOMChar *name, const AttributeList &atts, const Locator *locator=0)=0
 Create a elements which have specific names. More...
 
virtual ElemTemplateElementcreateElement (Stylesheet &stylesheetTree, const XalanDOMChar *chars, XalanDOMString::size_type length, bool preserveSpace, bool disableOutputEscaping, const Locator *locator=0)=0
 Create a an element for literal text. More...
 
virtual ElemTemplateElementcreateElement (Stylesheet &stylesheetTree, const XalanDOMChar *name, const AttributeList &atts, ExtensionNSHandler &handler, const Locator *locator=0)=0
 Create an element to handle an extension element. More...
 
virtual const XalanMatchPatternDatacreateXalanMatchPatternData (const ElemTemplate &theTemplate, size_type thePosition, const XalanDOMString &theTargetString, const XPath &theMatchPattern, const XalanDOMString &thePatternString, XPath::eMatchScore thePriority)=0
 Create an instance of XalanMatchPatternData, which describes data related to a match pattern and template in stylesheet. More...
 
- Public Member Functions inherited from xalanc::XPathConstructionContext
 XPathConstructionContext (MemoryManager &theManager)
 
virtual ~XPathConstructionContext ()
 
MemoryManager & getMemoryManager () const
 
MemoryManager & getMemoryManager ()
 
- Public Member Functions inherited from xalanc::ProblemListenerBase
 ProblemListenerBase ()
 
virtual ~ProblemListenerBase ()
 

Additional Inherited Members

- Static Public Member Functions inherited from xalanc::ProblemListenerBase
static void defaultFormat (PrintWriter &pw, eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)
 Function to format a problem call to a PrintWriter instance. More...
 
static void defaultFormat (PrintWriter &pw, eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)
 Function to format a problem call to a PrintWriter instance. More...
 
- Static Protected Attributes inherited from xalanc::ProblemListenerBase
static const XalanMessages::Codes s_messageCodes [eSourceCount][eClassificationCount]
 

Detailed Description

Definition at line 83 of file StylesheetConstructionContext.hpp.

Member Typedef Documentation

◆ NamespacesStackType

Definition at line 87 of file StylesheetConstructionContext.hpp.

◆ URLAutoPtrType

Definition at line 157 of file StylesheetConstructionContext.hpp.

Member Enumeration Documentation

◆ eElementToken

IDs for XSL element types.

These are the values that must be returned by getElementToken().

Enumerator
ELEMNAME_UNDEFINED 
ELEMNAME_EMPTY 
ELEMNAME_WITH_PARAM 
ELEMNAME_APPLY_TEMPLATES 
ELEMNAME_CHOOSE 
ELEMNAME_COMMENT 
ELEMNAME_COPY 
ELEMNAME_COPY_OF 
ELEMNAME_ATTRIBUTE 
ELEMNAME_ATTRIBUTE_SET 
ELEMNAME_EXTENSION 
ELEMNAME_FOR_EACH 
ELEMNAME_KEY 
ELEMNAME_IF 
ELEMNAME_IMPORT 
ELEMNAME_INCLUDE 
ELEMNAME_CALL_TEMPLATE 
ELEMNAME_PARAM 
ELEMNAME_NUMBER 
ELEMNAME_OTHERWISE 
ELEMNAME_PI 
ELEMNAME_PRESERVE_SPACE 
ELEMNAME_TEMPLATE 
ELEMNAME_SORT 
ELEMNAME_STRIP_SPACE 
ELEMNAME_STYLESHEET 
ELEMNAME_TEXT 
ELEMNAME_VALUE_OF 
ELEMNAME_WHEN 
ELEMNAME_FALLBACK 
ELEMNAME_ELEMENT 
ELEMNAME_APPLY_IMPORTS 
ELEMNAME_VARIABLE 
ELEMNAME_MESSAGE 
ELEMNAME_OUTPUT 
ELEMNAME_DECIMAL_FORMAT 
ELEMNAME_NAMESPACE_ALIAS 
ELEMNAME_LITERAL_RESULT 
ELEMNAME_TEXT_LITERAL_RESULT 
ELEMNAME_FORWARD_COMPATIBLE 
ELEMNAME_EXTENSION_CALL 
ELEMNAME_EXTENSION_HANDLER 

Definition at line 93 of file StylesheetConstructionContext.hpp.

Constructor & Destructor Documentation

◆ StylesheetConstructionContext()

xalanc::StylesheetConstructionContext::StylesheetConstructionContext ( MemoryManager &  theManager)
explicit

◆ ~StylesheetConstructionContext()

virtual xalanc::StylesheetConstructionContext::~StylesheetConstructionContext ( )
virtual

Member Function Documentation

◆ allocateAVTPartPointerVector()

virtual const AVTPart** xalanc::StylesheetConstructionContext::allocateAVTPartPointerVector ( size_type  theLength)
pure virtual

Allocate a vector of const AVTPart* of the specified length.

Parameters
theLengthThe length of the vector
Returns
A pointer to the vector.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ allocateAVTPointerVector()

virtual const AVT** xalanc::StylesheetConstructionContext::allocateAVTPointerVector ( size_type  theLength)
pure virtual

Allocate a vector of const AVT* of the specified length.

Parameters
theLengthThe length of the vector
Returns
A pointer to the vector.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ allocateXalanDOMCharVector() [1/2]

virtual XalanDOMChar* xalanc::StylesheetConstructionContext::allocateXalanDOMCharVector ( const XalanDOMChar *  theString,
XalanDOMString::size_type  theLength = XalanDOMString::npos,
bool  fTerminate = true 
)
pure virtual

Allocate a vector of XalanDOMChar of the specified size.

Parameters
theStringThe source character array
theLengthThe length of the character vector
fTerminateIf true, terminate the new vector with 0
Returns
A pointer to the array.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ allocateXalanDOMCharVector() [2/2]

virtual XalanDOMChar* xalanc::StylesheetConstructionContext::allocateXalanDOMCharVector ( XalanDOMString::size_type  theLength)
pure virtual

Allocate a vector of XalanDOMChar of the specified size.

Parameters
theLengthThe length of the character vector
Returns
A pointer to the vector.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ create() [1/3]

virtual StylesheetRoot* xalanc::StylesheetConstructionContext::create ( const XalanDOMString theBaseIdentifier)
pure virtual

Create a new StylesheetRoot instance.

The StylesheetConstructionContext instance owns the StylesheetRoot instance, and will delete it when asked or when the StylesheetConstructionContext instance is destroyed.

Parameters
theBaseIdentifierA URI to the stylesheet file.
Returns
A pointer to a new StylesheetRoot instance.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ create() [2/3]

virtual StylesheetRoot* xalanc::StylesheetConstructionContext::create ( const XSLTInputSource theInputSource)
pure virtual

Create a new StylesheetRoot instance.

The StylesheetConstructionContext instance owns the StylesheetRoot instance, and will delete it when asked or when the StylesheetConstructionContext instance is destroyed.

Parameters
theInputSourceA reference to the input source.
Returns
A pointer to a new StylesheetRoot instance.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ create() [3/3]

virtual Stylesheet* xalanc::StylesheetConstructionContext::create ( StylesheetRoot theStylesheetRoot,
const XalanDOMString theBaseIdentifier 
)
pure virtual

Create a new Stylesheet instance.

The StylesheetConstructionContext instance owns the Stylesheet instance, and will delete it when asked or when the StylesheetConstructionContext instance is destroyed.

Parameters
Areference to the StylesheetRoot instance.
theBaseIdentifierA URI to the stylesheet file.
Returns
A pointer to a new StylesheetRoot instance.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ createAVT()

virtual const AVT* xalanc::StylesheetConstructionContext::createAVT ( const Locator *  locator,
const XalanDOMChar *  name,
const XalanDOMChar *  stringedValue,
const PrefixResolver resolver 
)
pure virtual

Create an AVT instance.

Parameters
locatorthe Locator for the instance. May be null.
namename of AVT
stringedValuestring value to parse
resolverresolver for namespace resolution
Returns
A pointer to the instance.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ createAVTPart() [1/2]

virtual const AVTPart* xalanc::StylesheetConstructionContext::createAVTPart ( const Locator *  locator,
const XalanDOMChar *  str,
XalanDOMString::size_type  len,
const PrefixResolver resolver 
)
pure virtual

Create an AVTPart instance.

Parameters
locatorthe Locator for the instance. May be null.
strThe XPath expression for the instance
lenThe length of the expression
resolverresolver for namespace resolution
Returns
A pointer to the instance.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ createAVTPart() [2/2]

virtual const AVTPart* xalanc::StylesheetConstructionContext::createAVTPart ( const XalanDOMChar *  theString,
XalanDOMString::size_type  theLength = XalanDOMString::npos 
)
pure virtual

Create an AVTPart instance.

Parameters
theStringThe source character array
theLengthThe length of the character vector
fTerminateIf true, terminate the new vector with 0
Returns
A pointer to the instance.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ createElement() [1/4]

virtual ElemTemplateElement* xalanc::StylesheetConstructionContext::createElement ( int  token,
Stylesheet stylesheetTree,
const AttributeList &  atts,
const Locator *  locator = 0 
)
pure virtual

Create a stylesheet element for the provided type.

The instance owns the memory and will delete the element when it goes out of scope and the containing stylesheet is destroyed.

Parameters
tokenThe enum value of the element to create.
stylesheetTreeThe stylesheet containing the element
attsThe list of attributes for the element
locatorThe Locator instance for error reporting. May be 0.
Returns
A pointer to the new instance.

◆ createElement() [2/4]

virtual ElemTemplateElement* xalanc::StylesheetConstructionContext::createElement ( int  token,
Stylesheet stylesheetTree,
const XalanDOMChar *  name,
const AttributeList &  atts,
const Locator *  locator = 0 
)
pure virtual

Create a elements which have specific names.

The instance owns the memory and will delete the element when it goes out of scope and the containing stylesheet is destroyed.

Parameters
tokenThe enum value of the element to create.
stylesheetTreeThe stylesheet containing the element
nameThe name of the element
attsThe list of attributes for the element
locatorThe Locator instance for error reporting. May be 0.
Returns
A pointer to the new instance.

◆ createElement() [3/4]

virtual ElemTemplateElement* xalanc::StylesheetConstructionContext::createElement ( Stylesheet stylesheetTree,
const XalanDOMChar *  chars,
XalanDOMString::size_type  length,
bool  preserveSpace,
bool  disableOutputEscaping,
const Locator *  locator = 0 
)
pure virtual

Create a an element for literal text.

The instance owns the memory and will delete the element when it goes out of scope and the containing stylesheet is destroyed.

Parameters
stylesheetTreeThe stylesheet containing the element
charsThe pointer to character string for element
lengthlength of the chars parameter.
preserveSpacetrue is space should be preserved
disableOutputEscapingtrue if output escaping should be disabled
locatorThe Locator instance for error reporting. May be 0.
Returns
A pointer to the new instance.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ createElement() [4/4]

virtual ElemTemplateElement* xalanc::StylesheetConstructionContext::createElement ( Stylesheet stylesheetTree,
const XalanDOMChar *  name,
const AttributeList &  atts,
ExtensionNSHandler handler,
const Locator *  locator = 0 
)
pure virtual

Create an element to handle an extension element.

The instance owns the memory and will delete the element when it goes out of scope and the containing stylesheet is destroyed.

Parameters
stylesheetTreeThe stylesheet containing the element
nameThe name of the element
attsThe list of attributes for the element
handlerThe handler for elements in the extension namespace
locatorThe Locator instance for error reporting. May be 0.
Returns
A pointer to the new instance.

◆ createMatchPattern() [1/2]

virtual XPath* xalanc::StylesheetConstructionContext::createMatchPattern ( const Locator *  locator,
const XalanDOMChar *  str,
const PrefixResolver resolver,
bool  allowVariableReferences = true,
bool  allowKeyFunction = true 
)
pure virtual

Create and initialize an xpath for a match pattern and return it.

This is to be used by stylesheet elements that need an XPath that is guaranteed to persist while it lives.

Parameters
locatorthe locator for the XPath. May be null.
strstring to match
resolverresolver for namespace resolution
allowVariableReferencesIf true, variable references are allowed.
allowKeyFunctionIf true, calls to the key() function are allowed.
Returns
XPath for match pattern

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ createMatchPattern() [2/2]

virtual XPath* xalanc::StylesheetConstructionContext::createMatchPattern ( const Locator *  locator,
const XalanDOMString str,
const PrefixResolver resolver,
bool  allowVariableReferences = true,
bool  allowKeyFunction = true 
)
pure virtual

Create and initialize an xpath for a match pattern and return it.

This is to be used by stylesheet elements that need an XPath that is guaranteed to persist while it lives.

Parameters
locatorthe locator for the XPath. May be null.
strstring to match
resolverresolver for namespace resolution
allowVariableReferencesIf true, variable references are allowed.
allowKeyFunctionIf true, calls to the key() function are allowed.
Returns
XPath for match pattern

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ createXalanMatchPatternData()

virtual const XalanMatchPatternData* xalanc::StylesheetConstructionContext::createXalanMatchPatternData ( const ElemTemplate theTemplate,
size_type  thePosition,
const XalanDOMString theTargetString,
const XPath theMatchPattern,
const XalanDOMString thePatternString,
XPath::eMatchScore  thePriority 
)
pure virtual

Create an instance of XalanMatchPatternData, which describes data related to a match pattern and template in stylesheet.

The instance owns the memory and will delete the element when it goes out of scope and the containing stylesheet is destroyed.

Parameters
theTemplateThe ElemTemplate node that contains the template for this pattern
thePositionThe position in the stylesheet
theTargetStringThe target string for match pattern
TheMatchPatternThe match pattern
thePatternStringthe pattern string
thePriorityThe priority for the match pattern.
Returns
A pointer to the new instance.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ createXalanQName() [1/2]

virtual const XalanQName* xalanc::StylesheetConstructionContext::createXalanQName ( const XalanDOMChar *  qname,
const NamespacesStackType namespaces,
const Locator *  locator = 0,
bool  fUseDefault = false 
)
pure virtual

Create a XalanQName-derived instance.

Parameters
qnameThe qname string
namespacesThe stack of namespaces
LocatorThe current Locator, if any
fUseDefaultIf true, a qname without a prefix will use the default namespace
Returns
A pointer to the new instance

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ createXalanQName() [2/2]

virtual const XalanQName* xalanc::StylesheetConstructionContext::createXalanQName ( const XalanDOMString qname,
const NamespacesStackType namespaces,
const Locator *  locator = 0,
bool  fUseDefault = false 
)
pure virtual

Create a XalanQName-derived instance.

Parameters
qnameThe qname string
namespacesThe stack of namespaces
LocatorThe current Locator, if any
fUseDefaultIf true, a qname without a prefix will use the default namespace
Returns
A pointer to the new instance

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ createXPath() [1/3]

virtual XPath* xalanc::StylesheetConstructionContext::createXPath ( const Locator *  locator,
const XalanDOMChar *  str,
const PrefixResolver resolver,
bool  allowVariableReferences = true,
bool  allowKeyFunction = true 
)
pure virtual

Create and initialize an xpath and return it.

This is to be used by stylesheet elements that need an XPath that is guaranteed to persist while it lives.

Parameters
locatorthe locator for the XPath. May be null.
strstring to match
resolverresolver for namespace resolution
Returns
XPath for string matched

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ createXPath() [2/3]

virtual XPath* xalanc::StylesheetConstructionContext::createXPath ( const Locator *  locator,
const XalanDOMChar *  str,
XalanDOMString::size_type  len,
const PrefixResolver resolver,
bool  allowVariableReferences = true,
bool  allowKeyFunction = true 
)
pure virtual

Create and initialize an xpath and return it.

This is to be used by stylesheet elements that need an XPath that is guaranteed to persist while it lives.

Parameters
locatorthe locator for the XPath. May be null.
strstring to match
resolverresolver for namespace resolution
Returns
XPath for string matched

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ createXPath() [3/3]

virtual XPath* xalanc::StylesheetConstructionContext::createXPath ( const Locator *  locator,
const XalanDOMString str,
const PrefixResolver resolver,
bool  allowVariableReferences = true,
bool  allowKeyFunction = true 
)
pure virtual

Create and initialize an xpath and return it.

This is to be used by stylesheet elements that need an XPath that is guaranteed to persist while it lives.

Parameters
locatorthe locator for the XPath. May be null.
strstring to match
resolverresolver for namespace resolution
Returns
XPath for string matched

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ destroy()

virtual void xalanc::StylesheetConstructionContext::destroy ( StylesheetRoot theStylesheetRoot)
pure virtual

Destroy a StylesheetRoot instance.

If this StylesheetConstructionContext instance does not own the StylesheetRoot, it will not delete it

Parameters
theStylesheetA pointer to the StylesheetRoot instance to delete.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ getCachedString()

virtual XalanDOMString& xalanc::StylesheetConstructionContext::getCachedString ( )
pure virtual

Get a cached string for temporary use.

Returns
A reference to the string

Implements xalanc::XPathConstructionContext.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ getElementToken()

virtual eElementToken xalanc::StylesheetConstructionContext::getElementToken ( const XalanDOMString name) const
pure virtual

Given an XSL tag name, return an integer token that corresponds to the enums defined above.

Parameters
namea probable xsl:xxx element
Returns
The enum value for that token, or ELEMNAME_UNDEFINED

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ getLocatorFromStack()

virtual const Locator* xalanc::StylesheetConstructionContext::getLocatorFromStack ( ) const
pure virtual

Get the locator from the top of the locator stack.

Returns
A pointer to the Locator, or 0 if there is nothing on the stack.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ getPooledString() [1/2]

virtual const XalanDOMString& xalanc::StylesheetConstructionContext::getPooledString ( const XalanDOMChar *  theString,
XalanDOMString::size_type  theLength = XalanDOMString::npos 
)
pure virtual

Get a pooled string given the source character array.

If the string already exists in the pool, no copy will be made. If not, a copy will be made and kept for later use.

Parameters
theStringThe source character array
theLengthThe length of the character array
Returns
a const reference to a pooled string.

Implements xalanc::XPathConstructionContext.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ getPooledString() [2/2]

virtual const XalanDOMString& xalanc::StylesheetConstructionContext::getPooledString ( const XalanDOMString theString)
pure virtual

Get a pooled string given the source string.

If the string already exists in the pool, no copy will be made. If not, a copy will be made and kept for later use.

Parameters
theStringThe source string
Returns
a const reference to a pooled string.

Implements xalanc::XPathConstructionContext.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ getURLFromString() [1/2]

virtual URLAutoPtrType xalanc::StylesheetConstructionContext::getURLFromString ( const XalanDOMString urlString)
pure virtual

Determine the fully qualified URI for a string.

Parameters
urlStringstring to qualify
Returns
auto pointer to fully qualified URI

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ getURLFromString() [2/2]

virtual URLAutoPtrType xalanc::StylesheetConstructionContext::getURLFromString ( const XalanDOMString urlString,
const XalanDOMString base 
)
pure virtual

Determine the fully qualified URI for a string.

Parameters
urlStringstring to qualify
basebase location for URI
Returns
auto pointer to fully qualified URI

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ getURLStringFromString() [1/2]

virtual XalanDOMString& xalanc::StylesheetConstructionContext::getURLStringFromString ( const XalanDOMString urlString,
const XalanDOMString base,
XalanDOMString theResult 
)
pure virtual

Determine the fully qualified URI for a string.

Parameters
urlStringstring to qualify
basebase location for URI
Returns
string to fully qualified URI

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ getURLStringFromString() [2/2]

virtual XalanDOMString& xalanc::StylesheetConstructionContext::getURLStringFromString ( const XalanDOMString urlString,
XalanDOMString theResult 
)
pure virtual

Determine the fully qualified URI for a string.

Parameters
urlStringstring to qualify
Returns
string to fully qualified URI

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ getXalanXSLNameSpaceURL()

virtual const XalanDOMString& xalanc::StylesheetConstructionContext::getXalanXSLNameSpaceURL ( ) const
pure virtual

Get the Xalan namespace for built-in extensions.

Returns
Xalan namespace for extensions

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ getXSLTNamespaceURI()

virtual const XalanDOMString& xalanc::StylesheetConstructionContext::getXSLTNamespaceURI ( ) const
pure virtual

Retrieve the URI for the current XSLT namespace, for example, "http://www.w3.org/1999/XSL/Transform".

Returns
URI string

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ getXSLTVersionSupported()

virtual double xalanc::StylesheetConstructionContext::getXSLTVersionSupported ( ) const
pure virtual

Get the latest XSLT version currently supported.

Returns
XSLT version number

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ isValidQName()

virtual bool xalanc::StylesheetConstructionContext::isValidQName ( const XalanDOMChar *  theName,
const Stylesheet theStylesheet,
const Locator *  theLocator = 0 
)
pure virtual

Given an name, determine if it is a valid QName.

Parameters
theNameThe name to check
theStylesheetThe current Stylesheet instance
theLocatorThe Locator for error reporting. May be 0.
Returns
true if the string is a valid QName.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ isXMLSpaceAttribute()

virtual bool xalanc::StylesheetConstructionContext::isXMLSpaceAttribute ( const XalanDOMChar *  theAttributeName,
const Stylesheet theStylesheet,
const Locator *  theLocator = 0 
)
pure virtual

Given an name, determine if it is the xml:space attribute.

Parameters
theAttributeNameThe name to check
theStylesheetThe current Stylesheet instance
theLocatorThe Locator for error reporting. May be 0.
Returns
true if the string is the xml:space attribute name

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ isXSLUseAttributeSetsAttribute()

virtual bool xalanc::StylesheetConstructionContext::isXSLUseAttributeSetsAttribute ( const XalanDOMChar *  theAttributeName,
const Stylesheet theStylesheet,
const Locator *  theLocator = 0 
)
pure virtual

Given an name, determine if it is the xsl:use-attribute-sets attribute.

Parameters
theAttributeNameThe name to check
theStylesheetThe current Stylesheet instance
theLocatorThe Locator for error reporting. May be 0.
Returns
true if the string is the xsl:use-attribute-sets attribute name

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ parseXML()

virtual XalanDocument* xalanc::StylesheetConstructionContext::parseXML ( const XalanDOMString urlString,
DocumentHandler *  docHandler,
XalanDocument docToRegister,
ErrorHandler *  theErrorHandler = 0 
)
pure virtual

Read in the XML file, either producing a Document or calling SAX events, and register the document in a table.

If the document has already been read in, it will not be reparsed.

Parameters
urlStringlocation of the XML
docHandlerpointer to SAX event handler
docToRegisterif using a SAX event handler, the object to register in the source docs table.
Returns
document object, which represents the parsed XML
Exceptions
SAXException

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ popLocatorStack()

virtual void xalanc::StylesheetConstructionContext::popLocatorStack ( )
pure virtual

Pop the locator from the top of the locator stack.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ problem() [1/2]

virtual void xalanc::StylesheetConstructionContext::problem ( eSource  source,
eClassification  classification,
const XalanDOMString msg,
const Locator *  locator,
const XalanNode sourceNode 
)
pure virtual

Function that is called when a problem event occurs.

Parameters
sourceEither eXMLParser, eXSLProcessor, or eXPATH.
classificationEither eMessage, eWarning, or eError.
locatorThe current Locator instance for the stylesheet. Maybe be a null pointer.
sourceNodeThe current source node, if any.
msgThe error message.

Implements xalanc::XPathConstructionContext.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ problem() [2/2]

virtual void xalanc::StylesheetConstructionContext::problem ( eSource  source,
eClassification  classification,
const XalanDOMString msg,
const XalanNode sourceNode 
)
pure virtual

Function that is called when a problem event occurs.

This version assumes location information is already formatted into the message.

Parameters
sourceeither eXMLPARSER, eXSLPROCESSOR, or eXPATH
classificationeither eMESSAGE, eERROR or eWARNING
msgstring message explaining the problem.

Implements xalanc::XPathConstructionContext.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ pushLocatorOnStack()

virtual void xalanc::StylesheetConstructionContext::pushLocatorOnStack ( const Locator *  locator)
pure virtual

Push a locator on to the locator stack.

Parameters
Apointer to the Locator to push.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ releaseCachedString()

virtual bool xalanc::StylesheetConstructionContext::releaseCachedString ( XalanDOMString theString)
pure virtual

Return a cached string.

Parameters
theStringThe string to release.
Returns
true if the string was released successfully.

Implements xalanc::XPathConstructionContext.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ reset()

virtual void xalanc::StylesheetConstructionContext::reset ( )
pure virtual

Reset the instance.

Any existing objects created by the instance will be destroyed.

Implements xalanc::XPathConstructionContext.

Implemented in xalanc::StylesheetConstructionContextDefault.

◆ tokenizeQNames()

virtual const XalanQName** xalanc::StylesheetConstructionContext::tokenizeQNames ( size_type count,
const XalanDOMChar *  qnameTokens,
const NamespacesStackType namespaces,
const Locator *  locator = 0,
bool  fUseDefault = false 
)
pure virtual

Tokenize a string and return the QNames corresponding to those tokens.

Parameters
countThe number of namespaces in the vector returned
qnameTokensThe string to tokenize
namespacesThe stack of namespaces
LocatorThe current Locator, if any
fUseDefaultIf true, qnames without prefixes will use the default namespace
Returns
The resulting vector of XalanQName instances.

Implemented in xalanc::StylesheetConstructionContextDefault.


The documentation for this class was generated from the following file: