dbertoni 2003/06/18 11:09:10
Modified: c/src/XSLT StylesheetHandler.cpp
Log:
Fixed bug with not reporting duplicate parameters. Bugzilla 20876.
Revision Changes Path
1.105 +14 -3 xml-xalan/c/src/XSLT/StylesheetHandler.cpp
Index: StylesheetHandler.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetHandler.cpp,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- StylesheetHandler.cpp 21 Mar 2003 19:10:17 -0000 1.104
+++ StylesheetHandler.cpp 18 Jun 2003 18:09:10 -0000 1.105
@@ -336,7 +336,6 @@
case
StylesheetConstructionContext::ELEMNAME_NUMBER:
case
StylesheetConstructionContext::ELEMNAME_VALUE_OF:
case
StylesheetConstructionContext::ELEMNAME_WITH_PARAM:
- case
StylesheetConstructionContext::ELEMNAME_PARAM:
case StylesheetConstructionContext::ELEMNAME_PI:
elem =
m_constructionContext.createElement(
xslToken,
@@ -346,6 +345,18 @@
assert(elem != 0);
break;
+ case
StylesheetConstructionContext::ELEMNAME_PARAM:
+ elem =
m_constructionContext.createElement(
+
xslToken,
+
m_stylesheet,
+
atts,
+
locator);
+
+
checkForOrAddVariableName(elem->getNameAttribute(), locator);
+
+ assert(elem != 0);
+ break;
+
case
StylesheetConstructionContext::ELEMNAME_SORT:
{
if (m_elemStack.empty() == true)
@@ -921,7 +932,7 @@
if (m_globalVariableNames.find(theVariableName) !=
m_globalVariableNames.end())
{
- error("A global variable with this name has already
been declared", theLocator);
+ error("A global variable or param with this name has
already been declared", theLocator);
}
else
{
@@ -941,7 +952,7 @@
if (theLocalScope.find(theVariableName) !=
theLocalScope.end())
{
- error("A variable with this name has already
been declared in this template", theLocator);
+ error("A variable or param with this name has
already been declared in this template", theLocator);
}
++theCurrent;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]