dbertoni 01/07/17 21:33:17
Modified: c/src/XSLT ElemApplyTemplates.cpp ElemAttribute.cpp
ElemAttributeSet.cpp ElemCallTemplate.cpp
ElemCopyOf.cpp ElemElement.cpp ElemFallback.cpp
ElemForEach.cpp ElemIf.cpp ElemLiteralResult.cpp
ElemMessage.cpp ElemNumber.cpp ElemOtherwise.cpp
ElemPI.cpp ElemSort.cpp ElemTemplate.cpp
ElemTemplateElement.cpp ElemTemplateElement.hpp
ElemText.cpp ElemValueOf.cpp ElemVariable.cpp
ElemWhen.cpp ElemWithParam.cpp ProblemListener.hpp
ProblemListenerDefault.cpp
ProblemListenerDefault.hpp
StylesheetExecutionContext.hpp
StylesheetExecutionContextDefault.cpp
StylesheetExecutionContextDefault.hpp
StylesheetRoot.cpp XSLTEngineImpl.cpp
XSLTProcessorEnvSupport.hpp
XSLTProcessorEnvSupportDefault.cpp
XSLTProcessorEnvSupportDefault.hpp
Log:
Implemented better error handling and fixed a bug where the variables stack
wasn't unwound properly.
Revision Changes Path
1.19 +2 -2 xml-xalan/c/src/XSLT/ElemApplyTemplates.cpp
Index: ElemApplyTemplates.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemApplyTemplates.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ElemApplyTemplates.cpp 2001/07/12 05:05:31 1.18
+++ ElemApplyTemplates.cpp 2001/07/18 04:33:15 1.19
@@ -98,7 +98,7 @@
switch(tok)
{
case Constants::TATTRNAME_SELECT:
- m_selectPattern = constructionContext.createXPath(this,
atts.getValue(i), *this);
+ m_selectPattern =
constructionContext.createXPath(getLocator(), atts.getValue(i), *this);
break;
case Constants::TATTRNAME_MODE:
@@ -120,7 +120,7 @@
if(0 == m_selectPattern)
{
m_selectPattern = constructionContext.createXPath(
- this,
+ getLocator(),
Constants::PSEUDONAME_NODE,
*this);
}
1.29 +3 -3 xml-xalan/c/src/XSLT/ElemAttribute.cpp
Index: ElemAttribute.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemAttribute.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- ElemAttribute.cpp 2001/07/12 05:05:32 1.28
+++ ElemAttribute.cpp 2001/07/18 04:33:15 1.29
@@ -100,12 +100,12 @@
if(equals(aname, Constants::ATTRNAME_NAME))
{
- m_pNameAVT = new AVT(this, aname, atts.getType(i),
atts.getValue(i),
+ m_pNameAVT = new AVT(getLocator(), aname,
atts.getType(i), atts.getValue(i),
*this, constructionContext);
}
else if(equals(aname,Constants::ATTRNAME_NAMESPACE))
{
- m_pNamespaceAVT = new AVT(this, aname, atts.getType(i),
atts.getValue(i),
+ m_pNamespaceAVT = new AVT(getLocator(), aname,
atts.getType(i), atts.getValue(i),
*this, constructionContext);
}
else if(!(isAttrOK(aname, atts, i, constructionContext) ||
@@ -127,7 +127,7 @@
#endif
constructionContext.error(
- "xsl:attribute must have a \"name\" attribute",
+ "xsl:attribute must have a 'name' attribute",
0,
this);
}
1.14 +1 -1 xml-xalan/c/src/XSLT/ElemAttributeSet.cpp
Index: ElemAttributeSet.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemAttributeSet.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ElemAttributeSet.cpp 2001/07/12 05:05:33 1.13
+++ ElemAttributeSet.cpp 2001/07/18 04:33:15 1.14
@@ -108,7 +108,7 @@
if(isEmpty(m_QName.getLocalPart()))
{
constructionContext.error(
- "xsl:attribute-set must have a \"name\" attribute",
+ "xsl:attribute-set must have a 'name' attribute",
0,
this);
}
1.18 +1 -1 xml-xalan/c/src/XSLT/ElemCallTemplate.cpp
Index: ElemCallTemplate.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemCallTemplate.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ElemCallTemplate.cpp 2001/07/12 05:05:34 1.17
+++ ElemCallTemplate.cpp 2001/07/18 04:33:15 1.18
@@ -112,7 +112,7 @@
if (m_templateName.isEmpty() == true)
{
constructionContext.error(
- "xsl:call-template must have a \"name\" attribute",
+ "xsl:call-template must have a 'name' attribute",
0,
this);
}
1.20 +2 -2 xml-xalan/c/src/XSLT/ElemCopyOf.cpp
Index: ElemCopyOf.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemCopyOf.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ElemCopyOf.cpp 2001/07/12 05:05:38 1.19
+++ ElemCopyOf.cpp 2001/07/18 04:33:15 1.20
@@ -108,7 +108,7 @@
m_isDot = true;
}
- m_selectPattern = constructionContext.createXPath(this,
avalue, *this);
+ m_selectPattern =
constructionContext.createXPath(getLocator(), avalue, *this);
}
else if(!isAttrOK(aname, atts, i, constructionContext))
{
@@ -122,7 +122,7 @@
if (m_selectPattern == 0)
{
constructionContext.error(
- "xsl:copy-of must have a \"select\" attribute",
+ "xsl:copy-of must have a 'select' attribute",
0,
this);
}
1.30 +6 -3 xml-xalan/c/src/XSLT/ElemElement.cpp
Index: ElemElement.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemElement.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- ElemElement.cpp 2001/07/12 05:05:40 1.29
+++ ElemElement.cpp 2001/07/18 04:33:15 1.30
@@ -100,12 +100,12 @@
if(equals(aname, Constants::ATTRNAME_NAME))
{
- m_nameAVT = new AVT(this, aname,
atts.getType(i), atts.getValue(i),
+ m_nameAVT = new AVT(getLocator(), aname,
atts.getType(i), atts.getValue(i),
*this, constructionContext);
}
else if(equals(aname, Constants::ATTRNAME_NAMESPACE))
{
- m_namespaceAVT = new AVT(this, aname, atts.getType(i),
atts.getValue(i),
+ m_namespaceAVT = new AVT(getLocator(), aname,
atts.getType(i), atts.getValue(i),
*this, constructionContext);
}
else if(!(processUseAttributeSets(constructionContext, aname,
atts, i) || processSpaceAttr(aname, atts, i) ||
@@ -117,7 +117,10 @@
if(0 == m_nameAVT)
{
-
constructionContext.error(Constants::ELEMNAME_ELEMENT_WITH_PREFIX_STRING + "
must have a name attribute.");
+ constructionContext.error(
+ "xsl:element must have a 'name' attribute.",
+ 0,
+ this);
}
}
1.8 +8 -2 xml-xalan/c/src/XSLT/ElemFallback.cpp
Index: ElemFallback.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemFallback.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ElemFallback.cpp 2001/03/09 16:20:02 1.7
+++ ElemFallback.cpp 2001/07/18 04:33:15 1.8
@@ -103,7 +103,10 @@
default:
if(!isAttrOK(aname, atts, i, constructionContext))
{
-
constructionContext.error(Constants::ELEMNAME_FALLBACK_WITH_PREFIX_STRING + "
has an illegal attribute: " + aname);
+ constructionContext.error(
+ "xsl:fallback has an illegal attribute",
+ 0,
+ this);
}
}
}
@@ -151,6 +154,9 @@
else
{
// Should never happen
- executionContext.error("Error! parent of xsl:fallback must be
an extension element!", executionContext.getCurrentNode(), this);
+ executionContext.error(
+ "Parent of xsl:fallback must be an extension element",
+ executionContext.getCurrentNode(),
+ this);
}
}
1.16 +9 -3 xml-xalan/c/src/XSLT/ElemForEach.cpp
Index: ElemForEach.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemForEach.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ElemForEach.cpp 2001/07/12 05:05:42 1.15
+++ ElemForEach.cpp 2001/07/18 04:33:15 1.16
@@ -103,17 +103,23 @@
if(equals(aname, Constants::ATTRNAME_SELECT))
{
- m_selectPattern = constructionContext.createXPath(this,
atts.getValue(i), *this);
+ m_selectPattern =
constructionContext.createXPath(getLocator(), atts.getValue(i), *this);
}
else if(!(isAttrOK(aname, atts, i, constructionContext) ||
processSpaceAttr(aname, atts, i)))
{
-
constructionContext.error(Constants::ELEMNAME_FOREACH_WITH_PREFIX_STRING + "
has an illegal attribute: " + aname);
+ constructionContext.error(
+ "xsl:for-each has an illegal attribute",
+ 0,
+ this);
}
}
if(0 == m_selectPattern)
{
-
constructionContext.error(Constants::ELEMNAME_FOREACH_WITH_PREFIX_STRING + "
requires attribute: " + Constants::ATTRNAME_SELECT);
+ constructionContext.error(
+ "xsl:for-each must have a 'select' attribute",
+ 0,
+ this);
}
}
1.15 +7 -7 xml-xalan/c/src/XSLT/ElemIf.cpp
Index: ElemIf.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemIf.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- ElemIf.cpp 2001/07/12 05:05:42 1.14
+++ ElemIf.cpp 2001/07/18 04:33:15 1.15
@@ -105,7 +105,7 @@
switch(tok)
{
case Constants::TATTRNAME_TEST:
- m_test = constructionContext.createXPath(this,
atts.getValue(i), *this);
+ m_test = constructionContext.createXPath(getLocator(),
atts.getValue(i), *this);
break;
case Constants::TATTRNAME_XMLSPACE:
@@ -116,7 +116,7 @@
if(!isAttrOK(aname, atts, i, constructionContext))
{
constructionContext.error(
- XalanDOMString("xsl:if has an illegal
attribute"),
+ "xsl:if has an illegal attribute",
0,
this);
}
@@ -126,9 +126,9 @@
if(0 == m_test)
{
constructionContext.error(
- Constants::ELEMNAME_IF_WITH_PREFIX_STRING + " must have
a 'test' attribute.",
- 0,
- this);
+ "xsl:if must have a 'test' attribute",
+ 0,
+ this);
}
}
@@ -159,9 +159,9 @@
executionContext.fireSelectEvent(
SelectionEvent(executionContext,
sourceNode,
- *this,
+ *this,
StaticStringToDOMString(XALAN_STATIC_UCODE_STRING("test")),
- *m_test,
+ *m_test,
test));
}
1.41 +1 -1 xml-xalan/c/src/XSLT/ElemLiteralResult.cpp
Index: ElemLiteralResult.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemLiteralResult.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- ElemLiteralResult.cpp 2001/07/12 05:05:43 1.40
+++ ElemLiteralResult.cpp 2001/07/18 04:33:15 1.41
@@ -157,7 +157,7 @@
if(! processUseAttributeSets(constructionContext,
aname, atts, i) &&
isAttrOK(aname, atts, i,
constructionContext))
{
- m_avts.push_back(new AVT(this, aname,
atts.getType(i), atts.getValue(i),
+ m_avts.push_back(new AVT(getLocator(), aname,
atts.getType(i), atts.getValue(i),
*this,
constructionContext));
}
}
1.12 +8 -3 xml-xalan/c/src/XSLT/ElemMessage.cpp
Index: ElemMessage.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemMessage.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ElemMessage.cpp 2001/06/06 21:55:25 1.11
+++ ElemMessage.cpp 2001/07/18 04:33:15 1.12
@@ -101,13 +101,18 @@
}
else if (equals(avalue, Constants::ATTRVAL_NO) == false)
{
- constructionContext.error("Attribute terminate
has an illegal value: " +
-
XalanDOMString(avalue));
+ constructionContext.error(
+ "The attribute 'terminate' has an
illegal value",
+ 0,
+ this);
}
}
else if(isAttrOK(aname, atts, i, constructionContext) == false
|| processSpaceAttr(aname, atts, i))
{
-
constructionContext.error(Constants::ELEMNAME_MESSAGE_WITH_PREFIX_STRING + "
has an illegal attribute: " + XalanDOMString(aname));
+ constructionContext.error(
+ "xsl:message has an illegal attribute",
+ 0,
+ this);
}
}
}
1.46 +24 -12 xml-xalan/c/src/XSLT/ElemNumber.cpp
Index: ElemNumber.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemNumber.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- ElemNumber.cpp 2001/07/12 05:05:44 1.45
+++ ElemNumber.cpp 2001/07/18 04:33:15 1.46
@@ -139,48 +139,54 @@
else if(equals(levelValue,Constants::ATTRVAL_SINGLE))
m_level = Constants::NUMBERLEVEL_SINGLE;
else
- error("Bad value on level attribute." +
XalanDOMString(levelValue));
+ constructionContext.error(
+ "The attribute 'level' has an illegal
value",
+ 0,
+ this);
}
else if(equals(aname, Constants::ATTRNAME_COUNT))
{
- m_countMatchPattern =
constructionContext.createMatchPattern(this, atts.getValue(i), *this);
+ m_countMatchPattern =
constructionContext.createMatchPattern(getLocator(), atts.getValue(i), *this);
}
else if(equals(aname, Constants::ATTRNAME_FROM))
{
- m_fromMatchPattern =
constructionContext.createMatchPattern(this, atts.getValue(i), *this);
+ m_fromMatchPattern =
constructionContext.createMatchPattern(getLocator(), atts.getValue(i), *this);
}
else if(equals(aname, Constants::ATTRNAME_VALUE))
{
- m_valueExpr = constructionContext.createXPath(this,
atts.getValue(i), *this);
+ m_valueExpr =
constructionContext.createXPath(getLocator(), atts.getValue(i), *this);
}
else if(equals(aname, Constants::ATTRNAME_FORMAT))
{
- m_format_avt = new AVT(this, aname, atts.getType(i),
+ m_format_avt = new AVT(getLocator(), aname,
atts.getType(i),
atts.getValue(i), *this,
constructionContext);
}
else if(equals(aname, Constants::ATTRNAME_LANG))
{
- m_lang_avt = new AVT(this, aname, atts.getType(i),
+ m_lang_avt = new AVT(getLocator(), aname,
atts.getType(i),
atts.getValue(i), *this,
constructionContext);
}
else if(equals(aname, Constants::ATTRNAME_LETTERVALUE))
{
- m_lettervalue_avt = new AVT(this, aname,
atts.getType(i),
+ m_lettervalue_avt = new AVT(getLocator(), aname,
atts.getType(i),
atts.getValue(i), *this,
constructionContext);
}
else if(equals(aname,Constants::ATTRNAME_GROUPINGSEPARATOR))
{
- m_groupingSeparator_avt = new AVT(this, aname,
atts.getType(i),
+ m_groupingSeparator_avt = new AVT(getLocator(), aname,
atts.getType(i),
atts.getValue(i), *this,
constructionContext);
}
else if(equals(aname,Constants::ATTRNAME_GROUPINGSIZE))
{
- m_groupingSize_avt = new AVT(this, aname,
atts.getType(i),
+ m_groupingSize_avt = new AVT(getLocator(), aname,
atts.getType(i),
atts.getValue(i), *this,
constructionContext);
}
else if(!isAttrOK(aname, atts, i, constructionContext))
{
-
constructionContext.error(Constants::ELEMNAME_NUMBER_WITH_PREFIX_STRING + " has
an illegal attribute: " + aname);
+ constructionContext.error(
+ "xsl:number has an illegal attribute",
+ 0,
+ this);
}
}
}
@@ -693,7 +699,10 @@
}
if(0 == countMatchPattern)
- error(TranscodeFromLocalCodePage("Programmer error!
countMatchPattern should never be 0!"));
+ executionContext.error(
+ "Programmer error! countMatchPattern should
never be 0!",
+ 0,
+ this);
if(countMatchPattern->getMatchScore(node, *this,
executionContext) !=
XPath::eMatchScoreNone)
@@ -1251,7 +1260,10 @@
case 0x05D0:
case 0x10D0:
case 0x0430:
- executionContext.error(LongToDOMString(numberType) + "
format not supported yet!");
+ executionContext.error(
+ "Numbering format not supported yet",
+ 0,
+ this);
break;
// Handle the special case of Greek letters for now
1.6 +4 -1 xml-xalan/c/src/XSLT/ElemOtherwise.cpp
Index: ElemOtherwise.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemOtherwise.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ElemOtherwise.cpp 2001/02/12 02:34:53 1.5
+++ ElemOtherwise.cpp 2001/07/18 04:33:15 1.6
@@ -91,7 +91,10 @@
if(isAttrOK(aname, atts, i, constructionContext) == false ||
processSpaceAttr(aname, atts, i))
{
-
constructionContext.error(Constants::ELEMNAME_OTHERWISE_WITH_PREFIX_STRING + "
has an illegal attribute: " + aname);
+ constructionContext.error(
+ "xsl:otherwise has an illegal attribute",
+ 0,
+ this);
}
}
}
1.17 +11 -7 xml-xalan/c/src/XSLT/ElemPI.cpp
Index: ElemPI.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemPI.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ElemPI.cpp 2001/07/12 05:05:46 1.16
+++ ElemPI.cpp 2001/07/18 04:33:15 1.17
@@ -93,18 +93,24 @@
if(equals(aname, Constants::ATTRNAME_NAME))
{
- m_nameAVT = new AVT(this, aname, atts.getType(i),
atts.getValue(i),
+ m_nameAVT = new AVT(getLocator(), aname,
atts.getType(i), atts.getValue(i),
*this, constructionContext);
}
else if(isAttrOK(aname, atts, i, constructionContext) == false
|| processSpaceAttr(aname, atts, i))
{
-
constructionContext.error(Constants::ELEMNAME_PI_WITH_PREFIX_STRING + " has an
illegal attribute: " + aname);
+ constructionContext.error(
+ "xsl:processing-instruction has an illegal
attribute",
+ 0,
+ this);
}
}
if(0 == m_nameAVT)
{
-
constructionContext.error(Constants::ELEMNAME_PI_WITH_PREFIX_STRING + " must
have a name attribute.");
+ constructionContext.error(
+ "xsl:processing-instruction must have a 'name'
attribute",
+ 0,
+ this);
}
}
@@ -141,14 +147,12 @@
if(equalsIgnoreCase(piName, Constants::ATTRVAL_OUTPUT_METHOD_XML))
{
- error("processing-instruction name can not be 'xml'");
+ executionContext.error("processing-instruction name can not be
'xml'", 0, this);
}
else if(!isValidNCName(piName))
{
- error("processing-instruction name must be a valid NCName: " +
piName);
+ executionContext.error("processing-instruction name must be a
valid NCName", 0, this);
}
-
- StylesheetExecutionContext::GetAndReleaseCachedString
theResult(executionContext);
childrenToResultPI(
executionContext,
1.10 +9 -9 xml-xalan/c/src/XSLT/ElemSort.cpp
Index: ElemSort.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemSort.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ElemSort.cpp 2001/07/12 05:05:47 1.9
+++ ElemSort.cpp 2001/07/18 04:33:15 1.10
@@ -97,28 +97,28 @@
if(equals(aname, Constants::ATTRNAME_SELECT))
{
m_selectPattern
- = constructionContext.createXPath(this,
atts.getValue(i), *this);
+ = constructionContext.createXPath(getLocator(),
atts.getValue(i), *this);
}
else if(equals(aname, Constants::ATTRNAME_LANG))
{
- m_langAVT = new AVT(this, aname, atts.getType(i),
atts.getValue(i),
+ m_langAVT = new AVT(getLocator(), aname,
atts.getType(i), atts.getValue(i),
*this, constructionContext);
}
else if(equals(aname, Constants::ATTRNAME_DATATYPE))
{
- m_dataTypeAVT = new AVT(this, aname, atts.getType(i),
atts.getValue(i),
+ m_dataTypeAVT = new AVT(getLocator(), aname,
atts.getType(i), atts.getValue(i),
*this, constructionContext);
}
else if(equals(aname, Constants::ATTRNAME_ORDER))
{
- m_orderAVT = new AVT(this, aname, atts.getType(i),
atts.getValue(i),
+ m_orderAVT = new AVT(getLocator(), aname,
atts.getType(i), atts.getValue(i),
*this, constructionContext);
}
else if(equals(aname, Constants::ATTRNAME_CASEORDER))
{
- constructionContext.warn("Xalan C++ does not yet handle
the " + Constants::ATTRNAME_CASEORDER + " attribute!");
+ constructionContext.warn("Xalan C++ does not yet handle
the 'case-order' attribute!");
- m_caseOrderAVT = new AVT(this, aname, atts.getType(i),
atts.getValue(i),
+ m_caseOrderAVT = new AVT(getLocator(), aname,
atts.getType(i), atts.getValue(i),
*this, constructionContext);
}
else if(!isAttrOK(aname, atts, i, constructionContext))
@@ -129,19 +129,19 @@
if(0 == m_dataTypeAVT)
{
- m_dataTypeAVT = new AVT(this,
c_wstr(Constants::ATTRNAME_DATATYPE), c_wstr(Constants::ATTRTYPE_CDATA),
c_wstr(Constants::ATTRVAL_DATATYPE_TEXT),
+ m_dataTypeAVT = new AVT(getLocator(),
c_wstr(Constants::ATTRNAME_DATATYPE), c_wstr(Constants::ATTRTYPE_CDATA),
c_wstr(Constants::ATTRVAL_DATATYPE_TEXT),
*this, constructionContext);
}
if(0 == m_orderAVT)
{
- m_orderAVT = new AVT(this, c_wstr(Constants::ATTRNAME_ORDER),
c_wstr(Constants::ATTRTYPE_CDATA), c_wstr(Constants::ATTRVAL_ORDER_ASCENDING),
+ m_orderAVT = new AVT(getLocator(),
c_wstr(Constants::ATTRNAME_ORDER), c_wstr(Constants::ATTRTYPE_CDATA),
c_wstr(Constants::ATTRVAL_ORDER_ASCENDING),
*this, constructionContext);
}
if(0 == m_selectPattern)
{
- m_selectPattern = constructionContext.createXPath(this,
StaticStringToDOMString(XALAN_STATIC_UCODE_STRING(".")), *this);
+ m_selectPattern = constructionContext.createXPath(getLocator(),
StaticStringToDOMString(XALAN_STATIC_UCODE_STRING(".")), *this);
}
}
1.17 +1 -1 xml-xalan/c/src/XSLT/ElemTemplate.cpp
Index: ElemTemplate.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemTemplate.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ElemTemplate.cpp 2001/07/12 05:05:48 1.16
+++ ElemTemplate.cpp 2001/07/18 04:33:15 1.17
@@ -105,7 +105,7 @@
switch(tok)
{
case Constants::TATTRNAME_MATCH:
- m_matchPattern =
constructionContext.createMatchPattern(this, atts.getValue(i), *this);
+ m_matchPattern =
constructionContext.createMatchPattern(getLocator(), atts.getValue(i), *this);
break;
case Constants::TATTRNAME_NAME:
1.63 +42 -11 xml-xalan/c/src/XSLT/ElemTemplateElement.cpp
Index: ElemTemplateElement.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemTemplateElement.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- ElemTemplateElement.cpp 2001/07/12 05:05:49 1.62
+++ ElemTemplateElement.cpp 2001/07/18 04:33:15 1.63
@@ -121,7 +121,6 @@
int
xslToken) :
XalanElement(),
PrefixResolver(),
- Locator(),
m_finishedConstruction(false),
m_namespacesHandler(stylesheetTree.getNamespacesHandler(),
stylesheetTree.getNamespaces(),
@@ -137,7 +136,8 @@
m_firstChild(0),
m_surrogateChildren(*this),
m_baseIndentifier(stylesheetTree.getCurrentIncludeBaseIdentifier()),
- m_optimizationFlags(eCanGenerateAttributes)
+ m_optimizationFlags(eCanGenerateAttributes),
+ m_locatorProxy(*this)
{
}
@@ -155,6 +155,14 @@
+const Locator*
+ElemTemplateElement::getLocator() const
+{
+ return &m_locatorProxy;
+}
+
+
+
bool
ElemTemplateElement::isWhitespace() const
{
@@ -206,7 +214,7 @@
}
else
{
- error(TranscodeFromLocalCodePage("xml:space has an illegal
value: ") + spaceVal);
+ error("xml:space has an illegal value");
}
}
@@ -234,7 +242,7 @@
}
else
{
- error(TranscodeFromLocalCodePage("xml:space has an
illegal value: ") + spaceVal);
+ error("xml:space has an illegal value");
}
}
@@ -1502,24 +1510,37 @@
+ElemTemplateElement::LocatorProxy::LocatorProxy(const ElemTemplateElement&
theElement) :
+ m_element(theElement)
+{
+}
+
+
+
+ElemTemplateElement::LocatorProxy::~LocatorProxy()
+{
+}
+
+
+
int
-ElemTemplateElement::getLineNumber() const
+ElemTemplateElement::LocatorProxy::getLineNumber() const
{
- return m_lineNumber;
+ return m_element.getLineNumber();
}
int
-ElemTemplateElement::getColumnNumber() const
+ElemTemplateElement::LocatorProxy::getColumnNumber() const
{
- return m_columnNumber;
+ return m_element.getColumnNumber();
}
const XMLCh*
-ElemTemplateElement::getPublicId() const
+ElemTemplateElement::LocatorProxy::getPublicId() const
{
return 0;
}
@@ -1527,9 +1548,19 @@
const XMLCh*
-ElemTemplateElement::getSystemId() const
+ElemTemplateElement::LocatorProxy::getSystemId() const
{
- return c_wstr(m_baseIndentifier);
+ const XalanDOMString& theURI =
+ m_element.getURI();
+
+ if (length(theURI) == 0)
+ {
+ return 0;
+ }
+ else
+ {
+ return c_wstr(theURI);
+ }
}
1.34 +61 -16 xml-xalan/c/src/XSLT/ElemTemplateElement.hpp
Index: ElemTemplateElement.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemTemplateElement.hpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- ElemTemplateElement.hpp 2001/07/12 05:05:51 1.33
+++ ElemTemplateElement.hpp 2001/07/18 04:33:15 1.34
@@ -102,7 +102,7 @@
-class XALAN_XSLT_EXPORT ElemTemplateElement : public XalanElement, public
PrefixResolver, public Locator
+class XALAN_XSLT_EXPORT ElemTemplateElement : public XalanElement, public
PrefixResolver
{
public:
@@ -127,6 +127,14 @@
~ElemTemplateElement();
/**
+ * Get the Locator for the node. This may return 0.
+ *
+ * @return The Locator for the node.
+ */
+ virtual const Locator*
+ getLocator() const;
+
+ /**
* See if this is a xmlns attribute, and, if so, process it.
*
* @param attrName qualified name of attribute
@@ -290,6 +298,30 @@
}
/**
+ * Get the line number in the stylesheet where the element appears.
+ * Returns -1 if the information is not available.
+ *
+ * @return the line number in the stylesheet
+ */
+ int
+ getLineNumber() const
+ {
+ return m_lineNumber;
+ }
+
+ /**
+ * Get the column number in the stylesheet where the element appears.
+ * Returns -1 if the information is not available.
+ *
+ * @return the column number in the stylesheet
+ */
+ int
+ getColumnNumber() const
+ {
+ return m_columnNumber;
+ }
+
+ /**
* Tell if the element will generate text which is XML whitespace.
*
* @return true if the text is pure whitespace
@@ -645,21 +677,6 @@
getURI() const;
- // These interfaces are inherited from Locator...
-
- virtual const XMLCh*
- getPublicId() const;
-
- virtual const XMLCh*
- getSystemId() const;
-
- virtual int
- getLineNumber() const;
-
- virtual int
- getColumnNumber() const;
-
-
// These optimization interfaces are new to ElemTemplateElement...
bool
hasParams() const
@@ -812,6 +829,32 @@
private:
+ class LocatorProxy : public Locator
+ {
+ public:
+
+ LocatorProxy(const ElemTemplateElement& theElement);
+
+ virtual
+ ~LocatorProxy();
+
+ virtual const XMLCh*
+ getPublicId() const;
+
+ virtual const XMLCh*
+ getSystemId() const;
+
+ virtual int
+ getLineNumber() const;
+
+ virtual int
+ getColumnNumber() const;
+
+ private:
+
+ const ElemTemplateElement& m_element;
+ };
+
/**
* Take the contents of a template element, process it, and
* convert it to a string.
@@ -855,6 +898,8 @@
eCanGenerateAttributes = 16 };
unsigned m_optimizationFlags;
+
+ LocatorProxy m_locatorProxy;
static const XalanEmptyNamedNodeMap s_fakeAttributes;
};
1.6 +4 -1 xml-xalan/c/src/XSLT/ElemText.cpp
Index: ElemText.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemText.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ElemText.cpp 2001/02/12 02:34:53 1.5
+++ ElemText.cpp 2001/07/18 04:33:15 1.6
@@ -104,7 +104,10 @@
}
else if(!isAttrOK(aname, atts, i, constructionContext))
{
-
constructionContext.error(Constants::ELEMNAME_TEXT_WITH_PREFIX_STRING + " has
an illegal attribute: " + aname);
+ constructionContext.error(
+ "xsl:text has an illegal attribute",
+ 0,
+ this);
}
}
}
1.25 +1 -1 xml-xalan/c/src/XSLT/ElemValueOf.cpp
Index: ElemValueOf.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemValueOf.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- ElemValueOf.cpp 2001/07/12 05:05:53 1.24
+++ ElemValueOf.cpp 2001/07/18 04:33:15 1.25
@@ -122,7 +122,7 @@
m_selectPattern =
constructionContext.createXPath(
- this,
+ getLocator(),
avalue,
*this);
}
1.19 +1 -1 xml-xalan/c/src/XSLT/ElemVariable.cpp
Index: ElemVariable.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemVariable.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ElemVariable.cpp 2001/07/12 05:05:54 1.18
+++ ElemVariable.cpp 2001/07/18 04:33:15 1.19
@@ -108,7 +108,7 @@
switch(tok)
{
case Constants::TATTRNAME_SELECT:
- m_selectPattern = constructionContext.createXPath(this,
atts.getValue(i),
+ m_selectPattern =
constructionContext.createXPath(getLocator(), atts.getValue(i),
*this);
break;
1.8 +9 -3 xml-xalan/c/src/XSLT/ElemWhen.cpp
Index: ElemWhen.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemWhen.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ElemWhen.cpp 2001/07/12 05:05:55 1.7
+++ ElemWhen.cpp 2001/07/18 04:33:15 1.8
@@ -96,7 +96,7 @@
switch(tok)
{
case Constants::TATTRNAME_TEST:
- m_pTest = constructionContext.createXPath(this,
atts.getValue(i), *this);
+ m_pTest = constructionContext.createXPath(getLocator(),
atts.getValue(i), *this);
break;
case Constants::TATTRNAME_XMLSPACE:
@@ -106,14 +106,20 @@
default:
if(!isAttrOK(aname, atts, i, constructionContext))
{
-
constructionContext.error(Constants::ELEMNAME_WHEN_WITH_PREFIX_STRING + " has
an illegal attribute: " + aname);
+ constructionContext.error(
+ "xsl:when has an illegal attribute",
+ 0,
+ this);
}
}
}
if(0 == m_pTest)
{
- constructionContext.error("xsl:when must have a 'test'
attribute.");
+ constructionContext.error(
+ "xsl:when must have a 'test' attribute.",
+ 0,
+ this);
}
}
1.9 +1 -1 xml-xalan/c/src/XSLT/ElemWithParam.cpp
Index: ElemWithParam.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemWithParam.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ElemWithParam.cpp 2001/07/12 05:05:56 1.8
+++ ElemWithParam.cpp 2001/07/18 04:33:15 1.9
@@ -94,7 +94,7 @@
if(equals(aname, Constants::ATTRNAME_SELECT))
{
- m_selectPattern = constructionContext.createXPath(this,
atts.getValue(i), *this);
+ m_selectPattern =
constructionContext.createXPath(getLocator(), atts.getValue(i), *this);
}
else if(equals(aname, Constants::ATTRNAME_NAME))
{
1.5 +20 -20 xml-xalan/c/src/XSLT/ProblemListener.hpp
Index: ProblemListener.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ProblemListener.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ProblemListener.hpp 2000/04/11 15:09:28 1.4
+++ ProblemListener.hpp 2001/07/18 04:33:15 1.5
@@ -55,7 +55,7 @@
* <http://www.apache.org/>.
*/
/*
- * $Id: ProblemListener.hpp,v 1.4 2000/04/11 15:09:28 dbertoni Exp $
+ * $Id: ProblemListener.hpp,v 1.5 2001/07/18 04:33:15 dbertoni Exp $
*/
#if !defined(XALAN_PROBLEMLISTENER_HEADER_GUARD)
#define XALAN_PROBLEMLISTENER_HEADER_GUARD
@@ -63,15 +63,16 @@
// Base include file. Must be first.
-#include "XSLTDefinitions.hpp"
+#include <XSLT/XSLTDefinitions.hpp>
-// $$$ ToDo: This is necessary while XalanDOMString is still a typedef.
#include <XalanDOM/XalanDOMString.hpp>
+
+class ElemTemplateElement;
class XalanNode;
class PrintWriter;
@@ -88,14 +89,14 @@
public:
/// Sources of problem
- enum eProblemSource { eXMLPARSER = 1,
- eXSLPROCESSOR = 2,
- eQUERYENGINE = 3 };
+ enum eProblemSource { eXMLPARSER = 1,
+ eXSLPROCESSOR = 2,
+ eXPATH
= 3 };
/// Severity of problem
- enum eClassification { eMESSAGE = 0,
- eWARNING = 1,
- eERROR = 2 };
+ enum eClassification { eMESSAGE = 0,
+ eWARNING = 1,
+ eERROR = 2 };
ProblemListener();
@@ -115,26 +116,25 @@
*
* @param where either in XMLPARSER, XSLPROCESSOR, or
QUERYENGINE
* @param classification either MESSAGE, ERROR or WARNING
- * @param styleNode style tree node where the problem occurred
- * (may be null)
* @param sourceNode source tree node where the problem occurred
- * (may be null)
+ * (may be 0)
+ * @param styleNode style tree node where the problem occurred
+ * (may be 0)
* @param msg string message explaining the problem.
+ * @param uri the URI of the document where the problem
occurred. May be 0.
* @param lineNo line number where the problem occurred,
- * if it is known, else zero
+ * if it is known, else -1
* @param charOffset character offset where the problem,
- * occurred if it is known, else zero
- * @return true if the return is an ERROR, in which case exception
will be
- * thrown. Otherwise the processor will continue to process.
+ * occurred if it is known, else -1
*/
- virtual bool
+ virtual void
problem(
eProblemSource where,
- eClassification classification,
- const XalanNode* styleNode,
+ eClassification classification,
const XalanNode* sourceNode,
+ const XalanNode* styleNode,
const XalanDOMString& msg,
- const XalanDOMChar* id,
+ const XalanDOMChar* uri,
int lineNo,
int
charOffset) = 0;
1.5 +17 -8 xml-xalan/c/src/XSLT/ProblemListenerDefault.cpp
Index: ProblemListenerDefault.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ProblemListenerDefault.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ProblemListenerDefault.cpp 2000/04/11 15:09:28 1.4
+++ ProblemListenerDefault.cpp 2001/07/18 04:33:15 1.5
@@ -75,15 +75,20 @@
+#include <XSLT/ElemTemplateElement.hpp>
+
+
+
static const char* const errorHeader = "Error: ";
static const char* const warningHeader = "Warning: ";
static const char* const xslHeader = "XSL ";
static const char* const xmlHeader = "XML ";
-static const char* const queryHeader = "PATTERN ";
+static const char* const xpathHeader = "XPATH ";
static const char* const styleTreeNodeHeader = ", style tree node: ";
static const char* const sourceTreeNodeHeader = ", source tree node: ";
+static const char* const uriHeader = ", document ";
static const char* const lineNoHeader = ", line ";
static const char* const charOffsetHeader = ", offset ";
@@ -112,14 +117,14 @@
-bool
+void
ProblemListenerDefault::problem(
eProblemSource where,
eClassification classification,
- const XalanNode* styleNode,
const XalanNode* sourceNode,
+ const XalanNode* styleNode,
const XalanDOMString& msg,
- const XalanDOMChar* /* id */,
+ const XalanDOMChar* uri,
int lineNo,
int
charOffset)
{
@@ -129,9 +134,9 @@
{
m_pw->print(xmlHeader);
}
- else if (eQUERYENGINE == where)
+ else if (eXPATH == where)
{
- m_pw->print(queryHeader);
+ m_pw->print(xpathHeader);
}
else
{
@@ -161,6 +166,12 @@
m_pw->print(sourceNode->getNodeName());
}
+ if (0 != uri)
+ {
+ m_pw->print(uriHeader);
+ m_pw->print(uri);
+ }
+
if (0 != lineNo)
{
m_pw->print(lineNoHeader);
@@ -175,6 +186,4 @@
m_pw->println();
}
-
- return classification == eERROR ? true : false;
}
1.4 +4 -4 xml-xalan/c/src/XSLT/ProblemListenerDefault.hpp
Index: ProblemListenerDefault.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ProblemListenerDefault.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ProblemListenerDefault.hpp 2000/04/11 15:09:28 1.3
+++ ProblemListenerDefault.hpp 2001/07/18 04:33:15 1.4
@@ -71,7 +71,7 @@
// Xalan header files.
-#include "ProblemListener.hpp"
+#include <XSLT/ProblemListener.hpp>
@@ -92,14 +92,14 @@
virtual void
setPrintWriter(PrintWriter* pw);
- virtual bool
+ virtual void
problem(
eProblemSource where,
eClassification classification,
- const XalanNode* styleNode,
const XalanNode* sourceNode,
+ const XalanNode* styleNode,
const XalanDOMString& msg,
- const XalanDOMChar* id,
+ const XalanDOMChar* uri,
int lineNo,
int
charOffset);
1.60 +56 -0 xml-xalan/c/src/XSLT/StylesheetExecutionContext.hpp
Index: StylesheetExecutionContext.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContext.hpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- StylesheetExecutionContext.hpp 2001/07/08 18:48:40 1.59
+++ StylesheetExecutionContext.hpp 2001/07/18 04:33:15 1.60
@@ -672,6 +672,26 @@
virtual void
clearTopLevelParams() = 0;
+ class ResolveAndClearTopLevelParams
+ {
+ public:
+
+ ResolveAndClearTopLevelParams(StylesheetExecutionContext&
executionContext) :
+ m_executionContext(executionContext)
+ {
+ m_executionContext.resolveTopLevelParams();
+ }
+
+ ~ResolveAndClearTopLevelParams()
+ {
+ m_executionContext.clearTopLevelParams();
+ }
+
+ private:
+
+ StylesheetExecutionContext& m_executionContext;
+ };
+
/**
* Given a template, search for the arguments and push them on the
stack.
* Also, push default arguments on the stack.
@@ -1689,11 +1709,23 @@
virtual void
error(
+ const XalanDOMString& msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const = 0;
+
+ virtual void
+ error(
const char* msg,
const XalanNode* sourceNode = 0,
const XalanNode* styleNode = 0) const = 0;
virtual void
+ error(
+ const char* msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const = 0;
+
+ virtual void
warn(
const XalanDOMString& msg,
const XalanNode* sourceNode = 0,
@@ -1701,11 +1733,23 @@
virtual void
warn(
+ const XalanDOMString& msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const = 0;
+
+ virtual void
+ warn(
const char* msg,
const XalanNode* sourceNode = 0,
const XalanNode* styleNode = 0) const = 0;
virtual void
+ warn(
+ const char* msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const = 0;
+
+ virtual void
message(
const XalanDOMString& msg,
const XalanNode* sourceNode = 0,
@@ -1713,9 +1757,21 @@
virtual void
message(
+ const XalanDOMString& msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const = 0;
+
+ virtual void
+ message(
const char* msg,
const XalanNode* sourceNode = 0,
const XalanNode* styleNode = 0) const = 0;
+
+ virtual void
+ message(
+ const char* msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const = 0;
};
1.70 +72 -3
xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.cpp
Index: StylesheetExecutionContextDefault.cpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.cpp,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- StylesheetExecutionContextDefault.cpp 2001/07/12 04:44:16 1.69
+++ StylesheetExecutionContextDefault.cpp 2001/07/18 04:33:15 1.70
@@ -1814,9 +1814,6 @@
StylesheetExecutionContextDefault::createPrintWriter(std::ostream&
theStream)
#endif
{
- // $$$ ToDo: We need to either remove these explicit dependencies on the
- // Xerces classes, or make the Xerces classes more generic. (I prefer
the
- // latter...)
XalanOutputStream* const theOutputStream =
new XalanStdOutputStream(theStream);
@@ -1921,6 +1918,19 @@
void
StylesheetExecutionContextDefault::error(
+ const XalanDOMString& msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const
+{
+ assert(m_xsltProcessor != 0);
+
+ m_xsltProcessor->error(msg, sourceNode);
+}
+
+
+
+void
+StylesheetExecutionContextDefault::error(
const char* msg,
const XalanNode* sourceNode,
const XalanNode* styleNode) const
@@ -1931,6 +1941,17 @@
void
+StylesheetExecutionContextDefault::error(
+ const char* msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const
+{
+ error(TranscodeFromLocalCodePage(msg), sourceNode, locator);
+}
+
+
+
+void
StylesheetExecutionContextDefault::warn(
const XalanDOMString& msg,
const XalanNode* sourceNode,
@@ -1945,6 +1966,19 @@
void
StylesheetExecutionContextDefault::warn(
+ const XalanDOMString& msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const
+{
+ assert(m_xsltProcessor != 0);
+
+ m_xsltProcessor->warn(msg, sourceNode);
+}
+
+
+
+void
+StylesheetExecutionContextDefault::warn(
const char* msg,
const XalanNode* sourceNode,
const XalanNode* styleNode) const
@@ -1955,6 +1989,17 @@
void
+StylesheetExecutionContextDefault::warn(
+ const char* msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const
+{
+ warn(TranscodeFromLocalCodePage(msg), sourceNode, locator);
+}
+
+
+
+void
StylesheetExecutionContextDefault::message(
const XalanDOMString& msg,
const XalanNode* sourceNode,
@@ -1969,11 +2014,35 @@
void
StylesheetExecutionContextDefault::message(
+ const XalanDOMString& msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const
+{
+ assert(m_xsltProcessor != 0);
+
+ m_xsltProcessor->message(msg, sourceNode);
+}
+
+
+
+void
+StylesheetExecutionContextDefault::message(
const char* msg,
const XalanNode* sourceNode,
const XalanNode* styleNode) const
{
message(TranscodeFromLocalCodePage(msg), sourceNode, styleNode);
+}
+
+
+
+void
+StylesheetExecutionContextDefault::message(
+ const char* msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const
+{
+ message(TranscodeFromLocalCodePage(msg), sourceNode, locator);
}
1.63 +37 -1
xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.hpp
Index: StylesheetExecutionContextDefault.hpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.hpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- StylesheetExecutionContextDefault.hpp 2001/06/25 20:17:21 1.62
+++ StylesheetExecutionContextDefault.hpp 2001/07/18 04:33:15 1.63
@@ -62,7 +62,7 @@
// Base class include file.
-#include "StylesheetExecutionContext.hpp"
+#include <XSLT/StylesheetExecutionContext.hpp>
@@ -878,11 +878,23 @@
virtual void
error(
+ const XalanDOMString& msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const;
+
+ virtual void
+ error(
const char* msg,
const XalanNode* sourceNode = 0,
const XalanNode* styleNode = 0) const;
virtual void
+ error(
+ const char* msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const;
+
+ virtual void
warn(
const XalanDOMString& msg,
const XalanNode* sourceNode = 0,
@@ -890,11 +902,23 @@
virtual void
warn(
+ const XalanDOMString& msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const;
+
+ virtual void
+ warn(
const char* msg,
const XalanNode* sourceNode = 0,
const XalanNode* styleNode = 0) const;
virtual void
+ warn(
+ const char* msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const;
+
+ virtual void
message(
const XalanDOMString& msg,
const XalanNode* sourceNode = 0,
@@ -902,9 +926,21 @@
virtual void
message(
+ const XalanDOMString& msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const;
+
+ virtual void
+ message(
const char* msg,
const XalanNode* sourceNode = 0,
const XalanNode* styleNode = 0) const;
+
+ virtual void
+ message(
+ const char* msg,
+ const XalanNode* sourceNode,
+ const Locator* locator) const;
class XPathCacheReturnFunctor
1.50 +2 -4 xml-xalan/c/src/XSLT/StylesheetRoot.cpp
Index: StylesheetRoot.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetRoot.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- StylesheetRoot.cpp 2001/07/12 04:44:16 1.49
+++ StylesheetRoot.cpp 2001/07/18 04:33:15 1.50
@@ -230,6 +230,7 @@
typedef StylesheetExecutionContext::PushAndPopContextMarker
PushAndPopContextMarker;
typedef StylesheetExecutionContext::PushAndPopElementFrame
PushAndPopElementFrame;
+ typedef StylesheetExecutionContext::ResolveAndClearTopLevelParams
ResolveAndClearTopLevelParams;
PushAndPopContextMarker
thePushAndPopContextMarker(executionContext);
@@ -237,7 +238,7 @@
executionContext,
0);
- executionContext.resolveTopLevelParams();
+ ResolveAndClearTopLevelParams
theResolveAndClearTopLevelParams(executionContext);
#if defined(XALAN_VQ_SPECIAL_TRACE)
QuantifyStartRecordingData();
@@ -263,9 +264,6 @@
#if defined(XALAN_VQ_SPECIAL_TRACE)
QuantifyStopRecordingData();
#endif
-
- // Reset the top-level params for the next round.
- executionContext.clearTopLevelParams();
if(executionContext.doDiagnosticsOutput())
{
1.108 +8 -3 xml-xalan/c/src/XSLT/XSLTEngineImpl.cpp
Index: XSLTEngineImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTEngineImpl.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- XSLTEngineImpl.cpp 2001/07/12 05:06:03 1.107
+++ XSLTEngineImpl.cpp 2001/07/18 04:33:15 1.108
@@ -1238,8 +1238,8 @@
m_problemListener->problem(
ProblemListener::eXSLPROCESSOR,
classification,
- styleNode,
sourceNode,
+ styleNode,
msg,
id,
lineNumber,
@@ -1261,14 +1261,19 @@
const XalanNode*
sourceNode,
const ElemTemplateElement*
styleNode) const
{
- const Locator* const locator = getLocatorFromStack();
-
const XalanDOMChar* id = 0;
XalanDOMString uri;
int lineNumber = -1;
int columnNumber = -1;
+
+ const Locator* locator = getLocatorFromStack();
+
+ if (locator == 0)
+ {
+ locator = styleNode->getLocator();
+ }
if (locator != 0)
{
1.11 +2 -0 xml-xalan/c/src/XSLT/XSLTProcessorEnvSupport.hpp
Index: XSLTProcessorEnvSupport.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTProcessorEnvSupport.hpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- XSLTProcessorEnvSupport.hpp 2001/06/14 19:28:29 1.10
+++ XSLTProcessorEnvSupport.hpp 2001/07/18 04:33:15 1.11
@@ -131,6 +131,7 @@
const XalanNode* styleNode,
const XalanNode* sourceNode,
const XalanDOMString& msg,
+ const XalanDOMChar* uri,
int lineNo,
int
charOffset) const = 0;
@@ -141,6 +142,7 @@
const PrefixResolver* resolver,
const XalanNode* sourceNode,
const XalanDOMString& msg,
+ const XalanDOMChar* uri,
int lineNo,
int
charOffset) const = 0;
1.23 +2 -0 xml-xalan/c/src/XSLT/XSLTProcessorEnvSupportDefault.cpp
Index: XSLTProcessorEnvSupportDefault.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTProcessorEnvSupportDefault.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- XSLTProcessorEnvSupportDefault.cpp 2001/06/14 19:28:30 1.22
+++ XSLTProcessorEnvSupportDefault.cpp 2001/07/18 04:33:15 1.23
@@ -296,6 +296,7 @@
const XalanNode* styleNode,
const XalanNode* sourceNode,
const XalanDOMString& msg,
+ const XalanDOMChar* /* uri */,
int /*
lineNo */,
int /*
charOffset */) const
{
@@ -337,6 +338,7 @@
const PrefixResolver* /* resolver */,
const XalanNode* sourceNode,
const XalanDOMString& msg,
+ const XalanDOMChar* /* uri */,
int /*
lineNo */,
int /*
charOffset */) const
{
1.18 +2 -0 xml-xalan/c/src/XSLT/XSLTProcessorEnvSupportDefault.hpp
Index: XSLTProcessorEnvSupportDefault.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTProcessorEnvSupportDefault.hpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- XSLTProcessorEnvSupportDefault.hpp 2001/06/14 19:28:31 1.17
+++ XSLTProcessorEnvSupportDefault.hpp 2001/07/18 04:33:15 1.18
@@ -196,6 +196,7 @@
const XalanNode* styleNode,
const XalanNode* sourceNode,
const XalanDOMString& msg,
+ const XalanDOMChar* uri,
int lineNo,
int
charOffset) const;
@@ -206,6 +207,7 @@
const PrefixResolver* resolver,
const XalanNode* sourceNode,
const XalanDOMString& msg,
+ const XalanDOMChar* uri,
int lineNo,
int
charOffset) const;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]