**** Merged from MCS ****
[mono-project.git] / mcs / class / System.XML / System.Xml.Query / XsltCommand.cs
blob019be4baa72563854ee1e8430d13997b573e2f38
1 //
2 // System.Xml.Query.XsltCommand
3 //
4 // Author:
5 // Tim Coleman (tim@timcoleman.com)
6 // Atsushi Enomoto (atsushi@ximian.com)
7 //
8 // Copyright (C) Tim Coleman, 2003
9 // Copyright (C) Atsushi Enomoto, 2004
13 // Permission is hereby granted, free of charge, to any person obtaining
14 // a copy of this software and associated documentation files (the
15 // "Software"), to deal in the Software without restriction, including
16 // without limitation the rights to use, copy, modify, merge, publish,
17 // distribute, sublicense, and/or sell copies of the Software, and to
18 // permit persons to whom the Software is furnished to do so, subject to
19 // the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be
22 // included in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 #if NET_2_0
35 using System.IO;
36 using System.Security.Policy;
37 using System.Text;
38 using System.Xml;
39 using System.Xml.XPath;
41 namespace System.Xml.Query
43 public sealed class XsltCommand
45 [MonoTODO]
46 public XsltCommand ()
50 [MonoTODO]
51 public event QueryEventHandler OnMessageEvent;
53 // Compile
55 [MonoTODO]
56 public void Compile (string stylesheetUri)
58 Compile (stylesheetUri, new XmlUrlResolver (), null);
61 [MonoTODO]
62 public void Compile (string stylesheetUri, XmlResolver resolver)
64 Compile (stylesheetUri, resolver, null);
67 [MonoTODO]
68 public void Compile (string stylesheetUri, XmlResolver resolver, Evidence evidence)
70 using (XmlReader reader = XmlReader.Create (stylesheetUri)) {
71 Compile (reader, resolver, evidence);
75 [MonoTODO]
76 public void Compile (XmlReader reader)
78 Compile (reader, new XmlUrlResolver ());
81 [MonoTODO]
82 public void Compile (XmlReader reader, XmlResolver resolver)
84 Compile (reader, resolver, null);
87 [MonoTODO]
88 public void Compile (XmlReader reader, XmlResolver resolver, Evidence evidence)
90 throw new NotImplementedException ();
93 // Execute
95 [MonoTODO]
96 public void Execute (string contextDocumentUri, XmlWriter results)
98 Execute (contextDocumentUri, new XmlUrlResolver (), null, results);
101 [MonoTODO ("Null args allowed?")]
102 public void Execute (
103 IXPathNavigable contextDocument,
104 XmlWriter results)
106 Execute (contextDocument, new XmlUrlResolver (), null, results);
109 [MonoTODO]
110 public void Execute (string contextDocumentUri, string resultDocumentUri)
112 XmlWriter xw = XmlWriter.Create (resultDocumentUri);
113 try {
114 Execute (new XPathDocument (contextDocumentUri), xw);
115 } finally {
116 xw.Close ();
120 [MonoTODO]
121 public void Execute (
122 IXPathNavigable contextDocument,
123 XmlResolver resolver,
124 XmlArgumentList argList,
125 Stream results)
127 Execute (contextDocument, resolver, argList, results);
130 [MonoTODO]
131 public void Execute (
132 IXPathNavigable contextDocument,
133 XmlResolver dataSources,
134 XmlArgumentList argList,
135 TextWriter results)
137 Execute (contextDocument, dataSources, argList, results);
140 [MonoTODO]
141 public void Execute (
142 IXPathNavigable contextDocument,
143 XmlResolver dataSources,
144 XmlArgumentList argList,
145 XmlWriter results)
147 throw new NotImplementedException ();
150 [MonoTODO]
151 public void Execute (
152 string contextDocumentUri,
153 XmlResolver dataSources,
154 XmlArgumentList argList,
155 Stream results)
157 XmlWriter w = XmlWriter.Create (results);
158 Execute (contextDocumentUri, dataSources, argList, w);
161 [MonoTODO]
162 public void Execute (
163 string contextDocumentUri,
164 XmlResolver dataSources,
165 XmlArgumentList argList,
166 TextWriter results)
168 XmlWriter w = XmlWriter.Create (results);
169 Execute (contextDocumentUri, dataSources, argList, w);
172 [MonoTODO]
173 public void Execute (
174 string contextDocumentUri,
175 XmlResolver dataSources,
176 XmlArgumentList argList,
177 XmlWriter results)
179 throw new NotImplementedException ();
184 #endif // NET_2_0