 |
Xalan-C++ API Reference
1.12.0
|
Go to the documentation of this file.
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)
87 class XPathEnvSupport;
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 };
145 MemoryManager& theManager,
166 const Locator* locator,
184 const XalanDOMChar* theString,
231 const Locator* locator,
234 bool allowVariableReferences =
true,
235 bool allowKeyFunction =
true);
239 const Locator* locator,
240 const XalanDOMChar* str,
242 bool allowVariableReferences =
true,
243 bool allowKeyFunction =
true);
247 const Locator* locator,
250 bool allowVariableReferences =
true,
251 bool allowKeyFunction =
true);
255 const Locator* locator,
256 const XalanDOMChar* str,
258 bool allowVariableReferences =
true,
259 bool allowKeyFunction =
true);
263 const Locator* locator,
264 const XalanDOMChar* str,
267 bool allowVariableReferences =
true,
268 bool allowKeyFunction =
true);
270 virtual const Locator*
285 DocumentHandler* docHandler,
287 ErrorHandler* theErrorHandler = 0);
291 const XalanDOMChar* theAttributeName,
293 const Locator* theLocator = 0);
297 const XalanDOMChar* theAttributeName,
299 const Locator* theLocator = 0);
303 const XalanDOMChar* theName,
305 const Locator* theLocator = 0);
313 virtual XalanDOMChar*
316 virtual XalanDOMChar*
318 const XalanDOMChar* theString,
320 bool fTerminate =
true);
324 const Locator* locator,
325 const XalanDOMChar* name,
326 const XalanDOMChar* stringedValue,
331 const XalanDOMChar* theString,
336 const Locator* locator,
337 const XalanDOMChar* str,
351 const Locator* locator = 0,
352 bool fUseDefault =
false);
356 const XalanDOMChar* qname,
358 const Locator* locator = 0,
359 bool fUseDefault =
false);
364 const XalanDOMChar* qnameTokens,
366 const Locator* locator = 0,
367 bool fUseDefault =
false);
374 const Locator* locator = 0);
380 const XalanDOMChar* name,
382 const Locator* locator = 0);
387 const XalanDOMChar* chars,
390 bool disableOutputEscaping,
391 const Locator* locator = 0);
396 const XalanDOMChar* name,
399 const Locator* locator = 0);
406 const XPath& theMatchPattern,
419 doAllocateAVTPointerVector(
size_type theSize)
423 return reinterpret_cast<const AVT**
>(m_pointerVectorAllocator.allocate(theSize));
427 doAllocateAVTPartPointerVector(
size_type 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;
635 #endif // STYLESHEETCONSTRUCTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680
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 const XalanQName * createXalanQName(const XalanDOMString &qname, const NamespacesStackType &namespaces, const Locator *locator=0, bool fUseDefault=false)
Create a XalanQName-derived instance.
virtual Stylesheet * create(StylesheetRoot &theStylesheetRoot, const XalanDOMString &theBaseIdentifier)
Create a new Stylesheet instance.
virtual bool releaseCachedString(XalanDOMString &theString)
Return a cached string.
virtual const XalanQName * createXalanQName(const XalanDOMChar *qname, const NamespacesStackType &namespaces, const Locator *locator=0, bool fUseDefault=false)
Create a XalanQName-derived instance.
virtual StylesheetRoot * create(const XSLTInputSource &theInputSource)
Create a new StylesheetRoot instance.
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.
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
xercesc::AttributeList AttributeListType
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 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 ~StylesheetConstructionContextDefault()
virtual const XalanDOMString & getXSLTNamespaceURI() const
Retrieve the URI for the current XSLT namespace, for example, "http://www.w3.org/1999/XSL/Transform".
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 pushLocatorOnStack(const Locator *locator)
Push a locator on to the locator stack.
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...
#define XALAN_XSLT_EXPORT
virtual void reset()
Reset the instance.
virtual XalanDOMString & getURLStringFromString(const XalanDOMString &urlString, XalanDOMString &theResult)
Determine the fully qualified URI for a string.
virtual const XalanDOMString & getXalanXSLNameSpaceURL() const
Get the Xalan namespace for built-in extensions.
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)
Function that is called when a problem event occurs.
ArenaAllocatorType::size_type size_type
XalanVector< StylesheetRoot * > StylesheetVectorType
This class contains information concerning a match pattern in a stylesheet.
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.
eElementToken
IDs for XSL element types.
It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison,...
Xalan implementation of deque.
XalanArrayAllocator< XalanDOMChar > XalanDOMCharVectorAllocatorType
virtual XalanDOMChar * allocateXalanDOMCharVector(XalanDOMString::size_type theLength)
Allocate a vector of XalanDOMChar of the specified size.
virtual bool isValidQName(const XalanDOMChar *theName, const Stylesheet &theStylesheet, const Locator *theLocator=0)
Given an name, determine if it is a valid QName.
virtual URLAutoPtrType getURLFromString(const XalanDOMString &urlString)
Determine the fully qualified URI for a string.
virtual const AVTPart ** allocateAVTPartPointerVector(size_type theLength)
Allocate a vector of const AVTPart* of the specified length.
virtual eElementToken getElementToken(const XalanDOMString &name) const
Given an XSL tag name, return an integer token that corresponds to the enums defined above.
virtual StylesheetRoot * create(const XalanDOMString &theBaseIdentifier)
Create a new StylesheetRoot instance.
virtual const AVTPart * createAVTPart(const Locator *locator, const XalanDOMChar *str, XalanDOMString::size_type len, const PrefixResolver &resolver)
Create an AVTPart instance.
virtual void popLocatorStack()
Pop the locator from the top of the locator stack.
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.
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
virtual const AVTPart * createAVTPart(const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos)
Create an AVTPart instance.
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 XalanDOMString & getURLStringFromString(const XalanDOMString &urlString, const XalanDOMString &base, XalanDOMString &theResult)
Determine the fully qualified URI for a string.
virtual ElemTemplateElement * createElement(Stylesheet &stylesheetTree, const XalanDOMChar *name, const AttributeListType &atts, ExtensionNSHandler &handler, const Locator *locator=0)
This class defines an interface for classes that resolve namespace prefixes to their URIs.
virtual ElemTemplateElement * createElement(int token, Stylesheet &stylesheetTree, const AttributeListType &atts, const Locator *locator=0)
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 void destroy(StylesheetRoot *theStylesheetRoot)
Destroy a StylesheetRoot instance.
Class to hold a part, either a string or XPath, of an Attribute Value Template.
ArenaAllocatorType::size_type size_type
virtual ElemTemplateElement * createElement(int token, Stylesheet &stylesheetTree, const XalanDOMChar *name, const AttributeListType &atts, const Locator *locator=0)
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
VectorType::size_type size_type
An default implementation of an abtract class which provides support for constructing the internal re...
virtual const Locator * getLocatorFromStack() const
Get the locator from the top of the locator stack.
ArenaAllocatorType::size_type size_type
ArenaAllocatorType::size_type size_type
This class represents the base stylesheet or an "import" stylesheet.
virtual const AVT ** allocateAVTPointerVector(size_type theLength)
Allocate a vector of const AVT* of the specified length.
Class to represent a qualified name.
virtual const XalanDOMString & getPooledString(const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos)
Get a pooled string given the source character array.
XalanVector< ElemTemplateElement * > ElemTemplateElementVectorType
virtual XalanDOMString & getCachedString()
Get a cached string for temporary use.
virtual XalanDOMChar * allocateXalanDOMCharVector(const XalanDOMChar *theString, XalanDOMString::size_type theLength=XalanDOMString::npos, bool fTerminate=true)
Allocate a vector of XalanDOMChar of the specified size.
XalanDOMCharVectorAllocatorType::size_type VectorAllocatorSizeType
static eElementToken getElementNameToken(const XalanDOMString &name)
virtual const AVT * createAVT(const Locator *locator, const XalanDOMChar *name, const XalanDOMChar *stringedValue, const PrefixResolver &resolver)
Create an AVT instance.
virtual URLAutoPtrType getURLFromString(const XalanDOMString &urlString, const XalanDOMString &base)
Determine the fully qualified URI for a string.
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 const XalanDOMString & getPooledString(const XalanDOMString &theString)
Get a pooled string given the source string.
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 bool isXMLSpaceAttribute(const XalanDOMChar *theAttributeName, const Stylesheet &theStylesheet, const Locator *theLocator=0)
Given an name, determine if it is the xml:space attribute.
Class to hold an Attribute Value Template.
XalanArrayAllocator< const void * > PointerVectorAllocatorType