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/03/28 05:55:39 UTC
cvs commit: xml-xalan/c/src/XSLT StylesheetHandler.cpp
dbertoni 02/03/27 20:55:39
Modified: c/src/XSLT StylesheetHandler.cpp
Log:
Disallow top-level elements with a null namespace URI.
Revision Changes Path
1.76 +15 -4 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.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- StylesheetHandler.cpp 23 Feb 2002 04:23:16 -0000 1.75
+++ StylesheetHandler.cpp 28 Mar 2002 04:55:39 -0000 1.76
@@ -374,8 +374,7 @@
if(length(ns) == 0 && nameLength != length(localName))
{
- // Warn that there is a prefix that was not resolved...
- m_constructionContext.warn("Could not resolve prefix " + XalanDOMString(name));
+ error("Could not resolve prefix.", locator);
}
ElemTemplateElement* elem = 0;
@@ -690,9 +689,21 @@
}
else
{
- if(!m_inTemplate && !m_foundStylesheet)
+ if(!m_inTemplate)
{
- elem = initWrapperless(name, atts, lineNumber, columnNumber);
+ // If it's a top level
+ if (!m_foundStylesheet)
+ {
+ elem = initWrapperless(name, atts, lineNumber, columnNumber);
+ }
+ else if (length(ns) == 0 && m_elemStack.size() == 1)
+ {
+ error("Illegal top level element", locator);
+ }
+ else
+ {
+ m_inExtensionElementStack.back() = true;
+ }
}
else
{
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org