dbertoni 2002/12/19 09:34:12
Modified: c/src/XSLT StylesheetHandler.cpp
Log:
Check for non-whitespace text nodes at the top level.
Revision Changes Path
1.100 +13 -1 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.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- StylesheetHandler.cpp 9 Dec 2002 16:47:42 -0000 1.99
+++ StylesheetHandler.cpp 19 Dec 2002 17:34:11 -0000 1.100
@@ -1327,7 +1327,19 @@
const XMLCh* const chars,
const unsigned int length)
{
- accumulateText(chars, length);
+ if (m_inTemplate == false &&
+ inExtensionElement() == false &&
+ isXMLWhitespace(chars, 0, length) == false)
+ {
+ error(
+ "Character data is not allowed at this position in the
stylesheet",
+ m_constructionContext.getLocatorFromStack());
+
+ }
+ else
+ {
+ accumulateText(chars, length);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]