## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.9

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# StylesheetConstructionContextDefault Class Reference

An default implementation of an abtract class which provides support for constructing the internal representation of a stylesheet. More...

Inheritance diagram for StylesheetConstructionContextDefault:

[legend]
Collaboration diagram for StylesheetConstructionContextDefault:

[legend]
List of all members.

## Public Types

- typedef XalanArrayAllocator<
  XalanDOMChar > XalanDOMCharVectorAllocatorType
- typedef XalanArrayAllocator<
  const void * > PointerVectorAllocatorType
- typedef XalanDOMCharVectorAllocatorType::size_type VectorAllocatorSizeType
- typedef XalanVector< StylesheetRoot * > StylesheetVectorType
- typedef XalanVector< ElemTemplateElement * > ElemTemplateElementVectorType
- enum {
  eDefaultXalanDOMCharVectorBlockSize = 1024, eDefaultAVTBlockSize = 128, eDefaultAVTPartSimpleBlockSize = 128, eDefaultAVTPartXPathBlockSize = 128,
  eDefaultXalanQNameByValueBlockSize = 32, eDefaultPointerVectorBlockSize = 512, eDefaultElemApplyTemplatesBlockSize = 10, eDefaultElemAttributeBlockSize = 10,
  eDefaultElemAttributeSetBlockSize = 10, eDefaultElemCallTemplateBlockSize = 10, eDefaultElemElementBlockSize = 10, eDefaultElemLiteralResultBlockSize = 20,
  eDefaultElemTemplateBlockSize = 10, eDefaultElemTextLiteralBlockSize = 20, eDefaultElemValueOfBlockSize = 10, eDefaultElemVariableBlockSize = 10,
  eDefaultMatchPatternDataBlockSize = 10
  }

## Public Member Functions

- StylesheetConstructionContextDefault (MemoryManagerType &theManager, XSLTEngineImpl &processor, XPathFactory &xpathFactory, VectorAllocatorSizeType theXalanDOMCharVectorAllocatorBlockSize=eDefaultXalanDOMCharVectorBlockSize, XalanAVTAllocator::size_type theAVTAllocatorBlockSize=eDefaultAVTBlockSize, XalanAVTPartSimpleAllocator::size_type theAVTPartSimpleAllocatorBlockSize=eDefaultAVTPartSimpleBlockSize, XalanAVTPartXPathAllocator::size_type theAVTPartXPathAllocatorBlockSize=eDefaultAVTPartXPathBlockSize, XalanQNameByValueAllocator::size_type theXalanQNameByValueAllocatorBlockSize=eDefaultXalanQNameByValueBlockSize, VectorAllocatorSizeType thePointerVectorAllocatorBlockSize=eDefaultPointerVectorBlockSize)
- virtual ~StylesheetConstructionContextDefault ()
- virtual void error (const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const
- virtual void error (const XalanDOMString &msg, const XalanNode *sourceNode, const LocatorType *locator) const
- virtual void warn (const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const
- virtual void warn (const XalanDOMString &msg, const XalanNode *sourceNode, const LocatorType *locator) const
- virtual void message (const XalanDOMString &msg, const XalanNode *sourceNode=0, const ElemTemplateElement *styleNode=0) const
- virtual void message (const XalanDOMString &msg, const XalanNode *sourceNode, const LocatorType *locator) const
- virtual void reset ()
    Reset the StylesheetConstructionContext instance.
- virtual StylesheetRoot * create (const XalanDOMString &theBaseIdentifier)
    Create a new StylesheetRoot instance.
- virtual StylesheetRoot * create (const XSLTInputSource &theInputSource)
    Create a new StylesheetRoot instance.
- virtual Stylesheet * create (StylesheetRoot &theStylesheetRoot, const XalanDOMString &theBaseIdentifier)
    Create a new Stylesheet instance.
- virtual void destroy (StylesheetRoot *theStylesheetRoot)
    Destroy a StylesheetRoot instance.
- virtual URLAutoPtrType getURLFromString (const XalanDOMString &urlString)
    Determine the fully qualified URI for a string.
- virtual XalanDOMString & getURLStringFromString (const XalanDOMString &urlString, XalanDOMString &theResult)
    Determine the fully qualified URI for a string.
- virtual URLAutoPtrType getURLFromString (const XalanDOMString &urlString, const XalanDOMString &base)
    Determine the fully qualified URI for a string.
- virtual XalanDOMString & getURLStringFromString (const XalanDOMString &urlString, const XalanDOMString &base, XalanDOMString &theResult)
    Determine the fully qualified URI for a string.
- virtual const XalanDOMString & getXSLTNamespaceURI () const
    Retrieve the URI for the current XSLT namespace, for example, "http://www.w3.org/1999/XSL/Transform".
- virtual XPath * createMatchPattern (const LocatorType *locator, const XalanDOMString &str, const PrefixResolver &resolver)
    Create and initialize an xpath for a match pattern and return it.
- virtual XPath * createMatchPattern (const LocatorType *locator, const XalanDOMChar *str, const PrefixResolver &resolver)
    Create and initialize an xpath for a match pattern and return it.
- virtual XPath * createXPath (const LocatorType *locator, const XalanDOMString &str, const PrefixResolver &resolver)
    Create and initialize an xpath and return it.
- virtual XPath * createXPath (const LocatorType *locator, const XalanDOMChar *str, XalanDOMString::size_type len, const PrefixResolver &resolver)
    Create and initialize an xpath and return it.
- virtual XPath * createXPath (const LocatorType *locator, const XalanDOMChar *str, const PrefixResolver &resolver)
    Create and initialize an xpath and return it.
- virtual const LocatorType * getLocatorFromStack () const
    Get the locator from the top of the locator stack.
- virtual void pushLocatorOnStack (const LocatorType *locator)
    Push a locator on to the locator stack.
- virtual void popLocatorStack ()
    Pop the locator from the top of the locator stack.
- virtual const XalanDOMString & getXalanXSLNameSpaceURL () const
    Get the Xalan namespace for built-in extensions.
- virtual XalanDocument * parseXML (const XalanDOMString &urlString, DocumentHandlerType *docHandler, XalanDocument *docToRegister)
    Read in the XML file, either producing a Document or calling SAX events, and register the document in a table.
- virtual bool isXMLSpaceAttribute (const XalanDOMChar *theAttributeName, const Stylesheet &theStylesheet, const LocatorType *theLocator=0)
    Given an name, determine if it is the xml:space attribute.
- virtual bool isXSLUseAttributeSetsAttribute (const XalanDOMChar *theAttributeName, const Stylesheet &theStylesheet, const LocatorType *theLocator=0)
    Given an name, determine if it is the xsl:use-attribute-sets attribute.
- virtual bool isValidQName (const XalanDOMChar *theName, const Stylesheet &theStylesheet, const LocatorType *theLocator=0)
    Given an name, determine if it is a valid QName.
- virtual eElementToken getElementToken (const XalanDOMString &name) const
    Given an XSL tag name, return an integer token that corresponds to the enums defined above.
- virtual double getXSLTVersionSupported () const
    Get the latest XSLT version currently supported.
- virtual const XalanDOMString & getPooledString (const XalanDOMString &theString)
    Get a pooled string given the source string.
- virtual const XalanDOMString & getPooledString (const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos)
    Get a pooled string given the source character array.
- virtual XalanDOMString & getCachedString ()
    Get a cached string for temporary use.
- virtual bool releaseCachedString (XalanDOMString &theString)
    Return a cached string.
- virtual XalanDOMChar * allocateXalanDOMCharVector (XalanDOMString::size_type theLength)
    Allocate a vector of XalanDOMChar of the specified size.
- virtual XalanDOMChar * allocateXalanDOMCharVector (const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos, bool fTerminate=true)
    Allocate a vector of XalanDOMChar of the specified size.
- virtual const AVT * createAVT (const LocatorType *locator, const XalanDOMChar *name, const XalanDOMChar *stringedValue, const PrefixResolver &resolver)
    Create an AVT instance.
- virtual const AVTPart * createAVTPart (const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos)
    Create an AVTPart instance.
- virtual const AVTPart * createAVTPart (const LocatorType *locator, const XalanDOMChar *str, XalanDOMString::size_type len, const PrefixResolver &resolver)
    Create an AVTPart instance.
- virtual const AVT ** allocateAVTPointerVector (size_type theLength)
    Allocate a vector of const AVT* of the specified length.
- virtual const AVTPart ** allocateAVTPartPointerVector (size_type theLength)
    Allocate a vector of const AVTPart* of the specified length.
- virtual const XalanQName * createXalanQName (const XalanDOMString &qname, const NamespacesStackType &namespaces, const LocatorType *locator=0, bool fUseDefault=false)
    Create a XalanQName-derived instance.
- virtual const XalanQName * createXalanQName (const XalanDOMChar *qname, const NamespacesStackType &namespaces, const LocatorType *locator=0, bool fUseDefault=false)
    Create a XalanQName-derived instance.
- virtual const XalanQName ** tokenizeQNames (size_type &count, const XalanDOMChar *qnameTokens, const NamespacesStackType &namespaces, const LocatorType *locator=0, bool fUseDefault=false)
    Tokenize a string and return the QNames corresponding to those tokens.
- virtual ElemTemplateElement * createElement (int token, Stylesheet &stylesheetTree, const AttributeListType &atts, const LocatorType *locator=0)
    Create a stylesheet element for the provided type.
- virtual ElemTemplateElement * createElement (int token, Stylesheet &stylesheetTree, const XalanDOMChar *name, const AttributeListType &atts, const LocatorType *locator=0)
    Create a elements which have specific names.
- virtual ElemTemplateElement * createElement (Stylesheet &stylesheetTree, const XalanDOMChar *chars, XalanDOMString::size_type length, bool preserveSpace, bool disableOutputEscaping, const LocatorType *locator=0)
    Create a an element for literal text.
- virtual ElemTemplateElement * createElement (Stylesheet &stylesheetTree, const XalanDOMChar *name, const AttributeListType &atts, ExtensionNSHandler &handler, const LocatorType *locator=0)
    Create an element to handle an extension element.
- virtual const XalanMatchPatternData * createXalanMatchPatternData (const ElemTemplate &theTemplate, size_type thePosition, const XalanDOMString &theTargetString, const XPath &theMatchPattern, const XalanDOMString &thePatternString, XPath::eMatchScore thePriority)
    Create an instance of XalanMatchPatternData, which describes data related to a match pattern and template in stylesheet.

## Static Public Member Functions

- eElementToken getElementNameToken (const XalanDOMString &name)

## Detailed Description

An default implementation of an abtract class which provides support for constructing the internal representation of a stylesheet.

## Member Typedef Documentation

typedef XalanVector<ElemTemplateElement*> StylesheetConstructionContextDefault::ElemTemplateElementVectorType

typedef XalanArrayAllocator<const void*> StylesheetConstructionContextDefault::PointerVectorAllocatorType

typedef XalanVector<StylesheetRoot*> StylesheetConstructionContextDefault::StylesheetVectorType

typedef XalanDOMCharVectorAllocatorType::size_type StylesheetConstructionContextDefault::VectorAllocatorSizeType

typedef XalanArrayAllocator<XalanDOMChar> StylesheetConstructionContextDefault::XalanDOMCharVectorAllocatorType

## Member Enumeration Documentation

anonymous enum

Enumeration values:

  eDefaultXalanDOMCharVectorBlockSize |
  eDefaultAVTBlockSize |
  eDefaultAVTPartSimpleBlockSize |
  eDefaultAVTPartXPathBlockSize |
  eDefaultXalanQNameByValueBlockSize |
  eDefaultPointerVectorBlockSize |
  eDefaultElemApplyTemplatesBlockSize |
  eDefaultElemAttributeBlockSize |
  eDefaultElemAttributeSetBlockSize |
  eDefaultElemCallTemplateBlockSize |
  eDefaultElemElementBlockSize |
  eDefaultElemLiteralResultBlockSize |
  eDefaultElemTemplateBlockSize |
  eDefaultElemTextLiteralBlockSize |
  eDefaultElemValueOfBlockSize |
  eDefaultElemVariableBlockSize |
  eDefaultMatchPatternDataBlockSize |

## Constructor & Destructor Documentation

StylesheetConstructionContextDefault::StylesheetConstructionContextDefault | ( | MemoryManagerType & | theManager,
|  | XSLTEngineImpl & | processor,
|  | XPathFactory & | xpathFactory,
|  | VectorAllocatorSizeType | theXalanDOMCharVectorAllocatorBlockSize = eDefaultXalanDOMCharVectorBlockSize,
|  | XalanAVTAllocator::size_type | theAVTAllocatorBlockSize = eDefaultAVTBlockSize,
|  | XalanAVTPartSimpleAllocator::size_type | theAVTPartSimpleAllocatorBlockSize = eDefaultAVTPartSimpleBlockSize,
|  | XalanAVTPartXPathAllocator::size_type | theAVTPartXPathAllocatorBlockSize = eDefaultAVTPartXPathBlockSize,
|  | XalanQNameByValueAllocator::size_type | theXalanQNameByValueAllocatorBlockSize = eDefaultXalanQNameByValueBlockSize,
|  | VectorAllocatorSizeType | thePointerVectorAllocatorBlockSize = eDefaultPointerVectorBlockSize
| ) |

virtual StylesheetConstructionContextDefault::~StylesheetConstructionContextDefault | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual const AVTPart** StylesheetConstructionContextDefault::allocateAVTPartPointerVector | ( | size_type | theLength | ) | `[virtual]`

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

Parameters:

  theLength | The length of the vector

Returns:
  A pointer to the vector.

Implements StylesheetConstructionContext.

virtual const AVT** StylesheetConstructionContextDefault::allocateAVTPointerVector | ( | size_type | theLength | ) | `[virtual]`

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

Parameters:

  theLength | The length of the vector

Returns:
  A pointer to the vector.

Implements StylesheetConstructionContext.

virtual XalanDOMChar* StylesheetConstructionContextDefault::allocateXalanDOMCharVector | ( | const XalanDOMChar * | theString,
|  | XalanDOMString::size_type | theLength = XalanDOMString::npos,
|  | bool | fTerminate = true
| ) | `[virtual]`

Allocate a vector of XalanDOMChar of the specified size.

Parameters:

  theString | The source character array
  theLength | The length of the character vector
  fTerminate | If true, terminate the new vector with 0

Returns:
  A pointer to the array.

Implements StylesheetConstructionContext.

virtual XalanDOMChar* StylesheetConstructionContextDefault::allocateXalanDOMCharVector | ( | XalanDOMString::size_type | theLength | ) | `[virtual]`

Allocate a vector of XalanDOMChar of the specified size.

Parameters:

  theLength | The length of the character vector

Returns:
  A pointer to the vector.

Implements StylesheetConstructionContext.

virtual Stylesheet* StylesheetConstructionContextDefault::create | ( | StylesheetRoot & | theStylesheetRoot,
|  | const XalanDOMString & | theBaseIdentifier
| ) | `[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:

  A | reference to the StylesheetRoot instance.
  theBaseIdentifier | A URI to the stylesheet file.

Returns:
  A pointer to a new StylesheetRoot instance.

Implements StylesheetConstructionContext.

virtual StylesheetRoot* StylesheetConstructionContextDefault::create | ( | const XSLTInputSource & | theInputSource | ) | `[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:

  theInputSource | A reference to the input source.

Returns:
  A pointer to a new StylesheetRoot instance.

Implements StylesheetConstructionContext.

virtual StylesheetRoot* StylesheetConstructionContextDefault::create | ( | const XalanDOMString & | theBaseIdentifier | ) | `[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:

  theBaseIdentifier | A URI to the stylesheet file.

Returns:
  A pointer to a new StylesheetRoot instance.

Implements StylesheetConstructionContext.

virtual const AVT* StylesheetConstructionContextDefault::createAVT | ( | const LocatorType * | locator,
|  | const XalanDOMChar * | name,
|  | const XalanDOMChar * | stringedValue,
|  | const PrefixResolver & | resolver
| ) | `[virtual]`

Create an AVT instance.

Parameters:

  locator | the Locator for the instance. May be null.
  name | name of AVT
  stringedValue | string value to parse
  resolver | resolver for namespace resolution

Returns:
  A pointer to the instance.

Implements StylesheetConstructionContext.

virtual const AVTPart* StylesheetConstructionContextDefault::createAVTPart | ( | const LocatorType * | locator,
|  | const XalanDOMChar * | str,
|  | XalanDOMString::size_type | len,
|  | const PrefixResolver & | resolver
| ) | `[virtual]`

Create an AVTPart instance.

Parameters:

  locator | the Locator for the instance. May be null.
  str | The XPath expression for the instance
  len | The length of the expression
  resolver | resolver for namespace resolution

Returns:
  A pointer to the instance.

Implements StylesheetConstructionContext.

virtual const AVTPart* StylesheetConstructionContextDefault::createAVTPart | ( | const XalanDOMChar * | theString,
|  | XalanDOMString::size_type | theLength = XalanDOMString::npos
| ) | `[virtual]`

Create an AVTPart instance.

Parameters:

  theString | The source character array
  theLength | The length of the character vector
  fTerminate | If true, terminate the new vector with 0

Returns:
  A pointer to the instance.

Implements StylesheetConstructionContext.

virtual ElemTemplateElement* StylesheetConstructionContextDefault::createElement | ( | Stylesheet & | stylesheetTree,
|  | const XalanDOMChar * | name,
|  | const AttributeListType & | atts,
|  | ExtensionNSHandler & | handler,
|  | const LocatorType * | locator = 0
| ) | `[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:

  stylesheetTree | The stylesheet containing the element
  name | The name of the element
  atts | The list of attributes for the element
  handler | The handler for elements in the extension namespace
  locator | The Locator instance for error reporting. May be 0.

Returns:
  A pointer to the new instance.

Implements StylesheetConstructionContext.

virtual ElemTemplateElement* StylesheetConstructionContextDefault::createElement | ( | Stylesheet & | stylesheetTree,
|  | const XalanDOMChar * | chars,
|  | XalanDOMString::size_type | length,
|  | bool | preserveSpace,
|  | bool | disableOutputEscaping,
|  | const LocatorType * | locator = 0
| ) | `[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:

  stylesheetTree | The stylesheet containing the element
  chars | The pointer to character string for element
  length | length of the chars parameter.
  preserveSpace | true is space should be preserved
  disableOutputEscaping | true if output escaping should be disabled
  locator | The Locator instance for error reporting. May be 0.

Returns:
  A pointer to the new instance.

Implements StylesheetConstructionContext.

virtual ElemTemplateElement* StylesheetConstructionContextDefault::createElement | ( | int | token,
|  | Stylesheet & | stylesheetTree,
|  | const XalanDOMChar * | name,
|  | const AttributeListType & | atts,
|  | const LocatorType * | locator = 0
| ) | `[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:

  token | The enum value of the element to create.
  stylesheetTree | The stylesheet containing the element
  name | The name of the element
  atts | The list of attributes for the element
  locator | The Locator instance for error reporting. May be 0.

Returns:
  A pointer to the new instance.

Implements StylesheetConstructionContext.

virtual ElemTemplateElement* StylesheetConstructionContextDefault::createElement | ( | int | token,
|  | Stylesheet & | stylesheetTree,
|  | const AttributeListType & | atts,
|  | const LocatorType * | locator = 0
| ) | `[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:

  token | The enum value of the element to create.
  stylesheetTree | The stylesheet containing the element
  atts | The list of attributes for the element
  locator | The Locator instance for error reporting. May be 0.

Returns:
  A pointer to the new instance.

Implements StylesheetConstructionContext.

virtual XPath* StylesheetConstructionContextDefault::createMatchPattern | ( | const LocatorType * | locator,
|  | const XalanDOMChar * | str,
|  | const PrefixResolver & | resolver
| ) | `[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:

  locator | the locator for the XPath. May be null.
  str | string to match
  resolver | resolver for namespace resolution

Returns:
  XPath for match pattern

Implements StylesheetConstructionContext.

virtual XPath* StylesheetConstructionContextDefault::createMatchPattern | ( | const LocatorType * | locator,
|  | const XalanDOMString & | str,
|  | const PrefixResolver & | resolver
| ) | `[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:

  locator | the locator for the XPath. May be null.
  str | string to match
  resolver | resolver for namespace resolution

Returns:
  XPath for match pattern

Implements StylesheetConstructionContext.

virtual const XalanMatchPatternData* StylesheetConstructionContextDefault::createXalanMatchPatternData | ( | const ElemTemplate & | theTemplate,
|  | size_type | thePosition,
|  | const XalanDOMString & | theTargetString,
|  | const XPath & | theMatchPattern,
|  | const XalanDOMString & | thePatternString,
|  | XPath::eMatchScore | thePriority
| ) | `[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:

  theTemplate | The ElemTemplate node that contains the template for this pattern
  thePosition | The position in the stylesheet
  theTargetString | The target string for match pattern
  TheMatchPattern | The match pattern
  thePatternString | the pattern string
  thePriority | The priority for the match pattern.

Returns:
  A pointer to the new instance.

Implements StylesheetConstructionContext.

virtual const XalanQName* StylesheetConstructionContextDefault::createXalanQName | ( | const XalanDOMChar * | qname,
|  | const NamespacesStackType & | namespaces,
|  | const LocatorType * | locator = 0,
|  | bool | fUseDefault = false
| ) | `[virtual]`

Create a XalanQName-derived instance.

Parameters:

  qname | The qname string
  namespaces | The stack of namespaces
  Locator | The current Locator, if any
  fUseDefault | If true, a qname without a prefix will use the default namespace

Returns:
  A pointer to the new instance

Implements StylesheetConstructionContext.

virtual const XalanQName* StylesheetConstructionContextDefault::createXalanQName | ( | const XalanDOMString & | qname,
|  | const NamespacesStackType & | namespaces,
|  | const LocatorType * | locator = 0,
|  | bool | fUseDefault = false
| ) | `[virtual]`

Create a XalanQName-derived instance.

Parameters:

  qname | The qname string
  namespaces | The stack of namespaces
  Locator | The current Locator, if any
  fUseDefault | If true, a qname without a prefix will use the default namespace

Returns:
  A pointer to the new instance

Implements StylesheetConstructionContext.

virtual XPath* StylesheetConstructionContextDefault::createXPath | ( | const LocatorType * | locator,
|  | const XalanDOMChar * | str,
|  | const PrefixResolver & | resolver
| ) | `[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:

  locator | the locator for the XPath. May be null.
  str | string to match
  resolver | resolver for namespace resolution

Returns:
  XPath for string matched

Implements StylesheetConstructionContext.

virtual XPath* StylesheetConstructionContextDefault::createXPath | ( | const LocatorType * | locator,
|  | const XalanDOMChar * | str,
|  | XalanDOMString::size_type | len,
|  | const PrefixResolver & | resolver
| ) | `[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:

  locator | the locator for the XPath. May be null.
  str | string to match
  resolver | resolver for namespace resolution

Returns:
  XPath for string matched

Implements StylesheetConstructionContext.

virtual XPath* StylesheetConstructionContextDefault::createXPath | ( | const LocatorType * | locator,
|  | const XalanDOMString & | str,
|  | const PrefixResolver & | resolver
| ) | `[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:

  locator | the locator for the XPath. May be null.
  str | string to match
  resolver | resolver for namespace resolution

Returns:
  XPath for string matched

Implements StylesheetConstructionContext.

virtual void StylesheetConstructionContextDefault::destroy | ( | StylesheetRoot * | theStylesheetRoot | ) | `[virtual]`

Destroy a StylesheetRoot instance.

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

Parameters:

  theStylesheet | A pointer to the StylesheetRoot instance to delete.

Implements StylesheetConstructionContext.

virtual void StylesheetConstructionContextDefault::error | ( | const XalanDOMString & | msg,
|  | const XalanNode * | sourceNode,
|  | const LocatorType * | locator
| ) | const`[virtual]`

| Implements StylesheetConstructionContext.

virtual void StylesheetConstructionContextDefault::error | ( | const XalanDOMString & | msg,
|  | const XalanNode * | sourceNode = 0,
|  | const ElemTemplateElement * | styleNode = 0
| ) | const`[virtual]`

| Implements StylesheetConstructionContext.

virtual XalanDOMString& StylesheetConstructionContextDefault::getCachedString | ( |  | ) | `[virtual]`

Get a cached string for temporary use.

Returns:
  A reference to the string

Implements StylesheetConstructionContext.

eElementToken StylesheetConstructionContextDefault::getElementNameToken | ( | const XalanDOMString & | name | ) | `[static]`

virtual eElementToken StylesheetConstructionContextDefault::getElementToken | ( | const XalanDOMString & | name | ) | const`[virtual]`

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

Parameters:

  name | a probable xsl:xxx element

Returns:
  The enum value for that token, or ELEMNAME_UNDEFINED

Implements StylesheetConstructionContext.

virtual const LocatorType* StylesheetConstructionContextDefault::getLocatorFromStack | ( |  | ) | const`[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.

Implements StylesheetConstructionContext.

virtual const XalanDOMString& StylesheetConstructionContextDefault::getPooledString | ( | const XalanDOMChar * | theString,
|  | XalanDOMString::size_type | theLength = XalanDOMString::npos
| ) | `[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:

  theString | The source character array
  theLength | The length of the character array

Returns:
  a const reference to a pooled string.

Implements StylesheetConstructionContext.

virtual const XalanDOMString& StylesheetConstructionContextDefault::getPooledString | ( | const XalanDOMString & | theString | ) | `[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:

  theString | The source string

Returns:
  a const reference to a pooled string.

Implements StylesheetConstructionContext.

virtual URLAutoPtrType StylesheetConstructionContextDefault::getURLFromString | ( | const XalanDOMString & | urlString,
|  | const XalanDOMString & | base
| ) | `[virtual]`

Determine the fully qualified URI for a string.

Parameters:

  urlString | string to qualify
  base | base location for URI

Returns:
  auto pointer to fully qualified URI

Implements StylesheetConstructionContext.

virtual URLAutoPtrType StylesheetConstructionContextDefault::getURLFromString | ( | const XalanDOMString & | urlString | ) | `[virtual]`

Determine the fully qualified URI for a string.

Parameters:

  urlString | string to qualify

Returns:
  auto pointer to fully qualified URI

Implements StylesheetConstructionContext.

virtual XalanDOMString& StylesheetConstructionContextDefault::getURLStringFromString | ( | const XalanDOMString & | urlString,
|  | const XalanDOMString & | base,
|  | XalanDOMString & | theResult
| ) | `[virtual]`

Determine the fully qualified URI for a string.

Parameters:

  urlString | string to qualify
  base | base location for URI

Returns:
  string to fully qualified URI

Implements StylesheetConstructionContext.

virtual XalanDOMString& StylesheetConstructionContextDefault::getURLStringFromString | ( | const XalanDOMString & | urlString,
|  | XalanDOMString & | theResult
| ) | `[virtual]`

Determine the fully qualified URI for a string.

Parameters:

  urlString | string to qualify

Returns:
  string to fully qualified URI

Implements StylesheetConstructionContext.

virtual const XalanDOMString& StylesheetConstructionContextDefault::getXalanXSLNameSpaceURL | ( |  | ) | const`[virtual]`

Get the Xalan namespace for built-in extensions.

Returns:
  Xalan namespace for extensions

Implements StylesheetConstructionContext.

virtual const XalanDOMString& StylesheetConstructionContextDefault::getXSLTNamespaceURI | ( |  | ) | const`[virtual]`

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

Returns:
  URI string

Implements StylesheetConstructionContext.

virtual double StylesheetConstructionContextDefault::getXSLTVersionSupported | ( |  | ) | const`[virtual]`

Get the latest XSLT version currently supported.

Returns:
  XSLT version number

Implements StylesheetConstructionContext.

virtual bool StylesheetConstructionContextDefault::isValidQName | ( | const XalanDOMChar * | theName,
|  | const Stylesheet & | theStylesheet,
|  | const LocatorType * | theLocator = 0
| ) | `[virtual]`

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

Parameters:

  theName | The name to check
  theStylesheet | The current Stylesheet instance
  theLocator | The Locator for error reporting. May be 0.

Returns:
  true if the string is a valid QName.

Implements StylesheetConstructionContext.

virtual bool StylesheetConstructionContextDefault::isXMLSpaceAttribute | ( | const XalanDOMChar * | theAttributeName,
|  | const Stylesheet & | theStylesheet,
|  | const LocatorType * | theLocator = 0
| ) | `[virtual]`

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

Parameters:

  theAttributeName | The name to check
  theStylesheet | The current Stylesheet instance
  theLocator | The Locator for error reporting. May be 0.

Returns:
  true if the string is the xml:space attribute name

Implements StylesheetConstructionContext.

virtual bool StylesheetConstructionContextDefault::isXSLUseAttributeSetsAttribute | ( | const XalanDOMChar * | theAttributeName,
|  | const Stylesheet & | theStylesheet,
|  | const LocatorType * | theLocator = 0
| ) | `[virtual]`

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

Parameters:

  theAttributeName | The name to check
  theStylesheet | The current Stylesheet instance
  theLocator | The Locator for error reporting. May be 0.

Returns:
  true if the string is the xsl:use-attribute-sets attribute name

Implements StylesheetConstructionContext.

virtual void StylesheetConstructionContextDefault::message | ( | const XalanDOMString & | msg,
|  | const XalanNode * | sourceNode,
|  | const LocatorType * | locator
| ) | const`[virtual]`

| Implements StylesheetConstructionContext.

virtual void StylesheetConstructionContextDefault::message | ( | const XalanDOMString & | msg,
|  | const XalanNode * | sourceNode = 0,
|  | const ElemTemplateElement * | styleNode = 0
| ) | const`[virtual]`

| Implements StylesheetConstructionContext.

virtual XalanDocument* StylesheetConstructionContextDefault::parseXML | ( | const XalanDOMString & | urlString,
|  | DocumentHandlerType * | docHandler,
|  | XalanDocument * | docToRegister
| ) | `[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:

  urlString | location of the XML
  docHandler | pointer to SAX event handler
  docToRegister | if using a SAX event handler, the object to register in the source docs table.

Returns:
  document object, which represents the parsed XML

Exceptions:

  SAXException |

Implements StylesheetConstructionContext.

virtual void StylesheetConstructionContextDefault::popLocatorStack | ( |  | ) | `[virtual]`

| Pop the locator from the top of the locator stack. Implements StylesheetConstructionContext.

virtual void StylesheetConstructionContextDefault::pushLocatorOnStack | ( | const LocatorType * | locator | ) | `[virtual]`

Push a locator on to the locator stack.

Parameters:

  A | pointer to the Locator to push.

Implements StylesheetConstructionContext.

virtual bool StylesheetConstructionContextDefault::releaseCachedString | ( | XalanDOMString & | theString | ) | `[virtual]`

Return a cached string.

Parameters:

  theString | The string to release.

Returns:
  true if the string was released successfully.

Implements StylesheetConstructionContext.

virtual void StylesheetConstructionContextDefault::reset | ( |  | ) | `[virtual]`

| Reset the StylesheetConstructionContext instance. Any existing objects created by the instance will be destroyed. Implements StylesheetConstructionContext.

virtual const XalanQName** StylesheetConstructionContextDefault::tokenizeQNames | ( | size_type & | count,
|  | const XalanDOMChar * | qnameTokens,
|  | const NamespacesStackType & | namespaces,
|  | const LocatorType * | locator = 0,
|  | bool | fUseDefault = false
| ) | `[virtual]`

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

Parameters:

  count | The number of namespaces in the vector returned
  qnameTokens | The string to tokenize
  namespaces | The stack of namespaces
  Locator | The current Locator, if any
  fUseDefault | If true, qnames without prefixes will use the default namespace

Returns:
  The resulting vector of XalanQName instances.

Implements StylesheetConstructionContext.

virtual void StylesheetConstructionContextDefault::warn | ( | const XalanDOMString & | msg,
|  | const XalanNode * | sourceNode,
|  | const LocatorType * | locator
| ) | const`[virtual]`

| Implements StylesheetConstructionContext.

virtual void StylesheetConstructionContextDefault::warn | ( | const XalanDOMString & | msg,
|  | const XalanNode * | sourceNode = 0,
|  | const ElemTemplateElement * | styleNode = 0
| ) | const`[virtual]`

| Implements StylesheetConstructionContext.

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

- StylesheetConstructionContextDefault.hpp

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