00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 00019 #if !defined(XALAN_STYLESHEET_HEADER_GUARD) 00020 #define XALAN_STYLESHEET_HEADER_GUARD 00021 00022 00023 00024 // Base include file. Must be first. 00025 #include "XSLTDefinitions.hpp" 00026 00027 00028 00029 #include <xalanc/XalanDOM/XalanNode.hpp> 00030 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00031 00032 00033 00034 #include <xalanc/Include/XalanVector.hpp> 00035 #include <xalanc/Include/XalanMap.hpp> 00036 00037 00038 00039 #include <xalanc/PlatformSupport/PrefixResolver.hpp> 00040 00041 00042 00043 #include <xalanc/XPath/NameSpace.hpp> 00044 #include <xalanc/XPath/XalanQNameByReference.hpp> 00045 #include <xalanc/XPath/XPath.hpp> 00046 00047 00048 00049 #include <xalanc/XSLT/NamespacesHandler.hpp> 00050 #include <xalanc/XSLT/KeyDeclaration.hpp> 00051 #include <xalanc/XSLT/StylesheetConstructionContext.hpp> 00052 #include <xalanc/XSLT/StylesheetExecutionContext.hpp> 00053 #include <xalanc/XSLT/XalanSpaceNodeTester.hpp> 00054 00055 00056 00057 XALAN_CPP_NAMESPACE_BEGIN 00058 00059 00060 00061 class ExtensionNSHandler; 00062 class XalanDecimalFormatSymbols; 00063 class ElemDecimalFormat; 00064 class ElemTemplate; 00065 class ElemTemplateElement; 00066 class ElemVariable; 00067 class KeyTable; 00068 class NodeRefListBase; 00069 class PrefixResolver; 00070 class StylesheetConstructionContext; 00071 class StylesheetRoot; 00072 class XalanMatchPatternData; 00073 class XalanQName; 00074 class XObject; 00075 class StylesheetExecutionContext; 00076 00077 00078 typedef XalanVector<const XalanMatchPatternData*> PatternTableVectorTypeDecl; 00079 XALAN_USES_MEMORY_MANAGER(PatternTableVectorTypeDecl) 00080 00081 00082 /** 00083 * This class represents the base stylesheet or an "import" stylesheet. 00084 * "include" stylesheets are combined with the including stylesheet. 00085 */ 00086 class XALAN_XSLT_EXPORT Stylesheet : public PrefixResolver 00087 { 00088 00089 public: 00090 00091 typedef StylesheetExecutionContext::ParamVectorType ParamVectorType; 00092 typedef XalanQName::NamespaceVectorType NamespaceVectorType; 00093 typedef XalanQName::NamespacesStackType NamespacesStackType; 00094 00095 typedef XalanVector<ElemVariable*> ElemVariableVectorType; 00096 typedef XalanVector<KeyDeclaration> KeyDeclarationVectorType; 00097 typedef XalanVector<Stylesheet*> StylesheetVectorType; 00098 typedef XalanVector<XalanDOMString> URLStackType; 00099 typedef XalanVector<ElemDecimalFormat*> ElemDecimalFormatVectorType; 00100 typedef XalanVector<XalanSpaceNodeTester> WhitespaceElementsVectorType; 00101 typedef PatternTableVectorTypeDecl PatternTableVectorType; 00102 00103 typedef XalanMap<XalanDOMString, ExtensionNSHandler*> ExtensionNamespacesMapType; 00104 00105 typedef XalanMap<XalanQNameByReference, 00106 const ElemTemplate* > ElemTemplateMapType; 00107 00108 typedef XalanMap<const XalanNode*, KeyTable* > KeyTablesTableType; 00109 00110 typedef XalanMap<XalanDOMString, PatternTableVectorType> PatternTableMapType; 00111 00112 typedef StylesheetConstructionContext::GetCachedString GetCachedString; 00113 00114 /** 00115 * Constructor for a Stylesheet needs a Document. 00116 * @exception XSLProcessorException thrown if the active ProblemListener and XMLParserLiaison decide 00117 * the error condition is severe enough to halt processing. 00118 */ 00119 Stylesheet( 00120 StylesheetRoot& root, 00121 const XalanDOMString& baseIdentifier, 00122 StylesheetConstructionContext& constructionContext); 00123 00124 virtual 00125 ~Stylesheet(); 00126 00127 static Stylesheet* 00128 create(MemoryManager& theManager, 00129 StylesheetRoot& root, 00130 const XalanDOMString& baseIdentifier, 00131 StylesheetConstructionContext& constructionContext); 00132 00133 MemoryManager& 00134 getMemoryManager() 00135 { 00136 return m_elementPatternTable.getMemoryManager(); 00137 } 00138 00139 /** 00140 * Retrieve XSLT version number 00141 * 00142 * @return number representing XSLT version 00143 */ 00144 double 00145 getXSLTVerDeclared() const 00146 { 00147 return m_XSLTVerDeclared; 00148 } 00149 00150 /** 00151 * Set XSLT version number 00152 * 00153 * @param ver number representing XSLT version 00154 */ 00155 void 00156 setXSLTVerDeclared(double ver) 00157 { 00158 m_XSLTVerDeclared = ver; 00159 } 00160 00161 /** 00162 * Retrieve the root stylesheet object 00163 * 00164 * @return const reference to the stylesheet object 00165 */ 00166 const StylesheetRoot& 00167 getStylesheetRoot() const 00168 { 00169 return m_stylesheetRoot; 00170 } 00171 00172 /** 00173 * Retrieve the root stylesheet object 00174 * 00175 * @return reference to the stylesheet object 00176 */ 00177 StylesheetRoot& 00178 getStylesheetRoot() 00179 { 00180 return m_stylesheetRoot; 00181 } 00182 00183 /** 00184 * Retrieve the stack of namespace lists 00185 * 00186 * @return vector of namespace vectors 00187 */ 00188 const NamespacesStackType& 00189 getNamespaces() const 00190 { 00191 return m_namespaces; 00192 } 00193 00194 /** 00195 * Retrieve the stack of namespace lists 00196 * 00197 * @return vector of namespace vectors 00198 */ 00199 NamespacesStackType& 00200 getNamespaces() 00201 { 00202 return m_namespaces; 00203 } 00204 00205 const NamespacesHandler& 00206 getNamespacesHandler() const 00207 { 00208 return m_namespacesHandler; 00209 } 00210 00211 NamespacesHandler& 00212 getNamespacesHandler() 00213 { 00214 return m_namespacesHandler; 00215 } 00216 00217 /** 00218 * Retrieve the list of namespace declarations currently in effect 00219 * 00220 * @return vector of namespace vectors 00221 */ 00222 const NamespaceVectorType& 00223 getNamespaceDecls() const 00224 { 00225 return m_namespaceDecls; 00226 } 00227 00228 /** 00229 * Retrieve the list of namespace declarations currently in effect 00230 * 00231 * @return vector of namespace vectors 00232 */ 00233 NamespaceVectorType& 00234 getNamespaceDecls() 00235 { 00236 return m_namespaceDecls; 00237 } 00238 00239 /** 00240 * Set the list of namespace declarations currently in effect 00241 * 00242 * @param ns vector of namespace vectors 00243 */ 00244 void 00245 setNamespaceDecls(const NamespaceVectorType& ns) 00246 { 00247 m_namespaceDecls = ns; 00248 } 00249 00250 /** 00251 * Push the namespace declarations from the current attribute 00252 * list onto the namespace stack. 00253 * 00254 * @param atts attribute list constaining namespaces 00255 */ 00256 void 00257 pushNamespaces(const AttributeListType& atts); 00258 00259 /** 00260 * Pop a namespace declaration from the namespace stack. 00261 */ 00262 void 00263 popNamespaces() 00264 { 00265 assert(m_namespaces.empty() == false); 00266 00267 m_namespaces.pop_back(); 00268 } 00269 00270 void 00271 addWhitespaceElement(const XalanSpaceNodeTester& theTester); 00272 00273 /** 00274 * Called after construction is completed. 00275 */ 00276 virtual void 00277 postConstruction(StylesheetConstructionContext& constructionContext); 00278 00279 /** 00280 * See if this is a xmlns attribute, and, if so, process it. 00281 * 00282 * @param attrName qualified name of attribute 00283 * @param atts attribute list where the element comes from (not used at 00284 * this time) 00285 * @param which index into the attribute list (not used at this time) 00286 * @return true if this is a namespace name 00287 */ 00288 bool 00289 isAttrOK( 00290 const XalanDOMChar* attrName, 00291 const AttributeListType& atts, 00292 XalanSize_t which, 00293 StylesheetConstructionContext& constructionContext) const; 00294 00295 /** 00296 * Get the namespace from a qualified name. 00297 * 00298 * @param nodeName name of node 00299 * @return namespace string for node, or null if not found. 00300 */ 00301 const XalanDOMString* 00302 getNamespaceFromStack( 00303 const XalanDOMString& nodeName, 00304 XalanDOMString& theBuffer) const 00305 { 00306 return getNamespaceFromStack(nodeName.c_str(), theBuffer); 00307 } 00308 00309 /** 00310 * Get the namespace from a qualified name. 00311 * 00312 * @param nodeName name of node 00313 * @return namespace string for node, or null if not found. 00314 */ 00315 const XalanDOMString* 00316 getNamespaceFromStack( 00317 const XalanDOMChar* nodeName, 00318 XalanDOMString& theBuffer) const; 00319 00320 /** 00321 * Get the namespace from a prefix by searching the stack of namespace 00322 * lists. 00323 * 00324 * @param prefix prefix to search 00325 * @return namespace corresponding to prefix, or null if not found. 00326 */ 00327 const XalanDOMString* 00328 getNamespaceForPrefixFromStack(const XalanDOMString& prefix) const 00329 { 00330 return XalanQName::getNamespaceForPrefix(m_namespaces, prefix); 00331 } 00332 00333 /** 00334 * Get the namespace from a prefix by searching the stack of namespace 00335 * lists. 00336 * 00337 * @param prefix prefix to search 00338 * @return namespace corresponding to prefix, or null if not found. 00339 */ 00340 const XalanDOMString* 00341 getNamespaceForPrefixFromStack(const XalanDOMChar* prefix) const 00342 { 00343 assert(prefix != 0); 00344 00345 return XalanQName::getNamespaceForPrefix(m_namespaces, (const XalanDOMChar*)prefix); 00346 } 00347 00348 /** 00349 * Get the namespace for a prefix, and report an error if it wasn't found. 00350 * 00351 * @param prefix prefix to search 00352 * @param constructionContext The current construction context 00353 * @return namespace corresponding to prefix, or null if not found. 00354 */ 00355 const XalanDOMString* 00356 getNamespaceForPrefix( 00357 const XalanDOMString& prefix, 00358 StylesheetConstructionContext& constructionContext) const; 00359 00360 /** 00361 * Get the namespace for a prefix, and report an error if it wasn't found. 00362 * 00363 * @param prefix prefix to search 00364 * @param constructionContext The current construction context 00365 * @return namespace corresponding to prefix, or null if not found. 00366 */ 00367 const XalanDOMString* 00368 getNamespaceForPrefix( 00369 const XalanDOMChar* prefix, 00370 StylesheetConstructionContext& constructionContext) const; 00371 00372 /** 00373 * See if a namespace should be excluded. 00374 * 00375 * @param theConstructionContext the current construction context. 00376 * @param theValue the prefix of the namespace. 00377 * @return 00378 */ 00379 void 00380 processExcludeResultPrefixes( 00381 StylesheetConstructionContext& theConstructionContext, 00382 const XalanDOMChar* theValue) 00383 { 00384 m_namespacesHandler.processExcludeResultPrefixes( 00385 theConstructionContext, 00386 theValue, 00387 m_namespaces); 00388 } 00389 00390 /** 00391 * Add a template to the list of names templates 00392 * 00393 * @param theTemplate template to add 00394 * @param constructionContext context for construction 00395 */ 00396 void 00397 addTemplate( 00398 ElemTemplate* theTemplate, 00399 StylesheetConstructionContext& constructionContext); 00400 00401 /** 00402 * Process an attribute that has the value of 'yes' or 'no'. 00403 * 00404 * @param aname name of attribute 00405 * @param val value 00406 * @param constructionContext context for construction 00407 * @return true if value equals string constant for "yes," false otherwise 00408 */ 00409 bool 00410 getYesOrNo( 00411 const XalanDOMChar* aname, 00412 const XalanDOMChar* val, 00413 StylesheetConstructionContext& constructionContext) const; 00414 00415 /** 00416 * Retrieve the base identifier with which this stylesheet is associated. 00417 * 00418 * @return string for base identifier 00419 */ 00420 const XalanDOMString& 00421 getBaseIdentifier() const 00422 { 00423 return m_baseIdent; 00424 } 00425 00426 /** 00427 * Retrieve the base identifier for the most recently 00428 * included stylesheet. This will return the same value 00429 * as getBaseIdentifier(), if no include is being 00430 * processed. 00431 * 00432 * @return string for base identifier 00433 */ 00434 const XalanDOMString& 00435 getCurrentIncludeBaseIdentifier() const 00436 { 00437 return m_includeStack.empty() == true ? getBaseIdentifier() : m_includeStack.back(); 00438 } 00439 00440 /** 00441 * Process an xsl:namespace-alias element. 00442 * 00443 * @param name the element name. 00444 * @param attrs the current attribute list 00445 * @param constructionContext the active construction context 00446 */ 00447 void 00448 processNSAliasElement( 00449 const XalanDOMChar* name, 00450 const AttributeListType& atts, 00451 StylesheetConstructionContext& constructionContext); 00452 00453 /** 00454 * Process an xsl:decimal-format element. 00455 * 00456 * @param elemDecimalFormat the element 00457 */ 00458 void 00459 processDecimalFormatElement( 00460 StylesheetConstructionContext& constructionContext, 00461 const AttributeListType& atts, 00462 const Locator* locator = 0); 00463 00464 /** 00465 * Retrieve the XalanDecimalFormatSymbols instance associated with 00466 * the QName. 00467 * 00468 * @param theQName the QName for the lookup 00469 * @return a pointer to the matching instance, or 0 if none was found 00470 */ 00471 const XalanDecimalFormatSymbols* 00472 getDecimalFormatSymbols(const XalanQName& theQName) const; 00473 00474 /** 00475 * Add an imported stylesheet. 00476 * 00477 * @param theStylesheet The stylesheet to add. 00478 */ 00479 void 00480 addImport(Stylesheet* theStylesheet) 00481 { 00482 m_imports.insert(m_imports.begin(), theStylesheet); 00483 } 00484 00485 /** 00486 * whether there is a wrapper template 00487 * 00488 * @return true is there is a wrapper 00489 */ 00490 bool 00491 isWrapperless() const 00492 { 00493 return m_isWrapperless; 00494 } 00495 00496 ElemTemplateElement* 00497 initWrapperless( 00498 StylesheetConstructionContext& constructionContext, 00499 const Locator* locator); 00500 00501 /** 00502 * Retrieve the stack of who's including who 00503 * 00504 * @return stack of includes 00505 */ 00506 URLStackType& 00507 getIncludeStack() 00508 { 00509 return m_includeStack; 00510 } 00511 00512 /** 00513 * Process the xsl:key element. 00514 * 00515 * @param nsContext The PrefixResolver instance for namespace prefixes. 00516 * @param atts The attribute list for element. 00517 * #param locator The Locator instance for error reporting, if any. May be 0. 00518 * @param constructionContext The current construction context. 00519 */ 00520 void 00521 processKeyElement( 00522 const PrefixResolver& nsContext, 00523 const AttributeListType& atts, 00524 const Locator* locator, 00525 StylesheetConstructionContext& constructionContext); 00526 00527 /** 00528 * Locate a template via the "name" attribute. 00529 * 00530 * @param name qualified name of template 00531 * @return pointer to template found or 0 if none found 00532 */ 00533 const ElemTemplate* 00534 findNamedTemplate(const XalanQName& qname) const; 00535 00536 /** 00537 * Given a target element, find the template that best matches in the given 00538 * XSL document, according to the rules specified in the xsl draft. 00539 * 00540 * @param executionContext current execution context 00541 * @param targetNode element that needs a rule 00542 * @return pointer to rule that best matches targetNode 00543 */ 00544 const ElemTemplate* 00545 findTemplate( 00546 StylesheetExecutionContext& executionContext, 00547 XalanNode* targetNode) const 00548 { 00549 assert(targetNode != 0); 00550 00551 return findTemplate( 00552 executionContext, 00553 targetNode, 00554 targetNode->getNodeType(), 00555 s_emptyQName, 00556 false); 00557 } 00558 00559 /** 00560 * Given a target element, find the template that best matches in the given 00561 * XSL document, according to the rules specified in the xsl draft. 00562 * 00563 * @param executionContext current execution context 00564 * @param targetNode node that needs a rule 00565 * @param targetNodeType the type of targetNode 00566 * @param mode string indicating the mode 00567 * @param onlyUseImports only use imports, do not use any templates from the stylesheet itself 00568 * @return pointer to rule that best matches targetElem 00569 */ 00570 const ElemTemplate* 00571 findTemplate( 00572 StylesheetExecutionContext& executionContext, 00573 XalanNode* targetNode, 00574 XalanNode::NodeType targetNodeType, 00575 const XalanQName& mode, 00576 bool onlyUseImports) const; 00577 00578 /** 00579 * Add object to vector of match patterns if not already there. 00580 * 00581 * @param thePattern pattern to add 00582 * @param theVector vector of patterns to add to 00583 */ 00584 static void 00585 addObjectIfNotFound( 00586 const XalanMatchPatternData* thePattern, 00587 PatternTableVectorType& theVector); 00588 00589 /** 00590 * Add object to array of match patterns if not already there. 00591 * theArraySize size will be incremented if the pattern was 00592 * added. 00593 * 00594 * @param thePattern pattern to add 00595 * @param theArray vector of patterns to add to 00596 * @param theArraySize The size of the array 00597 */ 00598 static void 00599 addObjectIfNotFound( 00600 const XalanMatchPatternData* thePattern, 00601 const XalanMatchPatternData* theArray[], 00602 XalanSize_t& theArraySize); 00603 00604 /** 00605 * Given a name, locate the start of a list of 00606 * possible templates that match that name. If 00607 * none match, then use the default list. 00608 * 00609 * @param theName The name to match 00610 */ 00611 const PatternTableVectorType* 00612 locateElementMatchPatternDataList(const XalanDOMString& theName) const; 00613 00614 /** 00615 * Given a name, locate the start of a list of 00616 * possible templates that match that name. If 00617 * none match, then use the default list. 00618 * 00619 * @param theName The name to match 00620 */ 00621 const PatternTableVectorType* 00622 locateAttributeMatchPatternDataList(const XalanDOMString& theName) const; 00623 00624 /** 00625 * Given a XalanNode, locate the start of a list of 00626 * possible templates that match it. 00627 * 00628 * @param XalanNode The node to match 00629 */ 00630 const PatternTableVectorType* 00631 locateMatchPatternDataList( 00632 const XalanNode& theNode, 00633 XalanNode::NodeType targetNodeType) const; 00634 00635 /** 00636 * Add an extension namespace handler. This provides methods for calling 00637 * an element extension as well as for function calls (which is passed 00638 * on to XPath). 00639 * 00640 * @param constructionContext The current construction context. 00641 * @param uri The namespace URI of the extension. 00642 */ 00643 void 00644 processExtensionNamespace( 00645 StylesheetConstructionContext& theConstructionContext, 00646 const XalanDOMString& uri); 00647 00648 /** 00649 * Return the handler for a given extension namespace. 00650 * 00651 * @param uri the URI of the extension namespace. 00652 * @return pointer to extension handler 00653 */ 00654 ExtensionNSHandler* 00655 lookupExtensionNSHandler(const XalanDOMString& uri) const 00656 { 00657 const ExtensionNamespacesMapType::const_iterator it = 00658 m_extensionNamespaces.find(uri); 00659 00660 return it == m_extensionNamespaces.end() ? 0 : (*it).second; 00661 } 00662 00663 /** 00664 * Set a top level variable. 00665 * 00666 * @param var top-level variable declared with "xsl:variable" or 00667 * xsl:param-variable. 00668 */ 00669 void 00670 setTopLevelVariable(ElemVariable* var) 00671 { 00672 m_topLevelVariables.push_back(var); 00673 } 00674 00675 /** 00676 * Set a list of top level variables in the specified execution context 00677 * stylesheet. 00678 * 00679 * @param executionContext current execution context 00680 * @param topLevelParams list of top level parameters 00681 */ 00682 void 00683 pushTopLevelVariables( 00684 StylesheetExecutionContext& executionContext, 00685 const ParamVectorType& topLevelParams) const; 00686 00687 00688 // These interfaces are inherited from PrefixResolver... 00689 00690 virtual const XalanDOMString* 00691 getNamespaceForPrefix(const XalanDOMString& prefix) const; 00692 00693 virtual const XalanDOMString& 00694 getURI() const; 00695 00696 const XalanDOMString& 00697 getXSLTNamespaceURI() const 00698 { 00699 return m_XSLTNamespaceURI; 00700 } 00701 00702 void 00703 setXSLTNamespaceURI(const XalanDOMString& theURI) 00704 { 00705 m_XSLTNamespaceURI = theURI; 00706 } 00707 00708 const ElemTemplate* 00709 getFirstTemplate() const 00710 { 00711 return m_firstTemplate; 00712 } 00713 00714 protected: 00715 00716 /** 00717 * The root of the stylesheet tree. 00718 */ 00719 StylesheetRoot& m_stylesheetRoot; 00720 00721 /** 00722 * The base URL of the XSL document. 00723 */ 00724 XalanDOMString m_baseIdent; 00725 00726 /** 00727 * Table of KeyDeclaration objects, which are set by the 00728 * xsl:key element. 00729 */ 00730 KeyDeclarationVectorType m_keyDeclarations; 00731 00732 WhitespaceElementsVectorType m_whitespaceElements; 00733 00734 static const XalanQNameByReference s_emptyQName; 00735 00736 private: 00737 00738 // Not defined... 00739 Stylesheet(const Stylesheet&); 00740 00741 Stylesheet& 00742 operator=(const Stylesheet&); 00743 00744 bool 00745 operator==(const Stylesheet&) const; 00746 00747 void 00748 error( 00749 StylesheetConstructionContext& theContext, 00750 XalanMessages::Codes theErrorCode, 00751 const Locator* theLocator, 00752 const XalanDOMChar* theParam1 = 0, 00753 const XalanDOMChar* theParam2 = 0, 00754 const XalanDOMChar* theParam3 = 0) const; 00755 00756 /** 00757 * Given a target element, find the template that best matches in the given 00758 * stylesheet, using only imports 00759 * 00760 * @param executionContext current execution context 00761 * @param targetNode node that needs a rule 00762 * @param targetNodeType the type of targetNode 00763 * @param mode string indicating the mode 00764 * @return pointer to rule that best matches targetElem 00765 */ 00766 const ElemTemplate* 00767 findTemplateInImports( 00768 StylesheetExecutionContext& executionContext, 00769 XalanNode* targetNode, 00770 XalanNode::NodeType targetNodeType, 00771 const XalanQName& mode) const; 00772 00773 /** 00774 * The full XSLT Namespace URI. To be replaced by the one actually 00775 * found. 00776 */ 00777 XalanDOMString m_XSLTNamespaceURI; 00778 00779 /** 00780 * A vector of the -imported- XSL Stylesheets. 00781 */ 00782 StylesheetVectorType m_imports; 00783 00784 StylesheetVectorType::size_type m_importsSize; 00785 00786 /** 00787 * A stack to keep track of the result tree namespaces. 00788 */ 00789 NamespacesStackType m_namespaces; 00790 00791 /** 00792 * A list of namespace declarations, 00793 * for mapping from prefix to namespace URI. 00794 */ 00795 NamespaceVectorType m_namespaceDecls; 00796 00797 /** 00798 * Tells if the stylesheet is without an xsl:stylesheet and xsl:template 00799 * wrapper. 00800 */ 00801 bool m_isWrapperless; 00802 00803 /** 00804 * The table of extension namespaces. 00805 */ 00806 ExtensionNamespacesMapType m_extensionNamespaces; 00807 00808 /** 00809 * The first template of the template children. 00810 */ 00811 ElemTemplate* m_firstTemplate; 00812 00813 /** 00814 * A stack of who's including who is needed in order to support "It is an 00815 * error if a stylesheet directly or indirectly includes itself." 00816 */ 00817 URLStackType m_includeStack; 00818 00819 /** 00820 * Keyed on string macro names, and holding values that are macro elements 00821 * in the XSL DOM tree. Initialized in initMacroLookupTable, and used in 00822 * findNamedTemplate. 00823 */ 00824 ElemTemplateMapType m_namedTemplates; 00825 00826 /** 00827 * Table for defined constants, keyed on the names. 00828 */ 00829 ElemVariableVectorType m_topLevelVariables; 00830 00831 /** 00832 * The version of XSL that was declared. 00833 */ 00834 double m_XSLTVerDeclared; 00835 00836 /** 00837 * This table is keyed on the target elements of patterns, and contains linked 00838 * lists of the actual patterns that match the target element to some degree 00839 * of specifity. 00840 */ 00841 PatternTableMapType m_elementPatternTable; 00842 00843 const PatternTableMapType::const_iterator m_elementPatternTableEnd; 00844 00845 PatternTableVectorType m_elementAnyPatternList; 00846 00847 /** 00848 * This table is keyed on the target attributes of patterns, and contains linked 00849 * lists of the actual patterns that match the target attribute to some degree 00850 * of specifity. 00851 */ 00852 PatternTableMapType m_attributePatternTable; 00853 00854 const PatternTableMapType::const_iterator m_attributePatternTableEnd; 00855 00856 PatternTableVectorType m_attributeAnyPatternList; 00857 00858 /** 00859 * These tables are for text, comment, root, and PI node templates. 00860 */ 00861 PatternTableVectorType m_textPatternList; 00862 00863 PatternTableVectorType m_commentPatternList; 00864 00865 PatternTableVectorType m_rootPatternList; 00866 00867 PatternTableVectorType m_piPatternList; 00868 00869 /** 00870 * This table is for patterns that match "node()". 00871 */ 00872 PatternTableVectorType m_nodePatternList; 00873 00874 size_type m_patternCount; 00875 00876 ElemDecimalFormatVectorType m_elemDecimalFormats; 00877 00878 NamespacesHandler m_namespacesHandler; 00879 00880 static const XalanDOMString s_emptyString; 00881 00882 static const PatternTableVectorType s_emptyTemplateList; 00883 }; 00884 00885 00886 00887 XALAN_CPP_NAMESPACE_END 00888 00889 00890 00891 #endif // XALAN_STYLESHEET_HEADER_GUARD
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|