XsltCommand.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. //
  2. // System.Xml.Query.XsltCommand
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. // Atsushi Enomoto ([email protected])
  7. //
  8. // Copyright (C) Tim Coleman, 2003
  9. // Copyright (C) Atsushi Enomoto, 2004
  10. //
  11. //
  12. // Permission is hereby granted, free of charge, to any person obtaining
  13. // a copy of this software and associated documentation files (the
  14. // "Software"), to deal in the Software without restriction, including
  15. // without limitation the rights to use, copy, modify, merge, publish,
  16. // distribute, sublicense, and/or sell copies of the Software, and to
  17. // permit persons to whom the Software is furnished to do so, subject to
  18. // the following conditions:
  19. //
  20. // The above copyright notice and this permission notice shall be
  21. // included in all copies or substantial portions of the Software.
  22. //
  23. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  24. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  25. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  26. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  27. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  28. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  29. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  30. //
  31. #if NET_2_0
  32. using System.IO;
  33. using System.Text;
  34. using System.Xml;
  35. using System.Xml.XPath;
  36. namespace System.Xml.Query
  37. {
  38. public class XsltCommand
  39. {
  40. [MonoTODO]
  41. public XsltCommand ()
  42. {
  43. }
  44. public event QueryEventHandler OnProcessingEvent;
  45. // Compile
  46. [MonoTODO]
  47. public void Compile (string stylesheetUri, XmlResolver resolver)
  48. {
  49. throw new NotImplementedException ();
  50. }
  51. [MonoTODO]
  52. public void Compile (string stylesheetUri)
  53. {
  54. throw new NotImplementedException ();
  55. }
  56. // Execute
  57. [MonoTODO ("Null args allowed?")]
  58. public void Execute (
  59. IXPathNavigable contextDocument,
  60. XmlWriter results)
  61. {
  62. Execute (contextDocument, null, null, results);
  63. }
  64. public void Execute (string contextDocumentUri, string resultDocumentUri)
  65. {
  66. XmlTextWriter xw = new XmlTextWriter (resultDocumentUri, null);
  67. try {
  68. Execute (new XPathDocument (contextDocumentUri), xw);
  69. } finally {
  70. xw.Close ();
  71. }
  72. }
  73. [MonoTODO]
  74. public void Execute (
  75. IXPathNavigable contextDocument,
  76. XmlArgumentList argList,
  77. XmlWriter results)
  78. {
  79. Execute (contextDocument, null, argList, results);
  80. }
  81. [MonoTODO]
  82. public void Execute (
  83. XmlResolver dataSources,
  84. XmlArgumentList argList,
  85. XmlWriter results)
  86. {
  87. Execute (dataSources, argList, results);
  88. }
  89. [MonoTODO]
  90. public void Execute (
  91. IXPathNavigable contextDocument,
  92. XmlResolver dataSources,
  93. XmlArgumentList argList,
  94. XmlWriter results)
  95. {
  96. throw new NotImplementedException ();
  97. }
  98. public void Execute (
  99. string contextDocumentUri,
  100. XmlResolver dataSources,
  101. XmlArgumentList argList,
  102. Stream results)
  103. {
  104. XmlTextWriter w = new XmlTextWriter (results, null);
  105. Execute (contextDocumentUri, dataSources, argList, w);
  106. }
  107. public void Execute (
  108. string contextDocumentUri,
  109. XmlResolver dataSources,
  110. XmlArgumentList argList,
  111. TextWriter results)
  112. {
  113. XmlTextWriter w = new XmlTextWriter (results);
  114. Execute (contextDocumentUri, dataSources, argList, w);
  115. }
  116. [MonoTODO]
  117. public void Execute (
  118. string contextDocumentUri,
  119. XmlResolver dataSources,
  120. XmlArgumentList argList,
  121. XmlWriter results)
  122. {
  123. throw new NotImplementedException ();
  124. }
  125. }
  126. }
  127. #endif // NET_2_0