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 #if !defined(STYLESHEETCONSTRUCTIONCONTEXT_HEADER_GUARD_1357924680) 00019 #define STYLESHEETCONSTRUCTIONCONTEXT_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base include file. Must be first. 00024 #include <xalanc/XSLT/XSLTDefinitions.hpp> 00025 00026 00027 00028 #include <xalanc/PlatformSupport/URISupport.hpp> 00029 00030 00031 00032 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00033 00034 00035 00036 #include <xalanc/XPath/XalanQName.hpp> 00037 #include <xalanc/XPath/XPath.hpp> 00038 #include <xalanc/XPath/XPathConstructionContext.hpp> 00039 00040 00041 00042 XALAN_DECLARE_XERCES_CLASS(AttributeList) 00043 XALAN_DECLARE_XERCES_CLASS(DocumentHandler) 00044 XALAN_DECLARE_XERCES_CLASS(Locator) 00045 00046 00047 00048 XALAN_CPP_NAMESPACE_BEGIN 00049 00050 00051 00052 typedef XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType; 00053 typedef XERCES_CPP_NAMESPACE_QUALIFIER DocumentHandler DocumentHandlerType; 00054 00055 XALAN_USING_XERCES(AttributeList) 00056 XALAN_USING_XERCES(DocumentHandler) 00057 XALAN_USING_XERCES(Locator) 00058 00059 00060 00061 class AVT; 00062 class AVTPart; 00063 class ElemTemplate; 00064 class ElemTemplateElement; 00065 class ExtensionNSHandler; 00066 class PrefixResolver; 00067 class Stylesheet; 00068 class StylesheetRoot; 00069 class XalanDocument; 00070 class XalanMatchPatternData; 00071 class XalanNode; 00072 class XSLTInputSource; 00073 00074 00075 00076 // 00077 // An abstract class which provides support for constructing the internal 00078 // representation of a stylesheet. 00079 // 00080 class XALAN_XSLT_EXPORT StylesheetConstructionContext : public XPathConstructionContext 00081 { 00082 public: 00083 00084 typedef XalanQName::NamespacesStackType NamespacesStackType; 00085 00086 /** 00087 * IDs for XSL element types. These are the values 00088 * that must be returned by getElementToken(). 00089 */ 00090 enum eElementToken 00091 { 00092 ELEMNAME_UNDEFINED = -2, 00093 ELEMNAME_EMPTY = -1, 00094 ELEMNAME_WITH_PARAM, 00095 ELEMNAME_APPLY_TEMPLATES, 00096 ELEMNAME_CHOOSE, 00097 ELEMNAME_COMMENT, 00098 ELEMNAME_COPY, 00099 ELEMNAME_COPY_OF, 00100 ELEMNAME_ATTRIBUTE, 00101 ELEMNAME_ATTRIBUTE_SET, 00102 ELEMNAME_EXTENSION, 00103 ELEMNAME_FOR_EACH, 00104 ELEMNAME_KEY, 00105 ELEMNAME_IF, 00106 ELEMNAME_IMPORT, 00107 ELEMNAME_INCLUDE, 00108 ELEMNAME_CALL_TEMPLATE, 00109 ELEMNAME_PARAM, 00110 ELEMNAME_NUMBER, 00111 ELEMNAME_OTHERWISE, 00112 ELEMNAME_PI, 00113 ELEMNAME_PRESERVE_SPACE, 00114 ELEMNAME_TEMPLATE, 00115 ELEMNAME_SORT, 00116 ELEMNAME_STRIP_SPACE, 00117 ELEMNAME_STYLESHEET, 00118 ELEMNAME_TEXT, 00119 ELEMNAME_VALUE_OF, 00120 ELEMNAME_WHEN, 00121 ELEMNAME_FALLBACK, 00122 ELEMNAME_ELEMENT, 00123 00124 ELEMNAME_APPLY_IMPORTS, 00125 00126 ELEMNAME_VARIABLE, 00127 ELEMNAME_MESSAGE, 00128 00129 ELEMNAME_OUTPUT, 00130 ELEMNAME_DECIMAL_FORMAT, 00131 ELEMNAME_NAMESPACE_ALIAS, 00132 00133 // This one doesn't really have a name. 00134 // It's used for any literal result 00135 // element. 00136 ELEMNAME_LITERAL_RESULT, 00137 00138 // This one doesn't really have a name. 00139 // It's used for any literal text in 00140 // the content of a literal result 00141 // element. 00142 ELEMNAME_TEXT_LITERAL_RESULT, 00143 00144 // This one doesn't really have a name. 00145 // It's used for forward-compatible 00146 // processing. 00147 ELEMNAME_FORWARD_COMPATIBLE, 00148 00149 // Extension handling. 00150 ELEMNAME_EXTENSION_CALL, 00151 ELEMNAME_EXTENSION_HANDLER 00152 }; 00153 00154 typedef URISupport::URLAutoPtrType URLAutoPtrType; 00155 00156 explicit 00157 StylesheetConstructionContext(MemoryManager& theManager); 00158 00159 virtual 00160 ~StylesheetConstructionContext(); 00161 00162 00163 // These are inherited from XPathConstructionContext... 00164 virtual void 00165 problem( 00166 eSource source, 00167 eClassification classification, 00168 const XalanDOMString& msg, 00169 const Locator* locator, 00170 const XalanNode* sourceNode) = 0; 00171 00172 virtual void 00173 problem( 00174 eSource source, 00175 eClassification classification, 00176 const XalanDOMString& msg, 00177 const XalanNode* sourceNode) = 0; 00178 00179 virtual void 00180 reset() = 0; 00181 00182 virtual const XalanDOMString& 00183 getPooledString(const XalanDOMString& theString) = 0; 00184 00185 virtual const XalanDOMString& 00186 getPooledString( 00187 const XalanDOMChar* theString, 00188 XalanDOMString::size_type theLength = XalanDOMString::npos) = 0; 00189 00190 virtual XalanDOMString& 00191 getCachedString() = 0; 00192 00193 virtual bool 00194 releaseCachedString(XalanDOMString& theString) = 0; 00195 00196 /** 00197 * Create a new StylesheetRoot instance. The StylesheetConstructionContext 00198 * instance owns the StylesheetRoot instance, and will delete it when asked 00199 * or when the StylesheetConstructionContext instance is destroyed. 00200 * 00201 * @param theBaseIdentifier A URI to the stylesheet file. 00202 * @return A pointer to a new StylesheetRoot instance. 00203 */ 00204 virtual StylesheetRoot* 00205 create(const XalanDOMString& theBaseIdentifier) = 0; 00206 00207 /** 00208 * Create a new StylesheetRoot instance. The StylesheetConstructionContext 00209 * instance owns the StylesheetRoot instance, and will delete it when asked 00210 * or when the StylesheetConstructionContext instance is destroyed. 00211 * 00212 * @param theInputSource A reference to the input source. 00213 * @return A pointer to a new StylesheetRoot instance. 00214 */ 00215 virtual StylesheetRoot* 00216 create(const XSLTInputSource& theInputSource) = 0; 00217 00218 /** 00219 * Create a new Stylesheet instance. The StylesheetConstructionContext 00220 * instance owns the Stylesheet instance, and will delete it when asked 00221 * or when the StylesheetConstructionContext instance is destroyed. 00222 * 00223 * @param A reference to the StylesheetRoot instance. 00224 * @param theBaseIdentifier A URI to the stylesheet file. 00225 * @return A pointer to a new StylesheetRoot instance. 00226 */ 00227 virtual Stylesheet* 00228 create( 00229 StylesheetRoot& theStylesheetRoot, 00230 const XalanDOMString& theBaseIdentifier) = 0; 00231 00232 /** 00233 * Destroy a StylesheetRoot instance. If this StylesheetConstructionContext 00234 * instance does not own the StylesheetRoot, it will not delete it 00235 * 00236 * @param theStylesheet A pointer to the StylesheetRoot instance to delete. 00237 */ 00238 virtual void 00239 destroy(StylesheetRoot* theStylesheetRoot) = 0; 00240 00241 /** 00242 * Determine the fully qualified URI for a string. 00243 * 00244 * @param urlString string to qualify 00245 * @return auto pointer to fully qualified URI 00246 */ 00247 virtual URLAutoPtrType 00248 getURLFromString(const XalanDOMString& urlString) = 0; 00249 00250 /** 00251 * Determine the fully qualified URI for a string. 00252 * 00253 * @param urlString string to qualify 00254 * @return string to fully qualified URI 00255 */ 00256 virtual XalanDOMString& 00257 getURLStringFromString( 00258 const XalanDOMString& urlString, 00259 XalanDOMString& theResult) = 0; 00260 00261 /** 00262 * Determine the fully qualified URI for a string. 00263 * 00264 * @param urlString string to qualify 00265 * @param base base location for URI 00266 * @return auto pointer to fully qualified URI 00267 */ 00268 virtual URLAutoPtrType 00269 getURLFromString( 00270 const XalanDOMString& urlString, 00271 const XalanDOMString& base) = 0; 00272 00273 /** 00274 * Determine the fully qualified URI for a string. 00275 * 00276 * @param urlString string to qualify 00277 * @param base base location for URI 00278 * @return string to fully qualified URI 00279 */ 00280 virtual XalanDOMString& 00281 getURLStringFromString( 00282 const XalanDOMString& urlString, 00283 const XalanDOMString& base, 00284 XalanDOMString& theResult) = 0; 00285 00286 /** 00287 * Retrieve the URI for the current XSLT namespace, for example, 00288 * "http://www.w3.org/1999/XSL/Transform" 00289 * 00290 * @return URI string 00291 */ 00292 virtual const XalanDOMString& 00293 getXSLTNamespaceURI() const = 0; 00294 00295 /** 00296 * Create and initialize an xpath for a match pattern and return it. This 00297 * is to be used by stylesheet elements that need an XPath that is 00298 * guaranteed to persist while it lives. 00299 * 00300 * @param locator the locator for the XPath. May be null. 00301 * @param str string to match 00302 * @param resolver resolver for namespace resolution 00303 * @param allowVariableReferences If true, variable references are allowed. 00304 * @param allowKeyFunction If true, calls to the key() function are allowed. 00305 * @return XPath for match pattern 00306 */ 00307 virtual XPath* 00308 createMatchPattern( 00309 const Locator* locator, 00310 const XalanDOMString& str, 00311 const PrefixResolver& resolver, 00312 bool allowVariableReferences = true, 00313 bool allowKeyFunction = true) = 0; 00314 00315 /** 00316 * Create and initialize an xpath for a match pattern and return it. This 00317 * is to be used by stylesheet elements that need an XPath that is 00318 * guaranteed to persist while it lives. 00319 * 00320 * @param locator the locator for the XPath. May be null. 00321 * @param str string to match 00322 * @param resolver resolver for namespace resolution 00323 * @param allowVariableReferences If true, variable references are allowed. 00324 * @param allowKeyFunction If true, calls to the key() function are allowed. 00325 * @return XPath for match pattern 00326 */ 00327 virtual XPath* 00328 createMatchPattern( 00329 const Locator* locator, 00330 const XalanDOMChar* str, 00331 const PrefixResolver& resolver, 00332 bool allowVariableReferences = true, 00333 bool allowKeyFunction = true) = 0; 00334 00335 /** 00336 * Create and initialize an xpath and return it. This is to be used by 00337 * stylesheet elements that need an XPath that is guaranteed to persist 00338 * while it lives. 00339 * 00340 * @param locator the locator for the XPath. May be null. 00341 * @param str string to match 00342 * @param resolver resolver for namespace resolution 00343 * @return XPath for string matched 00344 */ 00345 virtual XPath* 00346 createXPath( 00347 const Locator* locator, 00348 const XalanDOMString& str, 00349 const PrefixResolver& resolver, 00350 bool allowVariableReferences = true, 00351 bool allowKeyFunction = true) = 0; 00352 00353 /** 00354 * Create and initialize an xpath and return it. This is to be used by 00355 * stylesheet elements that need an XPath that is guaranteed to persist 00356 * while it lives. 00357 * 00358 * @param locator the locator for the XPath. May be null. 00359 * @param str string to match 00360 * @param resolver resolver for namespace resolution 00361 * @return XPath for string matched 00362 */ 00363 virtual XPath* 00364 createXPath( 00365 const Locator* locator, 00366 const XalanDOMChar* str, 00367 const PrefixResolver& resolver, 00368 bool allowVariableReferences = true, 00369 bool allowKeyFunction = true) = 0; 00370 00371 /** 00372 * Create and initialize an xpath and return it. This is to be used by 00373 * stylesheet elements that need an XPath that is guaranteed to persist 00374 * while it lives. 00375 * 00376 * @param locator the locator for the XPath. May be null. 00377 * @param str string to match 00378 * @param resolver resolver for namespace resolution 00379 * @return XPath for string matched 00380 */ 00381 virtual XPath* 00382 createXPath( 00383 const Locator* locator, 00384 const XalanDOMChar* str, 00385 XalanDOMString::size_type len, 00386 const PrefixResolver& resolver, 00387 bool allowVariableReferences = true, 00388 bool allowKeyFunction = true) = 0; 00389 00390 /** 00391 * Get the locator from the top of the locator stack. 00392 * 00393 * @return A pointer to the Locator, or 0 if there is nothing on the stack. 00394 */ 00395 virtual const Locator* 00396 getLocatorFromStack() const = 0; 00397 00398 /** 00399 * Push a locator on to the locator stack. 00400 * 00401 * @param A pointer to the Locator to push. 00402 */ 00403 virtual void 00404 pushLocatorOnStack(const Locator* locator) = 0; 00405 00406 /** 00407 * Pop the locator from the top of the locator stack. 00408 */ 00409 virtual void 00410 popLocatorStack() = 0; 00411 00412 /** 00413 * Get the Xalan namespace for built-in extensions. 00414 * 00415 * @return Xalan namespace for extensions 00416 */ 00417 virtual const XalanDOMString& 00418 getXalanXSLNameSpaceURL() const = 0; 00419 00420 /** 00421 * Read in the XML file, either producing a Document or calling SAX events, 00422 * and register the document in a table. If the document has already been 00423 * read in, it will not be reparsed. 00424 * 00425 * @param urlString location of the XML 00426 * @param docHandler pointer to SAX event handler 00427 * @param docToRegister if using a SAX event handler, the object to register in the source docs table. 00428 * @return document object, which represents the parsed XML 00429 * @exception SAXException 00430 */ 00431 virtual XalanDocument* 00432 parseXML( 00433 const XalanDOMString& urlString, 00434 DocumentHandler* docHandler, 00435 XalanDocument* docToRegister, 00436 ErrorHandler* theErrorHandler = 0) = 0; 00437 00438 /** 00439 * Given an name, determine if it is the xml:space attribute 00440 * 00441 * @param theAttributeName The name to check 00442 * @param theStylesheet The current Stylesheet instance 00443 * @param theLocator The Locator for error reporting. May be 0. 00444 * 00445 * @return true if the string is the xml:space attribute name 00446 */ 00447 virtual bool 00448 isXMLSpaceAttribute( 00449 const XalanDOMChar* theAttributeName, 00450 const Stylesheet& theStylesheet, 00451 const Locator* theLocator = 0) = 0; 00452 00453 /** 00454 * Given an name, determine if it is the xsl:use-attribute-sets attribute 00455 * 00456 * @param theAttributeName The name to check 00457 * @param theStylesheet The current Stylesheet instance 00458 * @param theLocator The Locator for error reporting. May be 0. 00459 * 00460 * @return true if the string is the xsl:use-attribute-sets attribute name 00461 */ 00462 virtual bool 00463 isXSLUseAttributeSetsAttribute( 00464 const XalanDOMChar* theAttributeName, 00465 const Stylesheet& theStylesheet, 00466 const Locator* theLocator = 0) = 0; 00467 00468 /** 00469 * Given an name, determine if it is a valid QName 00470 * 00471 * @param theName The name to check 00472 * @param theStylesheet The current Stylesheet instance 00473 * @param theLocator The Locator for error reporting. May be 0. 00474 * 00475 * @return true if the string is a valid QName. 00476 */ 00477 virtual bool 00478 isValidQName( 00479 const XalanDOMChar* theName, 00480 const Stylesheet& theStylesheet, 00481 const Locator* theLocator = 0) = 0; 00482 00483 /** 00484 * Given an XSL tag name, return an integer token that corresponds to 00485 * the enums defined above. 00486 * 00487 * @param name a probable xsl:xxx element 00488 * @return The enum value for that token, or ELEMNAME_UNDEFINED 00489 */ 00490 virtual eElementToken 00491 getElementToken(const XalanDOMString& name) const = 0; 00492 00493 /** 00494 * Get the latest XSLT version currently supported. 00495 * 00496 * @return XSLT version number 00497 */ 00498 virtual double 00499 getXSLTVersionSupported() const = 0; 00500 00501 /** 00502 * Allocate a vector of XalanDOMChar of the specified 00503 * size. 00504 * 00505 * @param theLength The length of the character vector 00506 * @return A pointer to the vector. 00507 */ 00508 virtual XalanDOMChar* 00509 allocateXalanDOMCharVector(XalanDOMString::size_type theLength) = 0; 00510 00511 /** 00512 * Allocate a vector of XalanDOMChar of the specified 00513 * size. 00514 * 00515 * @param theString The source character array 00516 * @param theLength The length of the character vector 00517 * @param fTerminate If true, terminate the new vector with 0 00518 * @return A pointer to the array. 00519 */ 00520 virtual XalanDOMChar* 00521 allocateXalanDOMCharVector( 00522 const XalanDOMChar* theString, 00523 XalanDOMString::size_type theLength = XalanDOMString::npos, 00524 bool fTerminate = true) = 0; 00525 00526 /** 00527 * Create an AVT instance. 00528 * 00529 * @param locator the Locator for the instance. May be null. 00530 * @param name name of AVT 00531 * @param stringedValue string value to parse 00532 * @param resolver resolver for namespace resolution 00533 * @return A pointer to the instance. 00534 */ 00535 virtual const AVT* 00536 createAVT( 00537 const Locator* locator, 00538 const XalanDOMChar* name, 00539 const XalanDOMChar* stringedValue, 00540 const PrefixResolver& resolver) = 0; 00541 00542 /** 00543 * Create an AVTPart instance. 00544 * 00545 * @param theString The source character array 00546 * @param theLength The length of the character vector 00547 * @param fTerminate If true, terminate the new vector with 0 00548 * @return A pointer to the instance. 00549 */ 00550 virtual const AVTPart* 00551 createAVTPart( 00552 const XalanDOMChar* theString, 00553 XalanDOMString::size_type theLength = XalanDOMString::npos) = 0; 00554 00555 /** 00556 * Create an AVTPart instance. 00557 * 00558 * @param locator the Locator for the instance. May be null. 00559 * @param str The XPath expression for the instance 00560 * @param len The length of the expression 00561 * @param resolver resolver for namespace resolution 00562 * @return A pointer to the instance. 00563 */ 00564 virtual const AVTPart* 00565 createAVTPart( 00566 const Locator* locator, 00567 const XalanDOMChar* str, 00568 XalanDOMString::size_type len, 00569 const PrefixResolver& resolver) = 0; 00570 00571 /** 00572 * Allocate a vector of const AVT* of the specified 00573 * length. 00574 * 00575 * @param theLength The length of the vector 00576 * @return A pointer to the vector. 00577 */ 00578 virtual const AVT** 00579 allocateAVTPointerVector(size_type theLength) = 0; 00580 00581 /** 00582 * Allocate a vector of const AVTPart* of the specified 00583 * length. 00584 * 00585 * @param theLength The length of the vector 00586 * @return A pointer to the vector. 00587 */ 00588 virtual const AVTPart** 00589 allocateAVTPartPointerVector(size_type theLength) = 0; 00590 00591 /** 00592 * Create a XalanQName-derived instance. 00593 * 00594 * @param qname The qname string 00595 * @param namespaces The stack of namespaces 00596 * @param Locator The current Locator, if any 00597 * @param fUseDefault If true, a qname without a prefix will use the default namespace 00598 * @return A pointer to the new instance 00599 */ 00600 virtual const XalanQName* 00601 createXalanQName( 00602 const XalanDOMString& qname, 00603 const NamespacesStackType& namespaces, 00604 const Locator* locator = 0, 00605 bool fUseDefault = false) = 0; 00606 00607 /** 00608 * Create a XalanQName-derived instance. 00609 * 00610 * @param qname The qname string 00611 * @param namespaces The stack of namespaces 00612 * @param Locator The current Locator, if any 00613 * @param fUseDefault If true, a qname without a prefix will use the default namespace 00614 * @return A pointer to the new instance 00615 */ 00616 virtual const XalanQName* 00617 createXalanQName( 00618 const XalanDOMChar* qname, 00619 const NamespacesStackType& namespaces, 00620 const Locator* locator = 0, 00621 bool fUseDefault = false) = 0; 00622 00623 /** 00624 * Tokenize a string and return the QNames corresponding to 00625 * those tokens. 00626 * 00627 * @param count The number of namespaces in the vector returned 00628 * @param qnameTokens The string to tokenize 00629 * @param namespaces The stack of namespaces 00630 * @param Locator The current Locator, if any 00631 * @param fUseDefault If true, qnames without prefixes will use the default namespace 00632 * @return The resulting vector of XalanQName instances. 00633 */ 00634 virtual const XalanQName** 00635 tokenizeQNames( 00636 size_type& count, 00637 const XalanDOMChar* qnameTokens, 00638 const NamespacesStackType& namespaces, 00639 const Locator* locator = 0, 00640 bool fUseDefault = false) = 0; 00641 00642 /** 00643 * Create a stylesheet element for the provided type. The 00644 * instance owns the memory and will delete the element when 00645 * it goes out of scope and the containing stylesheet is 00646 * destroyed. 00647 * 00648 * @param token The enum value of the element to create. 00649 * @param stylesheetTree The stylesheet containing the element 00650 * @param atts The list of attributes for the element 00651 * @param locator The Locator instance for error reporting. May be 0. 00652 * 00653 * @return A pointer to the new instance. 00654 */ 00655 virtual ElemTemplateElement* 00656 createElement( 00657 int token, 00658 Stylesheet& stylesheetTree, 00659 const AttributeList& atts, 00660 const Locator* locator = 0) = 0; 00661 00662 /** 00663 * Create a elements which have specific names. The instance 00664 * owns the memory and will delete the element when it goes 00665 * out of scope and the containing stylesheet is destroyed. 00666 * 00667 * @param token The enum value of the element to create. 00668 * @param stylesheetTree The stylesheet containing the element 00669 * @param name The name of the element 00670 * @param atts The list of attributes for the element 00671 * @param locator The Locator instance for error reporting. May be 0. 00672 * 00673 * @return A pointer to the new instance. 00674 */ 00675 virtual ElemTemplateElement* 00676 createElement( 00677 int token, 00678 Stylesheet& stylesheetTree, 00679 const XalanDOMChar* name, 00680 const AttributeList& atts, 00681 const Locator* locator = 0) = 0; 00682 00683 /** 00684 * Create a an element for literal text. The instance owns the 00685 * memory and will delete the element when it goes out of 00686 * scope and the containing stylesheet is destroyed. 00687 * 00688 * @param stylesheetTree The stylesheet containing the element 00689 * @param chars The pointer to character string for element 00690 * @param length length of the chars parameter. 00691 * @param preserveSpace true is space should be preserved 00692 * @param disableOutputEscaping true if output escaping should be disabled 00693 * @param locator The Locator instance for error reporting. May be 0. 00694 * 00695 * @return A pointer to the new instance. 00696 */ 00697 virtual ElemTemplateElement* 00698 createElement( 00699 Stylesheet& stylesheetTree, 00700 const XalanDOMChar* chars, 00701 XalanDOMString::size_type length, 00702 bool preserveSpace, 00703 bool disableOutputEscaping, 00704 const Locator* locator = 0) = 0; 00705 00706 /** 00707 * Create an element to handle an extension element. The 00708 * instance owns the memory and will delete the element when 00709 * it goes out of scope and the containing stylesheet is 00710 * destroyed. 00711 * 00712 * @param stylesheetTree The stylesheet containing the element 00713 * @param name The name of the element 00714 * @param atts The list of attributes for the element 00715 * @param handler The handler for elements in the extension namespace 00716 * @param locator The Locator instance for error reporting. May be 0. 00717 * 00718 * @return A pointer to the new instance. 00719 */ 00720 virtual ElemTemplateElement* 00721 createElement( 00722 Stylesheet& stylesheetTree, 00723 const XalanDOMChar* name, 00724 const AttributeList& atts, 00725 ExtensionNSHandler& handler, 00726 const Locator* locator = 0) = 0; 00727 00728 /** 00729 * Create an instance of XalanMatchPatternData, which describes 00730 * data related to a match pattern and template in stylesheet. 00731 * The instance owns the memory and will delete the element when 00732 * it goes out of scope and the containing stylesheet is 00733 * destroyed. 00734 * 00735 * @param theTemplate The ElemTemplate node that contains the template for this pattern 00736 * @param thePosition The position in the stylesheet 00737 * @param theTargetString The target string for match pattern 00738 * @param TheMatchPattern The match pattern 00739 * @param thePatternString the pattern string 00740 * @param thePriority The priority for the match pattern. 00741 * 00742 * @return A pointer to the new instance. 00743 */ 00744 virtual const XalanMatchPatternData* 00745 createXalanMatchPatternData( 00746 const ElemTemplate& theTemplate, 00747 size_type thePosition, 00748 const XalanDOMString& theTargetString, 00749 const XPath& theMatchPattern, 00750 const XalanDOMString& thePatternString, 00751 XPath::eMatchScore thePriority) = 0; 00752 }; 00753 00754 00755 00756 XALAN_CPP_NAMESPACE_END 00757 00758 00759 00760 #endif // STYLESHEETCONSTRUCTIONCONTEXT_HEADER_GUARD_1357924680
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|