Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

StylesheetConstructionContext.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #if !defined(STYLESHEETCONSTRUCTIONCONTEXT_HEADER_GUARD_1357924680)
17 #define STYLESHEETCONSTRUCTIONCONTEXT_HEADER_GUARD_1357924680
18 
19 
20 
21 // Base include file. Must be first.
23 
24 
25 
27 
28 
29 
31 
32 
33 
35 #include <xalanc/XPath/XPath.hpp>
37 
38 
39 
40 XALAN_DECLARE_XERCES_CLASS(AttributeList)
41 XALAN_DECLARE_XERCES_CLASS(DocumentHandler)
42 
43 
44 
45 XALAN_CPP_NAMESPACE_BEGIN
46 
47 
48 
49 typedef XERCES_CPP_NAMESPACE_QUALIFIER AttributeList AttributeListType;
50 typedef XERCES_CPP_NAMESPACE_QUALIFIER DocumentHandler DocumentHandlerType;
51 
52 
53 
54 class AVT;
55 class AVTPart;
56 class ElemTemplate;
58 class ExtensionNSHandler;
59 class PrefixResolver;
60 class Stylesheet;
61 class StylesheetRoot;
62 class XalanDocument;
64 class XalanNode;
65 class XSLTInputSource;
66 
67 
68 
69 //
70 // An abstract class which provides support for constructing the internal
71 // representation of a stylesheet.
72 //
74 {
75 public:
76 
78 
79 #if defined(XALAN_STRICT_ANSI_HEADERS)
80  typedef std::size_t size_type;
81 #else
82  typedef size_t size_type;
83 #endif
84 
90  {
91  ELEMNAME_UNDEFINED = -2,
92  ELEMNAME_EMPTY = -1,
122 
124 
127 
131 
132  // This one doesn't really have a name.
133  // It's used for any literal result
134  // element.
136 
137  // This one doesn't really have a name.
138  // It's used for any literal text in
139  // the content of a literal result
140  // element.
142 
143  // This one doesn't really have a name.
144  // It's used for forward-compatible
145  // processing.
147 
148  // Extension handling.
150  ELEMNAME_EXTENSION_HANDLER
151  };
152 
154 
155  explicit
157 
158  virtual
160 
161 
166  virtual void
167  reset() = 0;
168 
177  virtual StylesheetRoot*
178  create(const XalanDOMString& theBaseIdentifier) = 0;
179 
188  virtual StylesheetRoot*
189  create(const XSLTInputSource& theInputSource) = 0;
190 
200  virtual Stylesheet*
201  create(
202  StylesheetRoot& theStylesheetRoot,
203  const XalanDOMString& theBaseIdentifier) = 0;
204 
211  virtual void
212  destroy(StylesheetRoot* theStylesheetRoot) = 0;
213 
220  virtual URLAutoPtrType
221  getURLFromString(const XalanDOMString& urlString) = 0;
222 
229  virtual XalanDOMString&
230  getURLStringFromString(const XalanDOMString& urlString,
231  XalanDOMString& theResult) = 0;
232 
240  virtual URLAutoPtrType
241  getURLFromString(
242  const XalanDOMString& urlString,
243  const XalanDOMString& base) = 0;
244 
252  virtual XalanDOMString&
253  getURLStringFromString(
254  const XalanDOMString& urlString,
255  const XalanDOMString& base,
256  XalanDOMString& theResult) = 0;
257 
264  virtual const XalanDOMString&
265  getXSLTNamespaceURI() const = 0;
266 
279  virtual XPath*
281  const LocatorType* locator,
282  const XalanDOMString& str,
283  const PrefixResolver& resolver,
284  bool allowVariableReferences = true,
285  bool allowKeyFunction = true) = 0;
286 
299  virtual XPath*
301  const LocatorType* locator,
302  const XalanDOMChar* str,
303  const PrefixResolver& resolver,
304  bool allowVariableReferences = true,
305  bool allowKeyFunction = true) = 0;
306 
317  virtual XPath*
318  createXPath(
319  const LocatorType* locator,
320  const XalanDOMString& str,
321  const PrefixResolver& resolver,
322  bool allowVariableReferences = true,
323  bool allowKeyFunction = true) = 0;
324 
335  virtual XPath*
336  createXPath(
337  const LocatorType* locator,
338  const XalanDOMChar* str,
339  const PrefixResolver& resolver,
340  bool allowVariableReferences = true,
341  bool allowKeyFunction = true) = 0;
342 
353  virtual XPath*
354  createXPath(
355  const LocatorType* locator,
356  const XalanDOMChar* str,
358  const PrefixResolver& resolver,
359  bool allowVariableReferences = true,
360  bool allowKeyFunction = true) = 0;
361 
367  virtual const LocatorType*
368  getLocatorFromStack() const = 0;
369 
375  virtual void
376  pushLocatorOnStack(const LocatorType* locator) = 0;
377 
381  virtual void
382  popLocatorStack() = 0;
383 
389  virtual const XalanDOMString&
390  getXalanXSLNameSpaceURL() const = 0;
391 
403  virtual XalanDocument*
404  parseXML(
405  const XalanDOMString& urlString,
406  DocumentHandlerType* docHandler,
407  XalanDocument* docToRegister) = 0;
408 
418  virtual bool
419  isXMLSpaceAttribute(
420  const XalanDOMChar* theAttributeName,
421  const Stylesheet& theStylesheet,
422  const LocatorType* theLocator = 0) = 0;
423 
433  virtual bool
434  isXSLUseAttributeSetsAttribute(
435  const XalanDOMChar* theAttributeName,
436  const Stylesheet& theStylesheet,
437  const LocatorType* theLocator = 0) = 0;
438 
448  virtual bool
449  isValidQName(
450  const XalanDOMChar* theName,
451  const Stylesheet& theStylesheet,
452  const LocatorType* theLocator = 0) = 0;
453 
461  virtual eElementToken
462  getElementToken(const XalanDOMString& name) const = 0;
463 
469  virtual double
470  getXSLTVersionSupported() const = 0;
471 
472  virtual const XalanDOMString&
473  getPooledString(const XalanDOMString& theString) = 0;
474 
475  virtual const XalanDOMString&
476  getPooledString(
477  const XalanDOMChar* theString,
479 
480  virtual XalanDOMString&
481  getCachedString() = 0;
482 
483  virtual bool
484  releaseCachedString(XalanDOMString& theString) = 0;
485 
493  virtual XalanDOMChar*
494  allocateXalanDOMCharVector(XalanDOMString::size_type theLength) = 0;
495 
505  virtual XalanDOMChar*
506  allocateXalanDOMCharVector(
507  const XalanDOMChar* theString,
509  bool fTerminate = true) = 0;
510 
520  virtual const AVT*
521  createAVT(
522  const LocatorType* locator,
523  const XalanDOMChar* name,
524  const XalanDOMChar* stringedValue,
525  const PrefixResolver& resolver) = 0;
526 
535  virtual const AVTPart*
536  createAVTPart(
537  const XalanDOMChar* theString,
539 
549  virtual const AVTPart*
550  createAVTPart(
551  const LocatorType* locator,
552  const XalanDOMChar* str,
554  const PrefixResolver& resolver) = 0;
555 
563  virtual const AVT**
564  allocateAVTPointerVector(size_type theLength) = 0;
565 
573  virtual const AVTPart**
574  allocateAVTPartPointerVector(size_type theLength) = 0;
575 
585  virtual const XalanQName*
586  createXalanQName(
587  const XalanDOMString& qname,
588  const NamespacesStackType& namespaces,
589  const LocatorType* locator = 0,
590  bool fUseDefault = false) = 0;
591 
601  virtual const XalanQName*
602  createXalanQName(
603  const XalanDOMChar* qname,
604  const NamespacesStackType& namespaces,
605  const LocatorType* locator = 0,
606  bool fUseDefault = false) = 0;
607 
619  virtual const XalanQName**
620  tokenizeQNames(
621  size_type& count,
622  const XalanDOMChar* qnameTokens,
623  const NamespacesStackType& namespaces,
624  const LocatorType* locator = 0,
625  bool fUseDefault = false) = 0;
626 
640  virtual ElemTemplateElement*
641  createElement(
642  int token,
643  Stylesheet& stylesheetTree,
644  const AttributeListType& atts,
645  const LocatorType* locator = 0) = 0;
646 
660  virtual ElemTemplateElement*
661  createElement(
662  int token,
663  Stylesheet& stylesheetTree,
664  const XalanDOMChar* name,
665  const AttributeListType& atts,
666  const LocatorType* locator = 0) = 0;
667 
682  virtual ElemTemplateElement*
683  createElement(
684  Stylesheet& stylesheetTree,
685  const XalanDOMChar* chars,
687  bool preserveSpace,
688  bool disableOutputEscaping,
689  const LocatorType* locator = 0) = 0;
690 
705  virtual ElemTemplateElement*
706  createElement(
707  Stylesheet& stylesheetTree,
708  const XalanDOMChar* name,
709  const AttributeListType& atts,
710  ExtensionNSHandler& handler,
711  const LocatorType* locator = 0) = 0;
712 
729  virtual const XalanMatchPatternData*
730  createXalanMatchPatternData(
731  const ElemTemplate& theTemplate,
732  size_type thePosition,
733  const XalanDOMString& theTargetString,
734  const XPath& theMatchPattern,
735  const XalanDOMString& thePatternString,
736  XPath::eMatchScore thePriority) = 0;
737 
738 
739  // These are inherited from XPathConstructionContext...
740 
741  virtual void
742  error(
743  const XalanDOMString& msg,
744  const XalanNode* sourceNode = 0,
745  const ElemTemplateElement* styleNode = 0) const = 0;
746 
747  virtual void
748  error(
749  const XalanDOMString& msg,
750  const XalanNode* sourceNode,
751  const LocatorType* locator) const = 0;
752 
753  virtual void
754  warn(
755  const XalanDOMString& msg,
756  const XalanNode* sourceNode = 0,
757  const ElemTemplateElement* styleNode = 0) const = 0;
758 
759  virtual void
760  warn(
761  const XalanDOMString& msg,
762  const XalanNode* sourceNode,
763  const LocatorType* locator) const = 0;
764 
765  virtual void
766  message(
767  const XalanDOMString& msg,
768  const XalanNode* sourceNode = 0,
769  const ElemTemplateElement* styleNode = 0) const = 0;
770 
771  virtual void
772  message(
773  const XalanDOMString& msg,
774  const XalanNode* sourceNode,
775  const LocatorType* locator) const = 0;
776 
777 };
778 
779 
780 
781 XALAN_CPP_NAMESPACE_END
782 
783 
784 
785 #endif // STYLESHEETCONSTRUCTIONCONTEXT_HEADER_GUARD_1357924680

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo