2 // System.Xml.Query.XsltCommand
5 // Tim Coleman (tim@timcoleman.com)
6 // Atsushi Enomoto (atsushi@ximian.com)
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:
21 // The above copyright notice and this permission notice shall be
22 // included in all copies or substantial portions of the Software.
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.
36 using System
.Security
.Policy
;
39 using System
.Xml
.XPath
;
41 namespace System
.Xml
.Query
43 public sealed class XsltCommand
51 public event QueryEventHandler OnMessageEvent
;
56 public void Compile (string stylesheetUri
)
58 Compile (stylesheetUri
, new XmlUrlResolver (), null);
62 public void Compile (string stylesheetUri
, XmlResolver resolver
)
64 Compile (stylesheetUri
, resolver
, null);
68 public void Compile (string stylesheetUri
, XmlResolver resolver
, Evidence evidence
)
70 using (XmlReader reader
= XmlReader
.Create (stylesheetUri
)) {
71 Compile (reader
, resolver
, evidence
);
76 public void Compile (XmlReader reader
)
78 Compile (reader
, new XmlUrlResolver ());
82 public void Compile (XmlReader reader
, XmlResolver resolver
)
84 Compile (reader
, resolver
, null);
88 public void Compile (XmlReader reader
, XmlResolver resolver
, Evidence evidence
)
90 throw new NotImplementedException ();
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
,
106 Execute (contextDocument
, new XmlUrlResolver (), null, results
);
110 public void Execute (string contextDocumentUri
, string resultDocumentUri
)
112 XmlWriter xw
= XmlWriter
.Create (resultDocumentUri
);
114 Execute (new XPathDocument (contextDocumentUri
), xw
);
121 public void Execute (
122 IXPathNavigable contextDocument
,
123 XmlResolver resolver
,
124 XmlArgumentList argList
,
127 Execute (contextDocument
, resolver
, argList
, results
);
131 public void Execute (
132 IXPathNavigable contextDocument
,
133 XmlResolver dataSources
,
134 XmlArgumentList argList
,
137 Execute (contextDocument
, dataSources
, argList
, results
);
141 public void Execute (
142 IXPathNavigable contextDocument
,
143 XmlResolver dataSources
,
144 XmlArgumentList argList
,
147 throw new NotImplementedException ();
151 public void Execute (
152 string contextDocumentUri
,
153 XmlResolver dataSources
,
154 XmlArgumentList argList
,
157 XmlWriter w
= XmlWriter
.Create (results
);
158 Execute (contextDocumentUri
, dataSources
, argList
, w
);
162 public void Execute (
163 string contextDocumentUri
,
164 XmlResolver dataSources
,
165 XmlArgumentList argList
,
168 XmlWriter w
= XmlWriter
.Create (results
);
169 Execute (contextDocumentUri
, dataSources
, argList
, w
);
173 public void Execute (
174 string contextDocumentUri
,
175 XmlResolver dataSources
,
176 XmlArgumentList argList
,
179 throw new NotImplementedException ();