Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@gmail.com>2005-03-03 11:19:31 +0300
committerAtsushi Eno <atsushieno@gmail.com>2005-03-03 11:19:31 +0300
commitc8c7c5a3237bce82ef38278b9c9265ef21757a61 (patch)
tree1802dd8751321a8e4694fbadebad4f73015bebe5 /mcs/class/System.XML/Mono.Xml.Xsl.Operations
parentbee0840a2dad2afc0afc3b6ccee94abbcf132d4b (diff)
2005-03-03 Atsushi Enomoto <atsushi@ximian.com>
* XslElement.cs : reject incorrectly qualified name attribute. svn path=/trunk/mcs/; revision=41385
Diffstat (limited to 'mcs/class/System.XML/Mono.Xml.Xsl.Operations')
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog4
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslElement.cs11
2 files changed, 12 insertions, 3 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
index ad458e97018..12a6aeb9a26 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
+++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
@@ -1,3 +1,7 @@
+2005-03-03 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XslElement.cs : reject incorrectly qualified name attribute.
+
2005-03-02 Atsushi Enomoto <atsushi@ximian.com>
* XslElement.cs : name should be splitted regardless of "namespace"
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslElement.cs b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslElement.cs
index 3aaf97ccc5e..87121e958a3 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslElement.cs
+++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslElement.cs
@@ -61,9 +61,8 @@ namespace Mono.Xml.Xsl.Operations {
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 @@ namespace Mono.Xml.Xsl.Operations {
} 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);