|
Xalan-C++ API Reference
1.12.0
|
Go to the documentation of this file.
18 #if !defined(XALAN_XSLTENGINEIMPL_HEADER_GUARD)
19 #define XALAN_XSLTENGINEIMPL_HEADER_GUARD
43 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
81 namespace XERCES_CPP_NAMESPACE
84 class DocumentHandler;
96 using xercesc::InputSource;
97 using xercesc::DocumentHandler;
105 class StylesheetConstructionContext;
106 class StylesheetRoot;
108 class XalanSourceTreeDocument;
110 class XMLParserLiaison;
112 class XPathEnvSupport;
114 class XPathProcessor;
115 class XSLTResultTarget;
142 if (theLHS == 0 && theRHS != 0)
146 else if (theRHS == 0)
152 return theLHS->
compare(*theRHS) < 0 ? true :
false;
173 assert(theString != 0);
175 return *theString == m_string;
207 MemoryManager& theManager,
220 return m_xpathConstructionContext.getMemoryManager();
226 return m_xpathConstructionContext.getMemoryManager();
234 initialize(MemoryManager& theManager);
247 eClassification classification,
249 const Locator* locator,
255 eClassification classification,
290 getXMLParserLiaison()
const;
306 clearStylesheetParams();
309 getFormatterListener()
const;
317 getTraceListeners()
const;
335 getTraceSelects()
const;
338 setTraceSelects(
bool b);
345 const XPath* xpath)
const;
348 setQuietConflictWarnings(
bool b);
389 DocumentHandler* docHandler,
391 ErrorHandler* theErrorHandler = 0);
406 const InputSource& inputSource,
407 DocumentHandler* docHandler,
409 ErrorHandler* theErrorHandler = 0);
424 getStylesheetFromPIURL(
448 addResultNamespaceDecl(
450 namespaceVal.
c_str(),
464 const XalanDOMChar* namespaceVal,
467 m_resultNamespacesStack.addDeclaration(
488 bool fromCopy =
false,
489 const Locator* locator = 0)
513 const XalanDOMChar* value,
514 bool fromCopy =
false,
515 const Locator* locator = 0)
541 const XalanDOMChar* value,
543 bool fromCopy =
false,
544 const Locator* locator = 0);
558 const XalanDOMChar* value,
559 bool fromCopy =
false,
560 const Locator* locator = 0)
562 assert(m_outputContextStack.empty() ==
false);
565 getPendingAttributesImpl(),
585 bool fromCopy =
false,
586 const Locator* locator = 0)
588 assert(m_outputContextStack.empty() ==
false);
591 getPendingAttributesImpl(),
604 reportDuplicateNamespaceNodeError(
606 const Locator* locator);
609 setDocumentLocator(
const Locator* locator);
619 const XalanDOMChar* name,
623 endElement(
const XalanDOMChar* name);
627 const XalanDOMChar* ch,
632 const XalanDOMChar* ch,
636 processingInstruction(
637 const XalanDOMChar* target,
638 const XalanDOMChar* data);
652 const XalanDOMChar* ch,
679 startElement(
const XalanDOMChar* name);
692 const XalanDOMChar* ch,
718 comment(
const XalanDOMChar* data);
727 entityReference(
const XalanDOMChar* data);
738 const XalanDOMChar* ch,
752 bool cloneTextNodesOnly,
753 const Locator* locator);
770 bool shouldCloneAttributes,
771 bool cloneTextNodesOnly,
772 const Locator* locator);
784 bool outputTextNodesOnly,
785 const Locator* locator);
798 bool outputTextNodesOnly,
799 const Locator* locator)
801 outputResultTreeFragment(
816 outputResultTreeFragment(
818 bool outputTextNodesOnly,
819 const Locator* locator);
827 getStylesheetRoot()
const;
854 return s_XSLNameSpaceURL;
865 return s_XalanNamespaceURL;
876 return m_quietConflictWarnings;
895 getResultPrefixForNamespace(
const XalanDOMString& theNamespace)
const;
941 returnXPath(
const XPath* xpath);
949 copyNamespaceAttributes(
const XalanNode& src);
1003 copyAttributeToTarget(
1016 return m_xpathFactory;
1027 return *m_xpathProcessor.get();
1045 return m_xpathEnvSupport;
1059 m_problemListener = l;
1073 return m_problemListener;
1084 m_outputContextStack.pushContext(theListener);
1093 m_outputContextStack.popContext();
1103 return getHasPendingStartDocumentImpl();
1113 setHasPendingStartDocumentImpl(b);
1123 return getMustFlushPendingStartDocumentImpl();
1133 setMustFlushPendingStartDocumentImpl(b);
1144 return getPendingAttributesImpl();
1155 getPendingAttributesImpl() = pendingAttributes;
1167 const XalanDOMChar* theName,
1168 const XalanDOMChar* theNewType,
1169 const XalanDOMChar* theNewValue)
1173 getPendingAttributesImpl().addAttribute(theName, theNewType, theNewValue);
1179 return !getPendingElementNameImpl().empty();
1190 return getPendingElementNameImpl();
1201 setPendingElementNameImpl(elementName);
1207 setPendingElementNameImpl(elementName);
1218 return m_stylesheetLocatorStack.empty() ==
true ? 0 : m_stylesheetLocatorStack.back();
1229 m_stylesheetLocatorStack.push_back(locator);
1238 if (m_stylesheetLocatorStack.empty() ==
false)
1240 m_stylesheetLocatorStack.pop_back();
1254 return m_outputContextStack.getPendingAttributes();
1265 return m_outputContextStack.getPendingAttributes();
1276 getPendingAttributesImpl() = pendingAttributes;
1287 return m_outputContextStack.getPendingElementName();
1298 return m_outputContextStack.getPendingElementName();
1309 m_outputContextStack.getPendingElementName() = elementName;
1320 assert(elementName != 0);
1322 m_outputContextStack.getPendingElementName() = elementName;
1332 return m_outputContextStack.getHasPendingStartDocument();
1342 m_outputContextStack.getHasPendingStartDocument() = b;
1352 return m_outputContextStack.getMustFlushPendingStartDocument();
1362 m_outputContextStack.getMustFlushPendingStartDocument() = b;
1368 return m_outputContextStack.getFormatterListener();
1374 m_outputContextStack.getFormatterListener() = flistener;
1396 copyAttributesToAttList(
1424 warnCopyTextNodesOnly(
1426 const Locator* locator);
1437 bool overrideStrip);
1444 pendingAttributesHasDefaultNS()
const;
1452 bool fOnlyIfPrefixNotPresent);
1458 bool fOnlyIfPrefixNotPresent =
false);
1499 bool m_traceSelects;
1505 bool m_quietConflictWarnings;
1529 const Locator& locator,
1544 XMLUInt32 m_uniqueNSValue;
1556 m_topLevelParams.
clear();
1562 generateCDATASection()
const
1564 if (m_hasCDATASectionElements ==
false)
1570 assert(m_cdataStack.
empty() ==
false);
1572 return m_cdataStack.
back();
1579 setMustFlushPendingStartDocument(
true);
1592 isCDataResultElem(
const XalanDOMString& elementName);
1595 fireCharacterGenerateEvent(
1596 const XalanNode& theNode,
1600 fireCharacterGenerateEvent(
1601 const XObjectPtr& theXObject,
1605 fireCharacterGenerateEvent(
1606 const XalanDOMString& theString,
1610 fireCharacterGenerateEvent(
1611 const XalanDOMChar* ch,
1617 checkDefaultNamespace(
1618 const XalanDOMString& theElementName,
1619 const XalanDOMString& theElementNamespaceURI);
1623 const XalanDOMString& theMessage,
1624 const Locator* theLocator,
1625 const XalanNode* theSourceNode);
1629 const XalanDOMString& theMessage,
1630 const Locator* theLocator,
1631 const XalanNode* theSourceNode);
1635 const XalanDOMString& theMessage,
1636 const Locator* theLocator,
1637 const XalanNode* theSourceNode);
1640 XMLParserLiaison& m_parserLiaison;
1642 XPathEnvSupport& m_xpathEnvSupport;
1644 DOMSupport& m_domSupport;
1649 StylesheetExecutionContext* m_executionContext;
1654 OutputContextStack m_outputContextStack;
1659 XalanNamespacesStack m_resultNamespacesStack;
1664 AttributeListImpl m_dummyAttributesList;
1666 XalanDOMString m_scratchString;
1668 XalanDOMStringPointerVectorType m_attributeNamesVisited;
1670 bool m_hasCDATASectionElements;
1672 XPathConstructionContextDefault m_xpathConstructionContext;
1674 ParamMapType m_stylesheetParams;
1677 installFunctions(MemoryManager& theManager);
1680 uninstallFunctions();
1683 static const XalanDOMString s_emptyString;
1685 static const XalanDOMString& s_stylesheetNodeName;
1686 static const XalanDOMString& s_typeString;
1687 static const XalanDOMString& s_hrefString;
1688 static const XalanDOMString& s_piTokenizerString;
1689 static const XalanDOMString& s_typeValueString1;
1690 static const XalanDOMString& s_typeValueString2;
1691 static const XalanDOMString& s_typeValueString3;
1692 static const XalanDOMString& s_typeValueString4;
1695 XSLTEngineImpl(
const XSLTEngineImpl&);
1698 operator=(
const XSLTEngineImpl&);
1710 #endif // XALAN_XSLTENGINEIMPL_HEADER_GUARD
void replacePendingAttribute(const XalanDOMChar *theName, const XalanDOMChar *theNewType, const XalanDOMChar *theNewValue)
Replace the contents of a pending attribute.
void addResultAttribute(AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMChar *value, bool fromCopy=false, const Locator *locator=0)
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
XPathProcessor & getXPathProcessor()
Get the XPath processor object.
XalanVector< bool > BoolVectorType
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
XalanMap< XalanDOMString, XalanParamHolder > ParamMapType
MemoryManager & getMemoryManager()
xercesc::AttributeList AttributeListType
const Locator * getLocatorFromStack() const
Get the locator from the top of the locator stack.
Function::XObjectArgVectorType XObjectArgVectorType
void setFormatterListenerImpl(FormatterListener *flistener)
bool operator()(const XalanDOMString *theString) const
void pushLocatorOnStack(const Locator *locator)
Push a locator on to the locator stack.
XPathExecutionContext::GetCachedString ECGetCachedString
virtual const XalanDocumentFragment & rtree() const
Cast result object to a result tree fragment.
void setPendingElementName(const XalanDOMString &elementName)
Changes the currently pending element name.
BoolVectorType m_cdataStack
Stack of Booleans to keep track of if we should be outputting cdata instead of escaped text.
static const XalanDOMString & getXalanXSLNameSpaceURL()
Special Xalan namespace for built-in extensions.
XPathEnvSupport & getXPathEnvSupport()
Retrieve the XPath environment support object.
#define XALAN_XSLT_EXPORT
void setPendingAttributes(const AttributeListType &pendingAttributes)
Set the list of attributes yet to be processed.
XalanVector< const XalanDOMString * > XalanDOMStringPointerVectorType
int compare(const XalanDOMString &theString) const
XalanDOMString m_resultNameSpaceURL
The URL that belongs to the result namespace.
XalanDOMString m_resultNameSpacePrefix
The namespace that the result tree conforms to.
void addResultAttribute(const XalanDOMString &aname, const XalanDOMChar *value, bool fromCopy=false, const Locator *locator=0)
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack.
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
void setHasPendingStartDocument(bool b)
void outputResultTreeFragment(const XObject &theTree, bool outputTextNodesOnly, const Locator *locator)
Given a result tree fragment, walk the tree and output it to the result stream.
FindStringPointerFunctor(const XalanDOMString &theString)
Class to hold XObjectPtr return types.
ProblemListener * getProblemListener() const
Get the problem listener property.
It's the responsibility of the XSLTEngineImpl class, collaborating with the XML parser liaison,...
bool isElementPending() const
const XalanDOMString & getPendingElementName() const
Retrieve name of the pending element currently being processed.
xercesc::DocumentHandler DocumentHandlerType
void addResultNamespaceDecl(const XalanDOMString &prefix, const XalanDOMString &namespaceVal)
Add a namespace declaration to the namespace stack.
This is an interface for an XSLT Processor engine.
bool getHasPendingStartDocument() const
const XPathProcessorPtrType m_xpathProcessor
This is the abstract class that the XSL processor uses when it has a problem of some kind,...
void setMustFlushPendingStartDocument(bool b)
void setPendingElementNameImpl(const XalanDOMString &elementName)
Changes the currently pending element name.
void pushOutputContext(FormatterListener *theListener)
void addResultAttribute(AttributeListImpl &attList, const XalanDOMString &aname, const XalanDOMString &value, bool fromCopy=false, const Locator *locator=0)
Add attribute to attribute list, and if it is a namespace, add it to the namespaces stack.
const AttributeListType & getPendingAttributes() const
Get the list of attributes yet to be processed.
AttributeListImpl & getPendingAttributesImpl()
Get the list of attributes yet to be processed.
void setHasPendingStartDocumentImpl(bool b)
Class to hold XPath return types.
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
void setPendingElementName(const XalanDOMChar *elementName)
bool getMustFlushPendingStartDocumentImpl() const
XalanMemMgrAutoPtr< XPathProcessor > XPathProcessorPtrType
XalanVector< TraceListener * > TraceListenerVectorType
This class defines an interface for classes that resolve namespace prefixes to their URIs.
The implementation of the default error handling for Xalan.
FormatterListener * getFormatterListenerImpl() const
void setPendingElementNameImpl(const XalanDOMChar *elementName)
Changes the currently pending element name.
const XalanDOMString & getPendingElementNameImpl() const
Retrieve name of the pending element currently being processed.
bool getHasPendingStartDocumentImpl() const
void setPendingAttributesImpl(const AttributeListType &pendingAttributes)
Set the list of attributes yet to be processed.
XPathConstructionContext::GetCachedString CCGetCachedString
static const XalanDOMString & getXSLNameSpaceURL()
Retrieve the URI for the current XSL namespace, for example, "http://www.w3.org/1999/XSL/Transform".
XObjectFactory & m_xobjectFactory
bool operator()(const XalanDOMString *theLHS, const XalanDOMString *theRHS) const
This is the parent class of events generated for tracing the progress of the XSL processor.
const XalanDOMChar * c_str() const
void setProblemListener(ProblemListener *l)
Set the problem listener property.
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
XalanDOMString & getPendingElementNameImpl()
Retrieve name of the pending element currently being processed.
xercesc::InputSource InputSourceType
void popLocatorStack()
Pop the locator from the top of the locator stack.
MemoryManager & getMemoryManager() const
const AttributeListImpl & getPendingAttributesImpl() const
Get the list of attributes yet to be processed.
This class represents the base stylesheet or an "import" stylesheet.
Local implementation of NodeRefList.
XPathFactory & getXPathFactory()
Get the factory for making xpaths.
This is the class for events generated by the XSL processor after it generates a new node in the resu...
void addResultAttribute(const XalanDOMString &aname, const XalanDOMString &value, bool fromCopy=false, const Locator *locator=0)
Add attribute to pending attributes list, and if it is a namespace, add it to the namespaces stack.
void clearTopLevelParams()
Reset the vector of top level parameters.
XPathFactory & m_xpathFactory
StylesheetExecutionContext::ParamVectorType ParamVectorType
bool getQuietConflictWarnings() const
Whether to warn about pattern match conflicts.
This class handles the creation of XObjects and manages their lifetime.
void addResultNamespaceDecl(const XalanDOMString &prefix, const XalanDOMChar *namespaceVal, size_type len)
Add a namespace declaration to the namespace stack.
void setMustFlushPendingStartDocumentImpl(bool b)
bool getMustFlushPendingStartDocument() const
XalanVector< const Locator * > LocatorStack