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 2002/05/08 22:55:26 UTC
cvs commit: xml-xalan/c/src/XSLT ElemEmpty.cpp ElemEmpty.hpp
dbertoni 02/05/08 13:55:26
Modified: c/src/XSLT ElemEmpty.cpp ElemEmpty.hpp
Log:
Added option for specific name. Added override of childTypeAllowed() for error checking.
Revision Changes Path
1.9 +13 -3 xml-xalan/c/src/XSLT/ElemEmpty.cpp
Index: ElemEmpty.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemEmpty.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ElemEmpty.cpp 9 Mar 2001 16:20:03 -0000 1.8
+++ ElemEmpty.cpp 8 May 2002 20:55:26 -0000 1.9
@@ -69,12 +69,14 @@
StylesheetConstructionContext& constructionContext,
Stylesheet& stylesheetTree,
int lineNumber,
- int columnNumber) :
+ int columnNumber,
+ const XalanDOMString* elementName) :
ElemTemplateElement(constructionContext,
stylesheetTree,
lineNumber,
columnNumber,
- Constants::ELEMNAME_UNDEFINED)
+ Constants::ELEMNAME_UNDEFINED),
+ m_elementName(elementName)
{
}
@@ -89,7 +91,7 @@
const XalanDOMString&
ElemEmpty::getElementName() const
{
- return s_emptyString;
+ return m_elementName != 0 ? *m_elementName : s_emptyString;
}
@@ -100,4 +102,12 @@
assert(false); // really shouldn't be executing empty nodes
ElemTemplateElement::execute(executionContext);
+}
+
+
+
+bool
+ElemEmpty::childTypeAllowed(int /* xslToken */) const
+{
+ return false;
}
1.10 +12 -1 xml-xalan/c/src/XSLT/ElemEmpty.hpp
Index: ElemEmpty.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemEmpty.hpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ElemEmpty.hpp 9 Mar 2001 16:20:03 -0000 1.9
+++ ElemEmpty.hpp 8 May 2002 20:55:26 -0000 1.10
@@ -84,12 +84,14 @@
* @param atts list of attributes for element
* @param lineNumber line number in document
* @param columnNumber column number in document
+ * @param elementName The element name for which this instance is representing
*/
ElemEmpty(
StylesheetConstructionContext& constructionContext,
Stylesheet& stylesheetTree,
int lineNumber,
- int columnNumber);
+ int columnNumber,
+ const XalanDOMString* elementName = 0);
virtual
~ElemEmpty();
@@ -101,6 +103,15 @@
virtual void
execute(StylesheetExecutionContext& executionContext) const;
+
+protected:
+
+ virtual bool
+ childTypeAllowed(int xslToken) const;
+
+private:
+
+ const XalanDOMString* const m_elementName;
};
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org