Author: andrews
Date: 2005-11-07 04:59:42 -0500 (Mon, 07 Nov 2005)
New Revision: 52644
Modified:
trunk/mcs/class/System.XML/System.Xml.Xsl/ChangeLog
trunk/mcs/class/System.XML/System.Xml.Xsl/XslTransform.cs
Log:
* XslTransform.cs: throw meaningful exception when Transform is
called before Load
Modified: trunk/mcs/class/System.XML/System.Xml.Xsl/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/System.Xml.Xsl/ChangeLog 2005-11-07 09:28:43 UTC
(rev 52643)
+++ trunk/mcs/class/System.XML/System.Xml.Xsl/ChangeLog 2005-11-07 09:59:42 UTC
(rev 52644)
@@ -1,3 +1,8 @@
+2005-11-07 Andrew Skiba <[EMAIL PROTECTED]>
+
+ * XslTransform.cs: throw meaningful exception when Transform is
+ called before Load
+
2005-10-08 Gert Driesen <[EMAIL PROTECTED]>
* XsltSettings.cs: Marked sealed.
Modified: trunk/mcs/class/System.XML/System.Xml.Xsl/XslTransform.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml.Xsl/XslTransform.cs 2005-11-07
09:28:43 UTC (rev 52643)
+++ trunk/mcs/class/System.XML/System.Xml.Xsl/XslTransform.cs 2005-11-07
09:59:42 UTC (rev 52644)
@@ -192,6 +192,9 @@
void Transform (XPathNavigator input, XsltArgumentList args,
TextWriter output, XmlResolver resolver)
#endif
{
+ if (s == null)
+ throw new XsltException ("No stylesheet was
loaded.", null);
+
Outputter outputter = new GenericOutputter(output,
s.Outputs, output.Encoding);
new XslTransformProcessor (s).Process (input,
outputter, args, resolver);
outputter.Done ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches