You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2001/11/15 16:44:04 UTC
cvs commit: xml-xalan/c/src/XSLT Stylesheet.cpp
dbertoni 01/11/15 07:44:04
Modified: c/src/XSLT Stylesheet.cpp
Log:
Throw more appropriate exceptions.
Revision Changes Path
1.66 +19 -36 xml-xalan/c/src/XSLT/Stylesheet.cpp
Index: Stylesheet.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/Stylesheet.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- Stylesheet.cpp 2001/11/08 01:08:48 1.65
+++ Stylesheet.cpp 2001/11/15 15:44:04 1.66
@@ -1533,14 +1533,13 @@
bool
Stylesheet::hasChildNodes() const
{
- // $$$ ToDo: Is this always true?
return true;
}
void
-Stylesheet::setNodeValue(const XalanDOMString& /* nodeValue */)
+Stylesheet::setNodeValue(const XalanDOMString& /* nodeValue */)
{
throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR);
}
@@ -1567,7 +1566,6 @@
const XalanDOMString&
Stylesheet::getNamespaceURI() const
{
- // $$ ToDo: Is this the same value as PrefixResolver::getURI()?
return s_emptyString;
}
@@ -1608,8 +1606,7 @@
XalanElement*
Stylesheet::createElement(const XalanDOMString& /* tagName */)
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1619,8 +1616,7 @@
XalanDocumentFragment*
Stylesheet::createDocumentFragment()
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1630,8 +1626,7 @@
XalanText*
Stylesheet::createTextNode(const XalanDOMString& /* data */)
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1641,8 +1636,7 @@
XalanComment*
Stylesheet::createComment(const XalanDOMString& /* data */)
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1652,8 +1646,7 @@
XalanCDATASection*
Stylesheet::createCDATASection(const XalanDOMString& /* data */)
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1665,8 +1658,7 @@
const XalanDOMString& /* target */,
const XalanDOMString& /* data */)
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1676,8 +1668,7 @@
XalanAttr*
Stylesheet::createAttribute(const XalanDOMString& /* name */)
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1687,8 +1678,7 @@
XalanEntityReference*
Stylesheet::createEntityReference(const XalanDOMString& /* name */)
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1698,8 +1688,7 @@
XalanDocumentType*
Stylesheet::getDoctype() const
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1709,8 +1698,7 @@
XalanDOMImplementation*
Stylesheet::getImplementation() const
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1720,8 +1708,6 @@
XalanElement*
Stylesheet::getDocumentElement() const
{
- // $$$ ToDo: Is this correct?
-
return m_wrapperlessTemplate != 0 ? m_wrapperlessTemplate : m_firstTemplate;
}
@@ -1730,6 +1716,8 @@
XalanNodeList*
Stylesheet::getElementsByTagName(const XalanDOMString& /* name */) const
{
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
+
return 0;
}
@@ -1740,6 +1728,8 @@
const XalanDOMString& /* namespaceURI */,
const XalanDOMString& /* localName */) const
{
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
+
return 0;
}
@@ -1750,8 +1740,7 @@
XalanNode* /* importedNode */,
bool /* deep */)
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1763,8 +1752,7 @@
const XalanDOMString& /* namespaceURI */,
const XalanDOMString& /* qualifiedName */)
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1776,8 +1764,7 @@
const XalanDOMString& /* namespaceURI */,
const XalanDOMString& /* qualifiedName */)
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1787,8 +1774,7 @@
XalanElement*
Stylesheet::getElementById(const XalanDOMString& /* elementId */) const
{
- //should not be called
- assert(false);
+ throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR);
return 0;
}
@@ -1798,9 +1784,6 @@
bool
Stylesheet::isIndexed() const
{
- // This member functionshould not be called
- assert(false);
-
return false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org