18#if !defined(STYLESHEETCONSTRUCTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680)
19#define STYLESHEETCONSTRUCTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680
38#if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION) || defined(XALAN_BUILD_DLL)
110 eDefaultXalanDOMCharVectorBlockSize = 1024,
111 eDefaultAVTBlockSize = 128,
112 eDefaultAVTPartSimpleBlockSize = 128,
113 eDefaultAVTPartXPathBlockSize = 128,
114 eDefaultXalanQNameByValueBlockSize = 32,
115 eDefaultPointerVectorBlockSize = 512,
116 eDefaultElemApplyTemplatesBlockSize = 10,
117 eDefaultElemAttributeBlockSize = 10,
118 eDefaultElemAttributeSetBlockSize = 10,
119 eDefaultElemCallTemplateBlockSize = 10,
120 eDefaultElemElementBlockSize = 10,
121 eDefaultElemLiteralResultBlockSize = 20,
122 eDefaultElemTemplateBlockSize = 10,
123 eDefaultElemTextLiteralBlockSize = 20,
124 eDefaultElemValueOfBlockSize = 10,
125 eDefaultElemVariableBlockSize = 10,
126 eDefaultMatchPatternDataBlockSize = 10 };
270 virtual const Locator*
390 bool disableOutputEscaping,
423 return reinterpret_cast<const AVT**
>(m_pointerVectorAllocator.allocate(
theSize));
429 assert(
sizeof(
AVTPart**) ==
sizeof(PointerVectorAllocatorType::value_type));
431 return reinterpret_cast<const AVTPart**
>(m_pointerVectorAllocator.allocate(
theSize));
435 doAllocateXalanQNamePointerVector(size_type theSize)
437 assert(
sizeof(XalanQName**) ==
sizeof(PointerVectorAllocatorType::value_type));
439 return reinterpret_cast<const XalanQName**
>(m_pointerVectorAllocator.allocate(theSize));
443 XSLTEngineImpl& m_processor;
445 XPathFactory& m_xpathFactory;
447 typedef XalanMemMgrAutoPtr<XPathProcessor> XPathProcessAutoPtr;
449 XPathProcessAutoPtr m_xpathProcessor;
451 StylesheetVectorType m_stylesheets;
453 XalanDOMStringPool m_stringPool;
455 XalanDOMCharVectorAllocatorType m_xalanDOMCharVectorAllocator;
457 mutable XalanDOMString m_tempBuffer;
459 XalanQNameByValue m_scratchQName;
461 XalanDOMStringCache m_stringCache;
463 XalanAVTAllocator m_avtAllocator;
465 XalanAVTPartSimpleAllocator m_avtPartSimpleAllocator;
467 XalanAVTPartXPathAllocator m_avtPartXPathAllocator;
469 XalanQNameByValueAllocator m_xalanQNameByValueAllocator;
471 const XalanQNameByReference m_useAttributeSetsQName;
473 PointerVectorAllocatorType m_pointerVectorAllocator;
475 ElemTemplateElementVectorType m_allocatedElements;
477 XalanElemApplyTemplatesAllocator m_elemApplyTemplatesAllocator;
479 XalanElemAttributeAllocator m_elemAttributeAllocator;
481 XalanElemAttributeSetAllocator m_elemAttributeSetAllocator;
483 XalanElemCallTemplateAllocator m_elemCallTemplateAllocator;
485 XalanElemElementAllocator m_elemElementAllocator;
487 XalanElemLiteralResultAllocator m_elemLiteralResultAllocator;
489 XalanElemTemplateAllocator m_elemTemplateAllocator;
491 XalanElemTextLiteralAllocator m_elemTextLiteralAllocator;
493 XalanElemValueOfAllocator m_elemValueOfAllocator;
495 XalanElemVariableAllocator m_elemVariableAllocator;
497 XalanMatchPatternDataAllocator m_matchPatternDataAllocator;
499 const XalanQNameByReference m_spaceAttrQName;
504 static const XalanDOMChar s_if[];
507 static const XalanDOMChar s_key[];
510 static const XalanDOMChar s_copy[];
513 static const XalanDOMChar s_sort[];
516 static const XalanDOMChar s_text[];
519 static const XalanDOMChar s_when[];
522 static const XalanDOMChar s_empty[];
525 static const XalanDOMChar s_param[];
528 static const XalanDOMChar s_choose[];
531 static const XalanDOMChar s_import[];
534 static const XalanDOMChar s_number[];
537 static const XalanDOMChar s_output[];
540 static const XalanDOMChar s_comment[];
543 static const XalanDOMChar s_copyOf[];
546 static const XalanDOMChar s_element[];
549 static const XalanDOMChar s_include[];
552 static const XalanDOMChar s_message[];
555 static const XalanDOMChar s_fallback[];
558 static const XalanDOMChar s_forEach[];
561 static const XalanDOMChar s_template[];
564 static const XalanDOMChar s_valueOf[];
567 static const XalanDOMChar s_variable[];
570 static const XalanDOMChar s_attribute[];
573 static const XalanDOMChar s_otherwise[];
576 static const XalanDOMChar s_transform[];
579 static const XalanDOMChar s_stylesheet[];
582 static const XalanDOMChar s_withParam[];
585 static const XalanDOMChar s_stripSpace[];
588 static const XalanDOMChar s_applyImports[];
591 static const XalanDOMChar s_attributeSet[];
594 static const XalanDOMChar s_callTemplate[];
597 static const XalanDOMChar s_decimalFormat[];
600 static const XalanDOMChar s_preserveSpace[];
603 static const XalanDOMChar s_applyTemplates[];
606 static const XalanDOMChar s_namespaceAlias[];
609 static const XalanDOMChar s_processingInstruction[];
613 struct ElementTokenTableEntry
615 const XalanDOMChar* m_name;
617 eElementToken m_token;
620 static const ElementTokenTableEntry s_elementTokenTable[];
622 static const XalanSize_t s_elementTokenTableSize;
624 static const ElementTokenTableEntry& s_elementTokenTableLast;
626 static const ElementTokenTableEntry& s_elementTokenTableDummy;
#define XALAN_XSLT_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Class to hold a part, either a string or XPath, of an Attribute Value Template.
Class to hold an Attribute Value Template.
This class defines an interface for classes that resolve namespace prefixes to their URIs.
An default implementation of an abtract class which provides support for constructing the internal re...
XalanArrayAllocator< const void * > PointerVectorAllocatorType
XalanVector< StylesheetRoot * > StylesheetVectorType
StylesheetConstructionContextDefault(MemoryManager &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 const AVT * createAVT(const Locator *locator, const XalanDOMChar *name, const XalanDOMChar *stringedValue, const PrefixResolver &resolver)
Create an AVT instance.
virtual ~StylesheetConstructionContextDefault()
XalanVector< ElemTemplateElement * > ElemTemplateElementVectorType
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)
Function that is called when a problem event occurs.
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 ElemTemplateElement * createElement(Stylesheet &stylesheetTree, const XalanDOMChar *name, const AttributeListType &atts, ExtensionNSHandler &handler, const Locator *locator=0)
virtual bool isXMLSpaceAttribute(const XalanDOMChar *theAttributeName, const Stylesheet &theStylesheet, const Locator *theLocator=0)
Given an name, determine if it is the xml:space attribute.
virtual const AVT ** allocateAVTPointerVector(size_type theLength)
Allocate a vector of const AVT* of the specified length.
virtual const XalanQName ** tokenizeQNames(size_type &count, const XalanDOMChar *qnameTokens, const NamespacesStackType &namespaces, const Locator *locator=0, bool fUseDefault=false)
Tokenize a string and return the QNames corresponding to those tokens.
virtual URLAutoPtrType getURLFromString(const XalanDOMString &urlString)
Determine the fully qualified URI for a string.
virtual double getXSLTVersionSupported() const
Get the latest XSLT version currently supported.
virtual bool isXSLUseAttributeSetsAttribute(const XalanDOMChar *theAttributeName, const Stylesheet &theStylesheet, const Locator *theLocator=0)
Given an name, determine if it is the xsl:use-attribute-sets attribute.
virtual void pushLocatorOnStack(const Locator *locator)
Push a locator on to the locator stack.
virtual XPath * createMatchPattern(const Locator *locator, const XalanDOMString &str, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)
Create and initialize an xpath for a match pattern and return it.
virtual const AVTPart ** allocateAVTPartPointerVector(size_type theLength)
Allocate a vector of const AVTPart* of the specified length.
virtual void reset()
Reset the instance.
virtual XPath * createXPath(const Locator *locator, const XalanDOMString &str, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)
Create and initialize an xpath and return it.
virtual ElemTemplateElement * createElement(int token, Stylesheet &stylesheetTree, const AttributeListType &atts, const Locator *locator=0)
virtual const AVTPart * createAVTPart(const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos)
Create an AVTPart instance.
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 temp...
virtual XPath * createXPath(const Locator *locator, const XalanDOMChar *str, XalanDOMString::size_type len, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)
Create and initialize an xpath and return it.
virtual Stylesheet * create(StylesheetRoot &theStylesheetRoot, const XalanDOMString &theBaseIdentifier)
Create a new Stylesheet instance.
virtual XPath * createMatchPattern(const Locator *locator, const XalanDOMChar *str, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)
Create and initialize an xpath for a match pattern and return it.
virtual const XalanDOMString & getPooledString(const XalanDOMString &theString)
Get a pooled string given the source string.
virtual void destroy(StylesheetRoot *theStylesheetRoot)
Destroy a StylesheetRoot instance.
virtual const XalanDOMString & getXSLTNamespaceURI() const
Retrieve the URI for the current XSLT namespace, for example, "http://www.w3.org/1999/XSL/Transform".
XalanArrayAllocator< XalanDOMChar > XalanDOMCharVectorAllocatorType
virtual eElementToken getElementToken(const XalanDOMString &name) const
Given an XSL tag name, return an integer token that corresponds to the enums defined above.
virtual const Locator * getLocatorFromStack() const
Get the locator from the top of the locator stack.
virtual const XalanDOMString & getPooledString(const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos)
Get a pooled string given the source character array.
virtual const AVTPart * createAVTPart(const Locator *locator, const XalanDOMChar *str, XalanDOMString::size_type len, const PrefixResolver &resolver)
Create an AVTPart instance.
virtual XalanDOMString & getURLStringFromString(const XalanDOMString &urlString, XalanDOMString &theResult)
Determine the fully qualified URI for a string.
static eElementToken getElementNameToken(const XalanDOMString &name)
virtual URLAutoPtrType getURLFromString(const XalanDOMString &urlString, const XalanDOMString &base)
Determine the fully qualified URI for a string.
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)
Function that is called when a problem event occurs.
virtual StylesheetRoot * create(const XalanDOMString &theBaseIdentifier)
Create a new StylesheetRoot instance.
virtual bool releaseCachedString(XalanDOMString &theString)
Return a cached string.
virtual XalanDOMString & getCachedString()
Get a cached string for temporary use.
virtual const XalanQName * createXalanQName(const XalanDOMString &qname, const NamespacesStackType &namespaces, const Locator *locator=0, bool fUseDefault=false)
Create a XalanQName-derived instance.
virtual bool isValidQName(const XalanDOMChar *theName, const Stylesheet &theStylesheet, const Locator *theLocator=0)
Given an name, determine if it is a valid QName.
virtual ElemTemplateElement * createElement(int token, Stylesheet &stylesheetTree, const XalanDOMChar *name, const AttributeListType &atts, const Locator *locator=0)
virtual XalanDOMString & getURLStringFromString(const XalanDOMString &urlString, const XalanDOMString &base, XalanDOMString &theResult)
Determine the fully qualified URI for a string.
XalanDOMCharVectorAllocatorType::size_type VectorAllocatorSizeType
virtual XalanDocument * parseXML(const XalanDOMString &urlString, DocumentHandler *docHandler, XalanDocument *docToRegister, ErrorHandler *theErrorHandler=0)
Read in the XML file, either producing a Document or calling SAX events, and register the document in...
virtual ElemTemplateElement * createElement(Stylesheet &stylesheetTree, const XalanDOMChar *chars, XalanDOMString::size_type length, bool preserveSpace, bool disableOutputEscaping, const Locator *locator=0)
Create a an element for literal text.
virtual void popLocatorStack()
Pop the locator from the top of the locator stack.
virtual const XalanQName * createXalanQName(const XalanDOMChar *qname, const NamespacesStackType &namespaces, const Locator *locator=0, bool fUseDefault=false)
Create a XalanQName-derived instance.
virtual XPath * createXPath(const Locator *locator, const XalanDOMChar *str, const PrefixResolver &resolver, bool allowVariableReferences=true, bool allowKeyFunction=true)
Create and initialize an xpath and return it.
virtual StylesheetRoot * create(const XSLTInputSource &theInputSource)
Create a new StylesheetRoot instance.
virtual const XalanDOMString & getXalanXSLNameSpaceURL() const
Get the Xalan namespace for built-in extensions.
eElementToken
IDs for XSL element types.
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
This class represents the base stylesheet or an "import" stylesheet.
It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison,...
ArenaAllocatorType::size_type size_type
ArenaAllocatorType::size_type size_type
ArenaAllocatorType::size_type size_type
Xalan implementation of deque.
This class contains information concerning a match pattern in a stylesheet.
ArenaAllocatorType::size_type size_type
Class to represent a qualified name.
xercesc::AttributeList AttributeListType