Author: atsushi
Date: 2005-03-03 03:19:31 -0500 (Thu, 03 Mar 2005)
New Revision: 41385
Modified:
trunk/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
trunk/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslElement.cs
Log:
2005-03-03 Atsushi Enomoto <[EMAIL PROTECTED]>
* XslElement.cs : reject incorrectly qualified name attribute.
Modified: trunk/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
2005-03-03 07:27:07 UTC (rev 41384)
+++ trunk/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
2005-03-03 08:19:31 UTC (rev 41385)
@@ -1,3 +1,7 @@
+2005-03-03 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * XslElement.cs : reject incorrectly qualified name attribute.
+
2005-03-02 Atsushi Enomoto <[EMAIL PROTECTED]>
* XslElement.cs : name should be splitted regardless of "namespace"
Modified: trunk/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslElement.cs
===================================================================
--- trunk/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslElement.cs
2005-03-03 07:27:07 UTC (rev 41384)
+++ trunk/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslElement.cs
2005-03-03 08:19:31 UTC (rev 41385)
@@ -61,9 +61,8 @@
if (colonAt == 0)
throw new XsltCompileException
("Invalid name attribute.", null, c.Input);
calcPrefix = colonAt < 0 ? String.Empty :
calcName.Substring (0, colonAt);
- calcName = colonAt < 0 ? calcName :
calcName.Substring (colonAt + 1, calcName.Length - colonAt - 1);
- if (ns == null)
- calcNs = c.Input.GetNamespace
(calcPrefix);
+ if (colonAt > 0)
+ calcName = calcName.Substring (colonAt
+ 1);
try {
XmlConvert.VerifyNCName (calcName);
@@ -72,6 +71,12 @@
} catch (XmlException ex) {
throw new XsltCompileException
("Invalid name attribute.", ex, c.Input);
}
+
+ if (ns == null) {
+ calcNs = c.Input.GetNamespace
(calcPrefix);
+ if (calcPrefix != String.Empty &&
calcNs == String.Empty)
+ throw new XsltCompileException
("Invalid name attribute.", null, c.Input);
+ }
} else if (ns != null)
calcNs = XslAvt.AttemptPreCalc (ref ns);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches