+2004-04-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * Compiler.cs : When BaseURI is an empty string, it should not try to
+ create Uri instance. This will fix bug #56832, but not sure.
+ * XslFunctions.cs : for XsltDocument.Resolve(), did the same.
+ * HtmlEmitter.cs : Environment.NewLine was incorrectly used (it
+ should be the TextReader's NewLine).
+ * MSXslScriptManager.cs : Should raise an error when the prefix which
+ was specified by "implements-prefix" was not found.
+
2004-03-27 Atsushi Enomoto <atsushi@ximian.com>
* ScriptCompilerInfo.cs : #line directive now holds dummy filename
public void PushInputDocument (string url)
{
// todo: detect recursion
- Uri absUri = res.ResolveUri (new Uri (Input.BaseURI), url);
+ Uri baseUriObj = (Input.BaseURI == String.Empty) ? null : new Uri (Input.BaseURI);
+ Uri absUri = res.ResolveUri (baseUriObj, url);
using (Stream s = (Stream)res.GetEntity (absUri, null, typeof(Stream)))
{
case "TD":
case "TH":
case "TR":
- writer.Write (Environment.NewLine);
+ writer.Write (writer.NewLine);
int count = elementNameStack.Count;
for (int i = 0; i < count; i++)
writer.Write (" ");
{
MSXslScript s = new MSXslScript (c.Input, c.Evidence, scripts.Count);
this.evidence = c.Evidence;
- scripts.Add (c.Input.GetNamespace (s.ImplementsPrefix), s.Compile ());
+ string ns = c.Input.GetNamespace (s.ImplementsPrefix);
+ if (ns == null)
+ throw new XsltCompileException ("Specified prefix for msxsl:script was not found: " + s.ImplementsPrefix, null, c.Input);
+ scripts.Add (ns, s.Compile ());
}
enum ScriptingLanguage {
XmlResolver r = p.Resolver;
Uri uriBase = null;
- if (! object.ReferenceEquals (baseUri, VoidBaseUriFlag))
+ if (! object.ReferenceEquals (baseUri, VoidBaseUriFlag) && baseUri != String.Empty)
uriBase = r.ResolveUri (null, baseUri);
return r.ResolveUri (uriBase, thisUri);