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/08/06 02:07:14 UTC
cvs commit: xml-xalan/c/src/XSLT FunctionDocument.cpp
dbertoni 2002/08/05 17:07:14
Modified: c/src/XSLT FunctionDocument.cpp
Log:
Only accept a node-set() as the second argument.
Revision Changes Path
1.31 +10 -7 xml-xalan/c/src/XSLT/FunctionDocument.cpp
Index: FunctionDocument.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionDocument.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- FunctionDocument.cpp 14 May 2002 15:46:50 -0000 1.30
+++ FunctionDocument.cpp 6 Aug 2002 00:07:13 -0000 1.31
@@ -260,7 +260,7 @@
if (context == 0)
{
executionContext.error(
- "The document() function requires a non-null context node!",
+ "The document() function requires a non-null context node",
context,
locator);
@@ -268,13 +268,20 @@
}
else
{
- if(XObject::eTypeNodeSet == arg2->getType())
+ if(XObject::eTypeNodeSet != arg2->getType())
+ {
+ executionContext.error(
+ "The second argument to the document() function must be a node-set",
+ context,
+ locator);
+ }
+ else
{
const NodeRefListBase& nodeset = arg2->nodeset();
if (nodeset.getLength() == 0)
{
- executionContext.warn("Ignoring the empty node-set provided as the second argument to the function document().",
+ executionContext.warn("Ignoring the empty node-set provided as the second argument to the function document()",
context);
assert(executionContext.getPrefixResolver() != 0);
@@ -296,10 +303,6 @@
base = executionContext.findURIFromDoc(baseDoc);
}
- }
- else
- {
- base = arg2->str();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org