From 042e95f3dcfa48622fd59e17829c2ad9be74394b Mon Sep 17 00:00:00 2001 From: Atsushi Eno Date: Wed, 21 Dec 2005 05:31:47 +0000 Subject: 2005-12-21 Atsushi Enomoto * XslTemplate.cs : don't check name and mode attributes on non-'xsl:template' element. This should fix bug #77051. svn path=/trunk/mcs/; revision=54674 --- mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog | 5 +++++ mcs/class/System.XML/Mono.Xml.Xsl/XslTemplate.cs | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'mcs/class/System.XML') diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog b/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog index 638b625ed3d..c3814fa3b25 100644 --- a/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog +++ b/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog @@ -1,3 +1,8 @@ +2005-12-21 Atsushi Enomoto + + * XslTemplate.cs : don't check name and mode attributes on + non-'xsl:template' element. This should fix bug #77051. + 2005-12-13 Andrew Skiba * XslDecimalFormat.jvm.cs: set correct defaults for NaN and Infinity diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/XslTemplate.cs b/mcs/class/System.XML/Mono.Xml.Xsl/XslTemplate.cs index f01f35921e7..19865c2ba24 100644 --- a/mcs/class/System.XML/Mono.Xml.Xsl/XslTemplate.cs +++ b/mcs/class/System.XML/Mono.Xml.Xsl/XslTemplate.cs @@ -257,7 +257,9 @@ namespace Mono.Xml.Xsl { c.PushScope (); - if (c.Input.MoveToAttribute ("mode", String.Empty)) { + if (c.Input.Name == "template" && + c.Input.NamespaceURI == Compiler.XsltNamespace && + c.Input.MoveToAttribute ("mode", String.Empty)) { c.Input.MoveToParent (); if (!c.Input.MoveToAttribute ("match", String.Empty)) throw new XsltCompileException ("XSLT 'template' element must not have 'mode' attribute when it does not have 'match' attribute.", null, c.Input); -- cgit v1.2.3