dbertoni 2003/07/14 18:05:22
Modified: c/src/xalanc/XSLT Stylesheet.cpp Stylesheet.hpp
Log:
Don't derive from XalanDocument any more.
Revision Changes Path
1.2 +0 -420 xml-xalan/c/src/xalanc/XSLT/Stylesheet.cpp
Index: Stylesheet.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/Stylesheet.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Stylesheet.cpp 29 Jun 2003 03:58:08 -0000 1.1
+++ Stylesheet.cpp 15 Jul 2003 01:05:22 -0000 1.2
@@ -75,10 +75,6 @@
-#include <xalanc/XalanDOM/XalanDOMException.hpp>
-
-
-
#include <xalanc/DOMSupport/DOMServices.hpp>
@@ -87,7 +83,6 @@
-#include <xalanc/XPath/ElementPrefixResolverProxy.hpp>
#include <xalanc/XPath/XObject.hpp>
#include <xalanc/XPath/XPath.hpp>
#include <xalanc/XPath/XalanQNameByReference.hpp>
@@ -116,15 +111,12 @@
const XalanQNameByReference Stylesheet::s_emptyQName;
-const XalanEmptyNamedNodeMap Stylesheet::s_fakeAttributes;
-
Stylesheet::Stylesheet(
StylesheetRoot& root,
const XalanDOMString& baseIdentifier,
StylesheetConstructionContext& constructionContext) :
- XalanDocument(),
PrefixResolver(),
m_stylesheetRoot(root),
m_baseIdent(baseIdentifier),
@@ -141,7 +133,6 @@
m_namedTemplates(),
m_topLevelVariables(),
m_XSLTVerDeclared(1.0L),
- m_isRoot(&root == this ? true: false),
m_elementPatternTable(),
m_elementPatternTableEnd(m_elementPatternTable.end()),
m_elementAnyPatternList(),
@@ -157,7 +148,6 @@
m_patternCount(0),
m_attributeSets(),
m_attributeSetsSize(0),
- m_surrogateChildren(*this),
m_elemDecimalFormats(),
m_namespacesHandler()
{
@@ -1556,416 +1546,6 @@
}
}
}
-}
-
-
-
-const XalanDOMString&
-Stylesheet::getNodeName() const
-{
- return s_emptyString;
-}
-
-
-
-const XalanDOMString&
-Stylesheet::getNodeValue() const
-{
- return s_emptyString;
-}
-
-
-
-Stylesheet::NodeType
-Stylesheet::getNodeType() const
-{
- return XalanNode::DOCUMENT_NODE;
-}
-
-
-
-XalanNode*
-Stylesheet::getParentNode() const
-{
- return 0;
-}
-
-
-
-const XalanNodeList*
-Stylesheet::getChildNodes() const
-{
- return &m_surrogateChildren;
-}
-
-
-
-XalanNode*
-Stylesheet::getFirstChild() const
-{
- return 0;
-}
-
-
-
-XalanNode*
-Stylesheet::getLastChild() const
-{
- return 0;
-}
-
-
-
-XalanNode*
-Stylesheet::getPreviousSibling() const
-{
- return 0;
-}
-
-
-
-XalanNode*
-Stylesheet::getNextSibling() const
-{
- return 0;
-}
-
-
-
-const XalanNamedNodeMap*
-Stylesheet::getAttributes() const
-{
- return &s_fakeAttributes;
-}
-
-
-
-XalanDocument*
-Stylesheet::getOwnerDocument() const
-{
- return 0;
-}
-
-
-
-#if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
-XalanNode*
-#else
-Stylesheet*
-#endif
-Stylesheet::cloneNode(bool /* deep */) const
-{
- //should not be called
- assert(false);
-
- return 0;
-}
-
-
-
-XalanNode*
-Stylesheet::insertBefore(
- XalanNode* /* newChild */,
- XalanNode* /* refChild */)
-{
- //should not be called
- assert(false);
-
- return 0;
-}
-
-
-
-XalanNode*
-Stylesheet::replaceChild(
- XalanNode* /* newChild */,
- XalanNode* /* oldChild */)
-{
- //should not be called
- assert(false);
-
- return 0;
-}
-
-
-
-XalanNode*
-Stylesheet::removeChild(XalanNode* /* oldChild */)
-{
- //should not be called
- assert(false);
-
- return 0;
-}
-
-
-
-XalanNode*
-Stylesheet::appendChild(XalanNode* /* oldChild */)
-{
- //should not be called
- assert(false);
-
- return 0;
-}
-
-
-
-bool
-Stylesheet::hasChildNodes() const
-{
- return true;
-}
-
-
-
-void
-Stylesheet::setNodeValue(const XalanDOMString& /* nodeValue */)
-{
- throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR);
-}
-
-
-
-void
-Stylesheet::normalize()
-{
-}
-
-
-
-bool
-Stylesheet::isSupported(
- const XalanDOMString& /* feature */,
- const XalanDOMString& /* version */) const
-{
- return false;
-}
-
-
-
-const XalanDOMString&
-Stylesheet::getNamespaceURI() const
-{
- return s_emptyString;
-}
-
-
-
-const XalanDOMString&
-Stylesheet::getPrefix() const
-{
- return s_emptyString;
-}
-
-
-
-const XalanDOMString&
-Stylesheet::getLocalName() const
-{
- return s_emptyString;
-}
-
-
-
-void
-Stylesheet::setPrefix(const XalanDOMString& /* prefix */)
-{
- throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR);
-}
-
-
-
-Stylesheet::IndexType
-Stylesheet::getIndex() const
-{
- return 0;
-}
-
-
-
-XalanElement*
-Stylesheet::createElement(const XalanDOMString& /* tagName */)
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanDocumentFragment*
-Stylesheet::createDocumentFragment()
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanText*
-Stylesheet::createTextNode(const XalanDOMString& /* data */)
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanComment*
-Stylesheet::createComment(const XalanDOMString& /* data */)
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanCDATASection*
-Stylesheet::createCDATASection(const XalanDOMString& /* data */)
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanProcessingInstruction*
-Stylesheet::createProcessingInstruction(
- const XalanDOMString& /* target */,
- const XalanDOMString& /* data */)
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanAttr*
-Stylesheet::createAttribute(const XalanDOMString& /* name */)
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanEntityReference*
-Stylesheet::createEntityReference(const XalanDOMString& /* name */)
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanDocumentType*
-Stylesheet::getDoctype() const
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanDOMImplementation*
-Stylesheet::getImplementation() const
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanElement*
-Stylesheet::getDocumentElement() const
-{
- return m_firstTemplate;
-}
-
-
-
-XalanNodeList*
-Stylesheet::getElementsByTagName(const XalanDOMString& /* name
*/) const
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanNodeList*
-Stylesheet::getElementsByTagNameNS(
- const XalanDOMString& /* namespaceURI */,
- const XalanDOMString& /* localName */) const
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanNode*
-Stylesheet::importNode(
- XalanNode* /* importedNode */,
- bool /* deep */)
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanElement*
-Stylesheet::createElementNS(
- const XalanDOMString& /* namespaceURI */,
- const XalanDOMString& /* qualifiedName */)
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanAttr*
-Stylesheet::createAttributeNS(
- const XalanDOMString& /* namespaceURI */,
- const XalanDOMString& /* qualifiedName */)
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-XalanElement*
-Stylesheet::getElementById(const XalanDOMString& /* elementId */) const
-{
- throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
-
- return 0;
-}
-
-
-
-bool
-Stylesheet::isIndexed() const
-{
- return false;
}
1.2 +2 -171 xml-xalan/c/src/xalanc/XSLT/Stylesheet.hpp
Index: Stylesheet.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/Stylesheet.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Stylesheet.hpp 29 Jun 2003 03:58:08 -0000 1.1
+++ Stylesheet.hpp 15 Jul 2003 01:05:22 -0000 1.2
@@ -74,9 +74,7 @@
-#include <xalanc/XalanDOM/XalanDocument.hpp>
-#include <xalanc/XalanDOM/XalanEmptyNamedNodeMap.hpp>
-#include <xalanc/XalanDOM/XalanNodeListSurrogate.hpp>
+#include <xalanc/XalanDOM/XalanNode.hpp>
#include <xalanc/PlatformSupport/PrefixResolver.hpp>
@@ -121,7 +119,7 @@
* This class represents the base stylesheet or an "import" stylesheet.
* "include" stylesheets are combined with the including stylesheet.
*/
-class XALAN_XSLT_EXPORT Stylesheet : public XalanDocument, protected
PrefixResolver
+class XALAN_XSLT_EXPORT Stylesheet : protected PrefixResolver
{
public:
@@ -425,17 +423,6 @@
StylesheetConstructionContext& constructionContext)
const;
/**
- * Tell if this is the root of the stylesheet tree.
- *
- * @return true if it is the root
- */
- bool
- isRoot() const
- {
- return m_isRoot;
- }
-
- /**
* Retrieve the base identifier with which this stylesheet is
associated.
*
* @return string for base identifier
@@ -888,156 +875,6 @@
StylesheetExecutionContext& executionContext,
const ParamVectorType& topLevelParams)
const;
- // These interfaces are inherited from XalanDocument...
-
- virtual const XalanDOMString&
- getNodeName() const;
-
- virtual const XalanDOMString&
- getNodeValue() const;
-
- virtual NodeType
- getNodeType() const;
-
- virtual XalanNode*
- getParentNode() const;
-
- virtual const XalanNodeList*
- getChildNodes() const;
-
- virtual XalanNode*
- getFirstChild() const;
-
- virtual XalanNode*
- getLastChild() const;
-
- virtual XalanNode*
- getPreviousSibling() const;
-
- virtual XalanNode*
- getNextSibling() const;
-
- virtual const XalanNamedNodeMap*
- getAttributes() const;
-
- virtual XalanDocument*
- getOwnerDocument() const;
-
-#if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
- virtual XalanNode*
-#else
- virtual Stylesheet*
-#endif
- cloneNode(bool deep) const;
-
- virtual XalanNode*
- insertBefore(
- XalanNode* newChild,
- XalanNode* refChild);
-
- virtual XalanNode*
- replaceChild(
- XalanNode* newChild,
- XalanNode* oldChild);
-
- virtual XalanNode*
- removeChild(XalanNode* oldChild);
-
- virtual XalanNode*
- appendChild(XalanNode* newChild);
-
- virtual bool
- hasChildNodes() const;
-
- virtual void
- setNodeValue(const XalanDOMString& nodeValue);
-
- virtual void
- normalize();
-
- virtual bool
- isSupported(
- const XalanDOMString& feature,
- const XalanDOMString& version) const;
-
- virtual const XalanDOMString&
- getNamespaceURI() const;
-
- virtual const XalanDOMString&
- getPrefix() const;
-
- virtual const XalanDOMString&
- getLocalName() const;
-
- virtual void
- setPrefix(const XalanDOMString& prefix);
-
- virtual IndexType
- getIndex() const;
-
- virtual XalanElement*
- createElement(const XalanDOMString& tagName);
-
- virtual XalanDocumentFragment*
- createDocumentFragment();
-
- virtual XalanText*
- createTextNode(const XalanDOMString& data);
-
- virtual XalanComment*
- createComment(const XalanDOMString& data);
-
- virtual XalanCDATASection*
- createCDATASection(const XalanDOMString& data);
-
- virtual XalanProcessingInstruction*
- createProcessingInstruction(
- const XalanDOMString& target,
- const XalanDOMString& data);
-
- virtual XalanAttr*
- createAttribute(const XalanDOMString& name);
-
- virtual XalanEntityReference*
- createEntityReference(const XalanDOMString &name);
-
- virtual XalanDocumentType*
- getDoctype() const;
-
- virtual XalanDOMImplementation*
- getImplementation() const;
-
- virtual XalanElement*
- getDocumentElement() const;
-
- virtual XalanNodeList*
- getElementsByTagName(const XalanDOMString& tagname) const;
-
- virtual XalanNode*
- importNode(
- XalanNode* importedNode,
- bool deep);
-
- virtual XalanElement*
- createElementNS(
- const XalanDOMString& namespaceURI,
- const XalanDOMString& qualifiedName);
-
- virtual XalanAttr*
- createAttributeNS(
- const XalanDOMString& namespaceURI,
- const XalanDOMString& qualifiedName);
-
- virtual XalanNodeList*
- getElementsByTagNameNS(
- const XalanDOMString& namespaceURI,
- const XalanDOMString& localName) const;
-
- virtual XalanElement*
- getElementById(const XalanDOMString& elementId) const;
-
- virtual bool
- isIndexed() const;
// These interfaces are inherited from PrefixResolver...
@@ -1171,8 +1008,6 @@
*/
double
m_XSLTVerDeclared;
- const bool
m_isRoot;
-
/**
* This table is keyed on the target elements of patterns, and contains
linked
* lists of the actual patterns that match the target element to some
degree
@@ -1229,15 +1064,11 @@
*/
AttributeSetVectorType::size_type m_attributeSetsSize;
- XalanNodeListSurrogate
m_surrogateChildren;
-
ElemDecimalFormatVectorType
m_elemDecimalFormats;
NamespacesHandler
m_namespacesHandler;
static const XalanDOMString s_emptyString;
-
- static const XalanEmptyNamedNodeMap s_fakeAttributes;
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]