You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(174) |
Nov
(85) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(56) |
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(1) |
Jul
(132) |
Aug
(5) |
Sep
|
Oct
(314) |
Nov
(133) |
Dec
(18) |
2006 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Oleg T. <he...@us...> - 2004-11-01 17:42:20
|
Update of /cvsroot/mvp-xml/WebSite/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10025/common Modified Files: index.html Log Message: Fixed links. Index: index.html =================================================================== RCS file: /cvsroot/mvp-xml/WebSite/common/index.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- index.html 1 Nov 2004 17:21:36 -0000 1.2 +++ index.html 1 Nov 2004 17:42:03 -0000 1.3 @@ -55,8 +55,8 @@ IXmlSerializable</a> interface. Of course you can also use just to query for the XML string representation from an arbitrary navigator ;).</li> <li> <a target="_blank" - href="http://www.tkachenko.com/blog/archives/000117.html">XmlNodeNavigator</a> -: the <a target="_blank" + href="http://www.tkachenko.com/blog/archives/000117.html">XmlNodeNavigator</a>: +the <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmlnodeclasstopic.asp"> XmlNode</a> implementation of the <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxpathixpathnavigableclasscreatenavigatortopic.asp"> @@ -123,7 +123,7 @@ as the peer review among this highly focused group of XML lovers.</p> <hr style="width: 100%; height: 2px;"> <p> The project is hosted at <a target="_blank" - href="http://prdownloads.sourceforge.net/mvp-xml/Mvp.Xml.zip?download"> + href="http://www.sourceforge.net"> SourceForge</a>. Find more at the <a href="http://sourceforge.net/projects/mvp-xml">Mvp.Xml project page at SourceForge</a>.<br> |
From: Oleg T. <he...@us...> - 2004-11-01 17:21:48
|
Update of /cvsroot/mvp-xml/WebSite/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5178/common Modified Files: index.html Log Message: Added $Id$ Index: index.html =================================================================== RCS file: /cvsroot/mvp-xml/WebSite/common/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- index.html 1 Nov 2004 17:19:17 -0000 1.1 +++ index.html 1 Nov 2004 17:21:36 -0000 1.2 @@ -129,7 +129,9 @@ SourceForge</a>.<br> <a href="http://sourceforge.net/" title="Link to SourceForge home page"><img src="http://sourceforge.net/sflogo.php?group_id=102352&type=1" - alt="SourceForge logo" border="0"></a> </p> + alt="SourceForge logo" border="0"></a><br> +<code>$Id$</code><br> +</p> <p> </p> </body> </html> |
From: Oleg T. <he...@us...> - 2004-11-01 17:20:14
|
Update of /cvsroot/mvp-xml/WebSite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4471 Modified Files: index.html style.css Added Files: license.html Log Message: Extended version... --- NEW FILE: license.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Mvp.Xml project's License</title> </head> <body> Common Public License Version 1.0<br> <br> THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.<br> <br> 1. DEFINITIONS<br> <br> "Contribution" means:<br> <br> a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and<br> <br> b) in the case of each subsequent Contributor:<br> <br> i) changes to the Program, and<br> <br> ii) additions to the Program;<br> <br> where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.<br> <br> "Contributor" means any person or entity that distributes the Program.<br> <br> "Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.<br> <br> "Program" means the Contributions distributed in accordance with this Agreement.<br> <br> "Recipient" means anyone who receives the Program under this Agreement, including all Contributors.<br> <br> 2. GRANT OF RIGHTS<br> <br> a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.<br> <br> b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.<br> <br> c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.<br> <br> d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.<br> <br> 3. REQUIREMENTS<br> <br> A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:<br> <br> a) it complies with the terms and conditions of this Agreement; and<br> <br> b) its license agreement:<br> <br> i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;<br> <br> ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;<br> <br> iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and<br> <br> iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. <br> <br> When the Program is made available in source code form:<br> <br> a) it must be made available under this Agreement; and<br> <br> b) a copy of this Agreement must be included with each copy of the Program. <br> <br> Contributors may not remove or alter any copyright notices contained within the Program.<br> <br> Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.<br> <br> 4. COMMERCIAL DISTRIBUTION<br> <br> Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.<br> <br> For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.<br> <br> 5. NO WARRANTY<br> <br> EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.<br> <br> 6. DISCLAIMER OF LIABILITY<br> <br> EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.<br> <br> 7. GENERAL<br> <br> If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.<br> <br> If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.<br> <br> All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.<br> <br> Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.<br> <br> This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.<br> <br> </body> </html> Index: index.html =================================================================== RCS file: /cvsroot/mvp-xml/WebSite/index.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- index.html 14 Jul 2004 11:44:09 -0000 1.4 +++ index.html 1 Nov 2004 17:19:17 -0000 1.5 @@ -1,108 +1,92 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>Mvp.Xml project home</title> - <link href="style.css" type="text/css" rel="stylesheet"> - </head> - <body> - <h1>Mvp.Xml Project</h1> - <p> - This project is developed by <a target="_blank" href="http://www.microsoft.com/communities/mvp/mvp.mspx"> - Microsoft MVPs</a> in <a target="_blank" href="http://www.microsoft.com/communities/MVP/MVPList.mspx?Params=%7eCMTYDataSvcParams%5e%7earg+Name%3d%22Product%22+Value%3d%22Visual%20Developer%20-%20XML%22%2f%5e%7esParams%5e%7e%2fsParams%5e%7e%2fCMTYDataSvcParams%5e&Title=Visual%20Developer%20-%20XML"> - XML technologies</a> and <a target="_blank" href="http://www.microsoft.com/communities/MVP/MVPList.mspx?Params=%7eCMTYDataSvcParams%5e%7earg+Name%3d%22Product%22+Value%3d%22Visual Developer - XML Web Services%22%2f%5e%7esParams%5e%7e%2fsParams%5e%7e%2fCMTYDataSvcParams%5e&Title=Visual Developer - XML Web Services"> - XML Web Services</a> worldwide. It is aimed at supplementing .NET framework - functionality available through the <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxml.asp"> - System.Xml</a> namespace and related namespaces such as <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwebservices.asp"> - System.Web.Services</a>. It is documented extensively through <a target="_blank" href="http://www.google.com/search?q=%22what+is+a+weblog%22"> - weblog</a> posts. - </p> - <p> - The following is a list of features, a short explanation and a link to its - corresponding full explanation post:</p> - <ul> - <li> - <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2003/10/07/30888.aspx"> - DynamicContext</a>: allows precompilation of XPath expression involving - dynamic values for a performance increase of 1.5 x - 4 x. - <li> - <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/04/02/106667.aspx"> - XPathCache</a>: based on the previous class, exposes a cache of precompiled - XPath expressions that can be executed with a single line of code. Replacing - existing dynamic queryies with this involves minimal effort and yields even - greater performance than the previous one alone for scenarios involving queries - with sort expressions. - <li> - <a target="_blank" href="http://www.tkachenko.com/blog/archives/000194.html">IndexingXPathNavigator</a>: - allows the use of the XSLT key function to create indexes for fast querying. - Very handy for query intensive applications that need to repeatedly look for - elements and matches. It yields an amazing 10 x performance improvement at a - minimum. - <li> - <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/04/19/115966.aspx"> - XPathNavigatorReader</a>: implements an <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmltextreaderclasstopic.asp"> - XmlTextReader</a> over any <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemXmlXPathXPathNavigatorClassTopic.asp"> - XPathNavigator</a>, effectively offering <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/06/25/165375.aspx">in-memory - XML Schema validation without re-parsing</a>, <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/05/10/129101.aspx">subset - document loading</a> through <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmlreaderclassreadinnerxmltopic.asp"> - ReadInnerXml</a> and <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmlreaderclassreadouterxmltopic.asp"> - ReadOuterXml</a> methods, and automatic XML serialization by implementing the <a href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlserializationixmlserializableclasstopic.asp"> - IXmlSerializable</a> - interface. Of course you can also use just to query for the XML string - representation from an arbitrary navigator ;).<li> - <a target="_blank" href="http://www.tkachenko.com/blog/archives/000117.html">XmlNodeNavigator</a> - : the <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmlnodeclasstopic.asp"> - XmlNode</a> implementation of the <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxpathixpathnavigableclasscreatenavigatortopic.asp"> - IXPathNavigable.CreateNavigator</a> will always return an <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemXmlXPathXPathNavigatorClassTopic.asp"> - XPathNavigator</a> - starting at the root of the document, *not* the current node you're standing - in. This class solves this issue by creating a navigator that can be used to - navigate the subtree. - <li> - <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/06/24/164243.aspx"> - SubtreeXPathNavigator</a>: allows to scope a navigator to the current node. - This allows high-performance subtree XSLT transformations without re-parsing. - <li> - <!--StartFragment --> - <a href="http://weblogs.asp.net/cazzu/archive/2004/04/23/119263.aspx">XmlFragmentStream</a>: - allows to read a file that contains only node fragments, by faking a root - element at the stream level. This allows loading the XML into a document for - querying, for example, something that is not possible with an <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmltextreaderclasstopic.asp"> - XmlTextReader</a> - alone. Very useful for logging applications that write XML fragments and its - corresponding log analyzer. - <li> - <!--StartFragment --> - <a href="http://weblogs.asp.net/cazzu/archive/2004/04/26/120684.aspx">XPathIteratorReader</a>: - exposes an <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmltextreaderclasstopic.asp"> - XmlTextReader</a> over an <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemXmlXPathXPathNodeIteratorClassTopic.asp"> - XPathNodeIterator</a>, with special overloads to configure the new faked root - elemetn. Very useful if you need to return the results of a query from a - WebService. In this case you use it in combination with the <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/05/31/144922.aspx"> - XmlNodeFactory</a>. - <li> - <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/05/31/144922.aspx"> - XmlNodeFactory</a>: allows returning well-formed XML from WebServices without - loading XmlDocument at all, by providing a factory for custom <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmlnodeclasstopic.asp"> - XmlNode</a> adapter objects for <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmlreaderclasstopic.asp"> - XmlReader</a> and <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemXmlXPathXPathNavigatorClassTopic.asp"> - XPathNavigator</a>, avoiding all re-parsing costs. - <li> - <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/05/10/129106.aspx"> - XmlFirstUpperReader and XmlFirstLowerWriter</a>: used in combination usually - for configuration files. Allows automatic case conversion to match .NET and XML - conventions, where the former uses PascalCasing and the later camelCasing. - Together, they provide roundtriping and transparent processing while - maintaining the natural casing of each domain.</li> - </ul> - <p> - All classes contain extensive tests to ensure its quality, as well as the peer - review among this highly focused group of XML lovers.</p> - <p> - The project code can be downloaded from <a target="_blank" href="http://prdownloads.sourceforge.net/mvp-xml/Mvp.Xml.zip?download"> - SourceForge</a>. Check the <a href="http://sourceforge.net/projects/mvp-xml">project - page at SourceForge</a>.<br> - <a href="http://sourceforge.net" title="Link to SourceForge home page"><img src="http://sourceforge.net/sflogo.php?group_id=102352&type=1" alt="SourceForge logo" - border="0"></a> - </p> - </body> +<head> + <title>Mvp.Xml project home</title> + <link href="style.css" type="text/css" rel="stylesheet"> +</head> +<body> +<h1>Mvp.Xml Project</h1> +<p> This project is developed by <a target="_blank" + href="http://www.microsoft.com/communities/mvp/mvp.mspx"> Microsoft +MVPs</a> in <a target="_blank" + href="http://www.microsoft.com/communities/MVP/MVPList.mspx?Params=%7eCMTYDataSvcParams%5e%7earg+Name%3d%22Product%22+Value%3d%22Visual%20Developer%20-%20XML%22%2f%5e%7esParams%5e%7e%2fsParams%5e%7e%2fCMTYDataSvcParams%5e&Title=Visual%20Developer%20-%20XML"> +XML technologies</a> and <a target="_blank" + href="http://www.microsoft.com/communities/MVP/MVPList.mspx?Params=%7eCMTYDataSvcParams%5e%7earg+Name%3d%22Product%22+Value%3d%22Visual%20Developer%20-%20XML%20Web%20Services%22%2f%5e%7esParams%5e%7e%2fsParams%5e%7e%2fCMTYDataSvcParams%5e&Title=Visual%20Developer%20-%20XML%20Web%20Services"> +XML Web Services</a> worldwide. It is aimed at supplementing .NET +framework functionality available through the <a target="_blank" + href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxml.asp"> +System.Xml</a> namespace and related namespaces such as <a + target="_blank" + href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwebservices.asp"> +System.Web.Services</a>. It is documented extensively through <a + target="_blank" + href="http://www.google.com/search?q=%22what+is+a+weblog%22"> weblog</a> +posts. All the project's classes contain extensive tests to ensure its +quality, as well as the peer review among this highly focused group of +XML lovers. </p> +<p>The Mvp.Xml project consists of several modules listed below.<br> +</p> +<ul> + <li><a href="Common/index.html">Common</a> module</li> + <li><a href="xinclude/index.html">XInclude.NET</a> module<br> + </li> + <li><a href="xpointer/index.html">XPointer.NET</a> module</li> +</ul> +<h2>News</h2> +Mvp.Xml News: <a + href="http://sourceforge.net/export/rss2_projnews.php?group_id=102352&rss_fulltext=1"><img + alt="Mvp.Xml project news feed" + src="http://images.sourceforge.net/images/xml.png" + style="border: 0px solid ; width: 36px; height: 14px;"></a> (<a + href="http://sourceforge.net/news/?group_id=102352">News archive</a>)<br> +Mvp.Xml Releases: <a + href="http://sourceforge.net/export/rss2_projfiles.php?group_id=102352"><img + alt="Mvp.Xml project news feed" + src="http://images.sourceforge.net/images/xml.png" + style="border: 0px solid ; width: 36px; height: 14px;"></a><br> +<br> +View <a + href="http://sourceforge.net/export/rss2_project.php?group_id=102352">full +list</a> of the Mvp.Xml project's RSS feeds.<br> +<h2>Get Support</h2> +There are several ways to get support on using Mvp.Xml project's +classes:<br> +<ol> + <li>This online documentation.</li> + <li>Mailing list: <a + href="https://lists.sourceforge.net/mailman/listinfo/mvp-xml-help">mvp-xml-help</a> +(General discussion list for Mvp.Xml users), <a + href="http://sourceforge.net/mailarchive/forum.php?forum_id=">(archive)</a>.</li> + <li>Tracker: <a + href="http://sourceforge.net/tracker/?group_id=102352&atid=633328">Bugs</a>.</li> + <li>Tracker: <a + href="http://sourceforge.net/tracker/?group_id=102352&atid=633331">Feature +Requests</a>.</li> + <li>Browse <a href="http://cvs.sourceforge.net/viewcvs.py/mvp-xml">CVS +repository online</a>.<br> + </li> +</ol> +<h2>Downloads</h2> +Go to the <a + href="http://sourceforge.net/project/showfiles.php?group_id=102352">Downloads</a> +page. You can download Mvp.Xml release as a whole (all modules in one +archive) or releases for separate modules.<br> +<h2>License</h2> +The Mvp.Xml project is subject to the <a href="license.html">Common +Public License</a> - <a + href="http://www.opensource.org/licenses/index.php">OSI approved</a> +free open-source license.<br> +<br> +<hr style="width: 100%; height: 2px;"> +<p> The project is hosted at <a target="_blank" + href="http://prdownloads.sourceforge.net/mvp-xml/Mvp.Xml.zip?download"> +SourceForge</a>. Find more at the <a + href="http://sourceforge.net/projects/mvp-xml">Mvp.Xml project page at +SourceForge</a>.<br> +<a href="http://sourceforge.net" title="Link to SourceForge home page"><img + src="http://sourceforge.net/sflogo.php?group_id=102352&type=1" + alt="SourceForge logo" border="0"></a><br> +<code>$Id$</code><br> +</p> +</body> </html> Index: style.css =================================================================== RCS file: /cvsroot/mvp-xml/WebSite/style.css,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- style.css 14 Jul 2004 04:22:28 -0000 1.2 +++ style.css 1 Nov 2004 17:19:17 -0000 1.3 @@ -1,14 +1,22 @@ body { font-family: 'Trebuchet MS' , Verdana, 'Lucida Console' , Garamond, 'Times New Roman'; - font-size: smaller; + font-size: 9pt; } h1 { font-weight: bold; - font-size: medium; - /*display: block;*/ + font-size: 18pt; + background-color: #99ccff; + text-indent: 15px; +} + +h2 +{ + font-weight: bold; + font-size: 12pt; background-color: #99ccff; text-indent: 15px; } + |
From: Oleg T. <he...@us...> - 2004-11-01 17:19:31
|
Update of /cvsroot/mvp-xml/WebSite/xpointer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4471/xpointer Added Files: index.html Log Message: Extended version... --- NEW FILE: index.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Mvp.Xml project: Common module</title> <link href="../style.css" type="text/css" rel="stylesheet"> </head> <body> <h1>Mvp.Xml Project: XPointer.NET module (version 1.3)<br> </h1> The XPointer.NET module provides an implementation of the <a href="http://www.w3.org/TR/xptr-framework/">XPointer Framework Recommendation</a> written in C# for the .NET platform. XPointer.NET supports <a href="http://http//www.w3.org/TR/xptr-element/">XPointer element() Scheme</a>, <a href="http://www.w3.org/TR/xptr-xmlns/">XPointer xmlns() Scheme</a>, <a href="http://simonstl.com/ietf/draft-stlaurent-xpath-frag-00.html"> XPointer xpath1() Scheme</a> and <a href="http://simonstl.com/ietf/draft-stlaurent-xpath-frag-00.html"> XPointer xpointer() Scheme</a> (XPath subset only). XPointer.NET was designed and implemented for XInclude.NET module, but it can be used on its own.<br> <h2>Requirements</h2> <p>XPointer.NET is .NET Framework application and requires <a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/MSDN-FILES/027/001/829/msdncompositedoc.xml&frame=true" target="_top"> .NET Framework</a> version 1.0 or 1.1 to be installed. </p> <h2>Installation and Documentation</h2> <p>Find precompiled <font style="font-family: monospace;" face="Courier New">Mvp.Xml.XPointer.dll</font> library in the "<font style="font-family: monospace;" face="Courier New">bin</font>" directiory. The "<font style="font-family: monospace;" face="Courier New">src</font>" directory contains XPointer.NET sources in Visual Studio <br> .NET 2003 solution form. The API documentation can be found in the "<span style="font-family: monospace;">doc</span>" directory (online version) (#TODO). Test cases can be found in the "<span style="font-family: monospace;">test</span>" directory.<br> In addition to the API documentation, refer to the "<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/xinclude.asp">Combining XML Documents with XInclude</a>" article at the MSDN and the normative specs:<br> </p> <ul> <li><a href="http://www.w3.org/TR/xptr-framework/">XPointer Framework Recommendation</a></li> <li><a href="http://http//www.w3.org/TR/xptr-element/">XPointer element() Scheme</a></li> <li><a href="http://www.w3.org/TR/xptr-xmlns/">XPointer xmlns() Scheme</a><span style="text-decoration: underline;"></span></li> <li><a href="http://simonstl.com/ietf/draft-stlaurent-xpath-frag-00.html">XPointer xpointer() Scheme</a></li> </ul> <h2>History</h2> Done since 1.2 release:<br> <ul> <li>The new home - Mvp.Xml project and so the new namespace - Mvp.Xml.XPointer instead of GotDotNet.XPointer.<br> </li> <li>Performance improvements - documents included via XPointer are now cached.</li> <li>Memory footprint is minimized.</li> <li>XPointer Framework syntax erorrs are now throw exceptions.<br> </li> </ul> <h2>Usage</h2> <a href="../../../../temp/XInclude.NET-1.2/doc/GotDotNet.XInclude.XIncludingReader.html">XPointerReader</a> class, found in the Mvp.Xml.XPointer namespace (#TODO), is the key class. It's customized <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlXmlReaderClassTopic.asp"> XmlReader</a>, which implements <a href="http://www.w3.org/TR/xptr-framework/">XPointer Framework</a><!--StartFragment -->, <a href="http://www.w3.org/TR/xptr-element/">XPointer element() Scheme</a>, <!--StartFragment --><a href="http://www.w3.org/TR/xptr-xmlns/">XPointer xmlns() Scheme</a><!--StartFragment -->, <a href="http://www.simonstl.com/ietf/draft-stlaurent-xpath-frag-00.html">The XPointer xpath1() Scheme</a> and <a href="http://simonstl.com/ietf/draft-stlaurent-xpath-frag-00.html"> XPointer xpointer() Scheme</a> (XPath subset only) in a caching forward-only fashion.<br> <br> [#TODO samples] <br> <br> Find more examples and test cases in the "<font style="font-family: monospace;" face="Courier New">test</font>" directory.<br> <h2>Conformance Issues<br> </h2> <ol> <li>Only XPath subset of the <a href="http://simonstl.com/ietf/draft-stlaurent-xpath-frag-00.html"> XPointer xpointer() Scheme</a> is currently supported. </li> </ol> <h2>License</h2> <p>XPointer.NET as part of the Mvp.Xml project is subject to the <a href="../license.html">Common Public License</a> - <a href="http://www.opensource.org/licenses/index.php">OSI approved</a> free open-source license. It's distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.</p> <h2>Bug reports</h2> <p>Please feel free to report any bugs to the Mvp.Xml project's <a href="http://sourceforge.net/tracker/?group_id=102352&atid=633328"> Bug Tracker</a>. Feature requests are also <a href="http://sourceforge.net/tracker/?group_id=102352&atid=633331">welcome</a>.<br> </p> <h2>Feedback</h2> <p>We appreciate any kind of feedback, feel free to post any questions or comments about XPointer.NET and Mvp.Xml project in general in the <a href="https://lists.sourceforge.net/mailman/listinfo/mvp-xml-help">mvp-xml-help</a> mailing list <a href="http://sourceforge.net/mailarchive/forum.php?forum_id=">(archive)</a>. </p> <hr style="width: 100%; height: 2px;"> <p> The project is hosted at <a target="_blank" href="http://prdownloads.sourceforge.net/mvp-xml/Mvp.Xml.zip?download"> SourceForge</a>. Find more at the <a href="http://sourceforge.net/projects/mvp-xml">Mvp.Xml project page at SourceForge</a>.<br> <a href="http://sourceforge.net/" title="Link to SourceForge home page"><img src="http://sourceforge.net/sflogo.php?group_id=102352&type=1" alt="SourceForge logo" border="0"></a><br> <code>$Id: index.html,v 1.1 2004/11/01 17:19:20 helgy Exp $</code><br> </p> <p> </p> </body> </html> |
From: Oleg T. <he...@us...> - 2004-11-01 17:19:31
|
Update of /cvsroot/mvp-xml/WebSite/xinclude In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4471/xinclude Added Files: index.html Log Message: Extended version... --- NEW FILE: index.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Mvp.Xml project: XIncllude.NET module</title> <link href="../style.css" type="text/css" rel="stylesheet"> </head> <body> <h1>Mvp.Xml Project: XInclude.NET module (version 1.3)<br> </h1> The XInclude.NET module provides an implementation of the <a href="http://www.w3.org/TR/xinclude/">W3C XML Inclusions (XInclude)1.0 Proposed Recommendation</a> and the <a href="http://www.w3.org/TR/xptr-framework/">XPointer Framework Recommendation</a> written in C# for the .NET platform. XInclude.NET supports <a href="http://http//www.w3.org/TR/xptr-element/">XPointer element() Scheme</a>, <a href="http://www.w3.org/TR/xptr-xmlns/">XPointer xmlns() Scheme</a>, <a href="http://simonstl.com/ietf/draft-stlaurent-xpath-frag-00.html"> XPointer xpath1() Scheme</a> and <a href="http://simonstl.com/ietf/draft-stlaurent-xpath-frag-00.html"> XPointer xpointer() Scheme</a> (XPath subset only). XInclude.NET currently supports only streamable subset of the XInclude, implemented as fast, non-caching, forward-only <span style="font-family: monospace;">Mvp.Xml.XInclude.XIncludingReader</span> class. <p>XInclude.NET has been thoroughly tested against <!--StartFragment --><a href="http://www.w3.org/XML/Test/XInclude/">The XInclude Test Suite</a> under Microsoft .NET 1.0 and 1.1 on Windows 2000 and Windows Server 2003.</p> <h2>Requirements</h2> <p>XInclude.NET is .NET Framework application and requires <a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/MSDN-FILES/027/001/829/msdncompositedoc.xml&frame=true" target="_top"> .NET Framework</a> version 1.0 or 1.1 to be installed. </p> <h2>Installation and Documentation</h2> <p>Find precompiled <font style="font-family: monospace;" face="Courier New">Mvp.Xml.XInclude.dll</font> library in the "<font style="font-family: monospace;" face="Courier New">bin</font>" directiory. The "<font style="font-family: monospace;" face="Courier New">src</font>" directory contains XInclude.NET sources in Visual Studio <br> .NET 2003 solution form. The API documentation can be found in the "<span style="font-family: monospace;">doc</span>" directory (online version) (#TODO). Test cases can be found in the "<span style="font-family: monospace;">test</span>" directory.<br> In addition to the API documentation, refer to the "<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/xinclude.asp">Combining XML Documents with XInclude</a>" article at the MSDN and the normative specs:<br> </p> <ul> <li><a href="http://www.w3.org/TR/xinclude/">W3C XML Inclusions (XInclude)1.0</a></li> <li><a href="http://www.w3.org/TR/xptr-framework/">XPointer Framework Recommendation</a></li> <li><a href="http://http//www.w3.org/TR/xptr-element/">XPointer element() Scheme</a></li> <li><a href="http://www.w3.org/TR/xptr-xmlns/">XPointer xmlns() Scheme</a><span style="text-decoration: underline;"></span></li> <li><a href="http://simonstl.com/ietf/draft-stlaurent-xpath-frag-00.html">XPointer xpointer() Scheme</a></li> </ul> <p></p> <h2>History</h2> Done since 1.2 release:<br> <ul> <li>The new home - Mvp.Xml project and so the new namespace - Mvp.Xml.XInclude instead of GotDotNet.XInclude.<br> </li> <li>Upgraded to support the new XInclude Proposed Rec syntax and semantics.</li> <li>Added support for the xml:lang fixup.<br> </li> <li>Performance improvements - documents included via XPointer are now cached.</li> <li>Memory footprint is minimized.<br> </li> <li>A suite of unit tests has been added, including the W3C XInclude Test Suite.</li> <li>As a sequence - lots of bugs and incompatibilities has been fixed.<br> </li> </ul> Done since 1.1 release:<br> <ul> <li>Support for custom XmlResolver for resolving resources</li> </ul> Done since 1.0 release:<br> <ul> <li>Updated to support XInclude WD 10 November 2003 syntax</li> <li>Support for content negotiation via accept, accept-charset and <br> accept-language attributes</li> </ul> Done since 1.0beta release:<br> <ul> <li>Support for XPointer xpointer() schema (XPath subset only)</li> <li>Bug fixes</li> <li>Performance improvements</li> </ul> Done since 1.0alpha release:<br> <ul> <li>Support for XPointer framework, element(), xmlns() and xpath1() schemas</li> <li>Minor bug fixes</li> </ul> <h2>Usage</h2> <p><a href="../../../../temp/XInclude.NET-1.2/doc/GotDotNet.XInclude.XIncludingReader.html">XIncludingReader</a> class, found in the Mvp.Xml.XInclude namespace (#TODO), is the key class. It's customized <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlXmlReaderClassTopic.asp"> XmlReader</a>, which implements streamable subset of the XInclude and XPointer in a fast, non-caching, forward-only fashion. It can be set on top of another XmlReader, e.g. <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemxmlxmlnodereaderclasstopic.asp"> XmlNodeReader</a>, <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemxmlxmltextreaderclasstopic.asp"> XmlTextReader</a> or <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemxmlxmlvalidatingreaderclasstopic.asp"> XmlValidatingReader</a>. Such design allows to perform XML Inclusions in many different situations, e.g. before or after validation, before or after building XmlDocument or XPathDocument. Here are some obvious usage scenarios:</p> <p>XML inclusion during reading XML:</p> <p><code></code></p> <pre>XmlReader reader = new XIncludingReader("source.xml");<br>while (reader.Read()) {<br> ... <br> </pre> <p>XML inclusion while building XmlDocument:</p> <p><code></code></p> <pre>XmlReader reader = new XIncludingReader(new XmlTextReader("source.xml"));<br>XmlDocument doc = new XmlDocument(); <br>doc.Load(reader);<br>... <br> </pre> <p>XML inclusion before an XSL Transformation:</p> <p><code></code></p> <pre>XslTransform xslt = new XslTransform();<br>xslt.Load("stylesheet.xsl");<br>XmlReader reader = new XIncludingReader("source.xml");<br>XPathDocument xdoc = new XPathDocument(reader);<br>xslt.Transform(xdoc, null, new StreamWriter("result.xml"));<br>...</pre> <p>Find more examples and test cases in the "<font style="font-family: monospace;" face="Courier New">test</font>" directory.</p> <h2>Custom XmlResolver</h2> <p><span style="font-family: monospace;">XIncludingReader</span> supports custom URI resolving. Just set your <span style="font-family: monospace;">XmlResolver</span> object to the <span style="font-family: monospace;">XmlResolver</span> property of the <span style="font-family: monospace;">XIncludingReader</span>. <span style="font-family: monospace;">XIncludingReader</span> will call <span style="font-family: monospace;">ResolveUri()</span> and <span style="font-family: monospace;">GetEntity()</span> methods of your resolver when fetching a resource by URI referenced in "<span style="font-family: monospace;">href</span>" attribute of an <span style="font-family: monospace;">xi:include</span> element. A custom <span style="font-family: monospace;">XmlResolver</span> must return either <span style="font-family: monospace;">System.IO.Stream</span> or <span style="font-family: monospace;">System.Xml.XmlReader</span> from the <span style="font-family: monospace;">GetEntity()</span> method.</p> <h2>XPointer</h2> <p>XInclude.NET implements<!--StartFragment --> <a href="http://www.w3.org/TR/xptr-framework/">XPointer Framework</a>,<!--StartFragment --> <a href="http://www.w3.org/TR/xptr-element/">XPointer element() Scheme</a>, <!--StartFragment --><a href="http://www.w3.org/TR/xptr-xmlns/">XPointer xmlns() Scheme</a>,<!--StartFragment --> <a href="http://www.simonstl.com/ietf/draft-stlaurent-xpath-frag-00.html">The XPointer xpath1() Scheme</a> and <a href="http://simonstl.com/ietf/draft-stlaurent-xpath-frag-00.html"> XPointer xpointer() Scheme</a> (XPath subset only). </p> <p><a href="../../../../temp/XInclude.NET-1.2/doc/GotDotNet.XPointer.XPointerReader.html">XPointerReader</a> class, found in <span style="text-decoration: underline;">Mvp.Xml.</span><a href="../../../../temp/XInclude.NET-1.2/doc/GotDotNet.XPointer.html">XPointer namespace</a> (#TODO) represents XPointer-aware XmlReader and can be used as such outside of XInclude context too.</p> <h2>Conformance Issues<br> </h2> <ol> <li>Only streamable subset of XInclude is supported - intra-document references are not supported.</li> <li>Syntactically incorrect URI references are treated as resource error.<br> </li> </ol> <h2>License</h2> <p>XInclude.NET as part of the Mvp.Xml project is subject to the <a href="../license.html">Common Public License</a> - <a href="http://www.opensource.org/licenses/index.php">OSI approved</a> free open-source license.<a href="http://gotdotnet.com/Community/Workspaces/License.aspx?id=cab253e8-cb4b-47c4-a9d9-6c42947b04a8"></a> It's distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.</p> <h2>Bug reports</h2> <p>Please feel free to report any bugs to the Mvp.Xml project's <a href="http://sourceforge.net/tracker/?group_id=102352&atid=633328"> Bug Tracker</a>. Feature requests are also <a href="http://sourceforge.net/tracker/?group_id=102352&atid=633331">welcome</a>.<br> </p> <h2>Feedback</h2> <p>We appreciate any kind of feedback, feel free to post any questions or comments about XInclude.NET and Mvp.Xml project in general in the <a href="https://lists.sourceforge.net/mailman/listinfo/mvp-xml-help">mvp-xml-help</a> mailing list <a href="http://sourceforge.net/mailarchive/forum.php?forum_id=">(archive)</a>. </p> <hr style="width: 100%; height: 2px;"> <p> The project is hosted at <a target="_blank" href="http://prdownloads.sourceforge.net/mvp-xml/Mvp.Xml.zip?download"> SourceForge</a>. Find more at the <a href="http://sourceforge.net/projects/mvp-xml">Mvp.Xml project page at SourceForge</a>.<br> <a href="http://sourceforge.net/" title="Link to SourceForge home page"><img src="http://sourceforge.net/sflogo.php?group_id=102352&type=1" alt="SourceForge logo" border="0"></a><br> <code>$Id: index.html,v 1.1 2004/11/01 17:19:18 helgy Exp $</code><br> </p> <p> </p> </body> </html> |
From: Oleg T. <he...@us...> - 2004-11-01 17:19:31
|
Update of /cvsroot/mvp-xml/WebSite/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4471/common Added Files: index.html Log Message: Extended version... --- NEW FILE: index.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Mvp.Xml project: Common module</title> <link href="../style.css" type="text/css" rel="stylesheet"> </head> <body> <h1>Mvp.Xml Project: Common module<br> </h1> The Common module includes a set of commonly useful classes in <span style="font-family: monospace;">Mvp.Xml.Common</span> and <span style="font-family: monospace;">Mvp.Xml.Common.XPath</span> namespaces, which extend the .NET functionality available through the <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxml.asp"> System.Xml</a> and related namespaces.<br> <br> The following is a list of features, a short explanation and a link to its corresponding full explanation post: <ul> <li> <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2003/10/07/30888.aspx">DynamicContext</a>: allows precompilation of XPath expression involving dynamic values for a performance increase of 1.5 x - 4 x. </li> <li> <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/04/02/106667.aspx">XPathCache</a>: based on the previous class, exposes a cache of precompiled XPath expressions that can be executed with a single line of code. Replacing existing dynamic queryies with this involves minimal effort and yields even greater performance than the previous one alone for scenarios involving queries with sort expressions. </li> <li> <a target="_blank" href="http://www.tkachenko.com/blog/archives/000194.html">IndexingXPathNavigator</a>: allows the use of the XSLT key function to create indexes for fast querying. Very handy for query intensive applications that need to repeatedly look for elements and matches. It yields an amazing 10 x performance improvement at a minimum. </li> <li> <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/04/19/115966.aspx">XPathNavigatorReader</a>: implements an <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmltextreaderclasstopic.asp"> XmlTextReader</a> over any <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemXmlXPathXPathNavigatorClassTopic.asp"> XPathNavigator</a>, effectively offering <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/06/25/165375.aspx">in-memory XML Schema validation without re-parsing</a>, <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/05/10/129101.aspx">subset document loading</a> through <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmlreaderclassreadinnerxmltopic.asp"> ReadInnerXml</a> and <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmlreaderclassreadouterxmltopic.asp"> ReadOuterXml</a> methods, and automatic XML serialization by implementing the <a href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlserializationixmlserializableclasstopic.asp"> IXmlSerializable</a> interface. Of course you can also use just to query for the XML string representation from an arbitrary navigator ;).</li> <li> <a target="_blank" href="http://www.tkachenko.com/blog/archives/000117.html">XmlNodeNavigator</a> : the <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmlnodeclasstopic.asp"> XmlNode</a> implementation of the <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxpathixpathnavigableclasscreatenavigatortopic.asp"> IXPathNavigable.CreateNavigator</a> will always return an <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemXmlXPathXPathNavigatorClassTopic.asp"> XPathNavigator</a> starting at the root of the document, *not* the current node you're standing in. This class solves this issue by creating a navigator that can be used to navigate the subtree. </li> <li> <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/06/24/164243.aspx">SubtreeXPathNavigator</a>: allows to scope a navigator to the current node. This allows high-performance subtree XSLT transformations without re-parsing. </li> <li><!--StartFragment --> <a href="http://weblogs.asp.net/cazzu/archive/2004/04/23/119263.aspx">XmlFragmentStream</a>: allows to read a file that contains only node fragments, by faking a root element at the stream level. This allows loading the XML into a document for querying, for example, something that is not possible with an <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmltextreaderclasstopic.asp"> XmlTextReader</a> alone. Very useful for logging applications that write XML fragments and its corresponding log analyzer. </li> <li><!--StartFragment --> <a href="http://weblogs.asp.net/cazzu/archive/2004/04/26/120684.aspx">XPathIteratorReader</a>: exposes an <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmltextreaderclasstopic.asp"> XmlTextReader</a> over an <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemXmlXPathXPathNodeIteratorClassTopic.asp"> XPathNodeIterator</a>, with special overloads to configure the new faked root elemetn. Very useful if you need to return the results of a query from a WebService. In this case you use it in combination with the <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/05/31/144922.aspx"> XmlNodeFactory</a>. </li> <li> <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/05/31/144922.aspx">XmlNodeFactory</a>: allows returning well-formed XML from WebServices without loading XmlDocument at all, by providing a factory for custom <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmlnodeclasstopic.asp"> XmlNode</a> adapter objects for <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxmlreaderclasstopic.asp"> XmlReader</a> and <a target="_blank" href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemXmlXPathXPathNavigatorClassTopic.asp"> XPathNavigator</a>, avoiding all re-parsing costs. </li> <li> <a target="_blank" href="http://weblogs.asp.net/cazzu/archive/2004/05/10/129106.aspx">XmlFirstUpperReader and XmlFirstLowerWriter</a>: used in combination usually for configuration files. Allows automatic case conversion to match .NET and XML conventions, where the former uses PascalCasing and the later camelCasing. Together, they provide roundtriping and transparent processing while maintaining the natural casing of each domain.</li> <li><a href="http://www.tkachenko.com/blog/archives/000333.html">XmlBaseAwareXmlTextReader</a>: XmlTextReader, augmented to support <a href="http://www.w3.org/TR/xmlbase/">XML Base</a>.</li> <li><a href="///%20See:%20http://www.tkachenko.com/blog/archives/000112.html">XmlTransformingReader</a>: XmlReader, transforming input XML stream according to given XSLT stylesheet.</li> </ul> <p> All classes contain extensive tests to ensure its quality, as well as the peer review among this highly focused group of XML lovers.</p> <hr style="width: 100%; height: 2px;"> <p> The project is hosted at <a target="_blank" href="http://prdownloads.sourceforge.net/mvp-xml/Mvp.Xml.zip?download"> SourceForge</a>. Find more at the <a href="http://sourceforge.net/projects/mvp-xml">Mvp.Xml project page at SourceForge</a>.<br> <a href="http://sourceforge.net/" title="Link to SourceForge home page"><img src="http://sourceforge.net/sflogo.php?group_id=102352&type=1" alt="SourceForge logo" border="0"></a> </p> <p> </p> </body> </html> |
From: Oleg T. <he...@us...> - 2004-11-01 17:16:28
|
Update of /cvsroot/mvp-xml/WebSite/xpointer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3651/xpointer Log Message: Directory /cvsroot/mvp-xml/WebSite/xpointer added to the repository |
From: Oleg T. <he...@us...> - 2004-11-01 17:15:44
|
Update of /cvsroot/mvp-xml/WebSite/xinclude In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3320/xinclude Log Message: Directory /cvsroot/mvp-xml/WebSite/xinclude added to the repository |
From: Oleg T. <he...@us...> - 2004-11-01 17:14:13
|
Update of /cvsroot/mvp-xml/WebSite/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2950/common Log Message: Directory /cvsroot/mvp-xml/WebSite/common added to the repository |
From: Oleg T. <he...@us...> - 2004-11-01 12:35:21
|
Update of /cvsroot/mvp-xml/XInclude/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10448/v1/src Modified Files: SR.resx XIncludingReader.cs Log Message: Bugs... Index: XIncludingReader.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/src/XIncludingReader.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- XIncludingReader.cs 1 Nov 2004 05:44:44 -0000 1.22 +++ XIncludingReader.cs 1 Nov 2004 12:35:11 -0000 1.23 @@ -51,8 +51,10 @@ private Uri _topBaseUri; //Top-level included item flag private bool _topLevel; - //One top-level element has been included already - private bool _gotTopLevelElem; + //A top-level included element has been included already + private bool _gotTopIncludedElem; + //At least one element has been returned by the reader + private bool _gotElement; //Internal state private XIncludingReaderState _state; //Name table @@ -747,11 +749,11 @@ if (_topLevel && ((XmlReader)_readers.Peek()).Depth == 0 && _reader.NodeType == XmlNodeType.Element) { - if (_gotTopLevelElem) + if (_gotTopIncludedElem) //Attempt to include more than one element at the top level throw new MalformedXInclusionResultError(SR.MalformedXInclusionResult); else - _gotTopLevelElem = true; + _gotTopIncludedElem = true; } switch (_reader.NodeType) @@ -811,7 +813,10 @@ _reader.BaseURI.ToString())); } else + { + _gotElement = true; goto default; + } case XmlNodeType.EndElement: //Looking for end of xi:fallback if (_fallbackState.Fallbacking && @@ -844,9 +849,13 @@ CheckAndSkipContent(); return Read(); } - else + else + { + if (!_gotElement) + throw new MalformedXInclusionResultError(SR.MalformedXInclusionResult); //That's all, folks return false; + } } } // Read() @@ -1255,9 +1264,8 @@ /// Compares two languages as per IETF RFC 3066. /// </summary> private bool AreTheSameLangs(string lang1, string lang2) - { - //TODO: Wise comparison? - return lang1 == lang2; + { + return lang1.ToLower() == lang2.ToLower(); } /// <summary> @@ -1297,10 +1305,18 @@ XIncludingReader xir = new XIncludingReader(reader); StringWriter sw = new StringWriter(); XmlTextWriter w = new XmlTextWriter(sw); - while (xir.Read()) - w.WriteNode(xir, false); - xir.Close(); - w.Close(); + try + { + while (xir.Read()) + w.WriteNode(xir, false); + } + finally + { + if (xir != null) + xir.Close(); + if (w != null) + w.Close(); + } return new XmlTextReader(uri, new StringReader(sw.ToString())); } Index: SR.resx =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/src/SR.resx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- SR.resx 31 Oct 2004 08:02:27 -0000 1.6 +++ SR.resx 1 Nov 2004 12:35:11 -0000 1.7 @@ -91,7 +91,7 @@ <value>'href' or 'xpointer' attributes can't both be omitted on xi:include element. Location: {0}, Line {1}, Position {2}.</value> </data> <data name="IntradocumentReferencesNotSupported" type="System.String" mimetype="System.String"> - <value>Intra-document references are not supported in the streaming mode</value> + <value>XIncludingReader doesn't support intra-document references.</value> </data> <data name="CustomXmlResolverError" type="System.String" mimetype="System.String"> <value>An exception has occured during GetEntity call to custom XmlResolver.</value> @@ -121,7 +121,7 @@ <value>xi:include element cannot contain more than one xi:fallback element. Location: {0}, Line {1}, Position {2}.</value> </data> <data name="MalformedXInclusionResult" type="System.String" mimetype="System.String"> - <value>Malformed XInclusion result - xi:include element at the top level can't include more than one element.</value> + <value>Malformed XInclusion result - xi:include element at the top level must include a single element and optional comments and PIs.</value> </data> <data name="InvalidCharForAccept" type="System.String" mimetype="System.String"> <value>'accept' attribute contains a character not allowed in HTTP header: 0x{0}.</value> |
From: Oleg T. <he...@us...> - 2004-11-01 08:12:18
|
Update of /cvsroot/mvp-xml/XInclude/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29068/v1/test Modified Files: EntryPoint.cs Log Message: Adjusting test suite. Index: EntryPoint.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/EntryPoint.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- EntryPoint.cs 1 Nov 2004 05:44:44 -0000 1.11 +++ EntryPoint.cs 1 Nov 2004 08:12:03 -0000 1.12 @@ -11,13 +11,13 @@ { //XIncludeReaderTests rt = new XIncludeReaderTests(); //LTG_Edinburgh_UnivTests rt = new LTG_Edinburgh_UnivTests(); - //NistTests rt = new NistTests(); - Elliotte_Rusty_HaroldTests rt = new Elliotte_Rusty_HaroldTests(); + NISTTests rt = new NISTTests(); + //Elliotte_Rusty_HaroldTests rt = new Elliotte_Rusty_HaroldTests(); //FourThoughtTests rt = new FourThoughtTests(); //XIncludeSyntaxTests rt = new XIncludeSyntaxTests(); try { - rt.harold_21(); + rt.Nist_include_24(); } catch (Exception e) { |
From: Oleg T. <he...@us...> - 2004-11-01 08:04:12
|
Update of /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/Nist/test/ents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27513/v1/test/XInclude-Test-Suite/Nist/test/ents Modified Files: idtst.xml Log Message: Adjusting test suite. Index: idtst.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/Nist/test/ents/idtst.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- idtst.xml 19 Oct 2004 16:24:58 -0000 1.3 +++ idtst.xml 1 Nov 2004 08:04:02 -0000 1.4 @@ -1,6 +1,7 @@ <?xml version='1.0'?> <!DOCTYPE doc [ <!ELEMENT doc (family*)> + <!ELEMENT family (#PCDATA)> <!ATTLIST family fnumber ID #REQUIRED> <!ATTLIST family father IDREF #IMPLIED> <!ATTLIST family mother IDREF #IMPLIED> |
From: Oleg T. <he...@us...> - 2004-11-01 08:04:12
|
Update of /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/EdUni/result In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27513/v1/test/XInclude-Test-Suite/EdUni/result Modified Files: book.xml extract.xml Log Message: Adjusting test suite. Index: extract.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/EdUni/result/extract.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- extract.xml 19 Oct 2004 16:24:56 -0000 1.3 +++ extract.xml 1 Nov 2004 08:04:01 -0000 1.4 @@ -1,4 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE extract [ +<!ELEMENT include (#PCDATA)> +<!ATTLIST include xmlns CDATA #FIXED "http://www.w3.org/2001/XInclude"> +]> <extract> <intro id="intro" xml:base="book.xml"> You will enjoy this book. Index: book.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/EdUni/result/book.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- book.xml 30 Oct 2004 09:56:28 -0000 1.5 +++ book.xml 1 Nov 2004 08:04:01 -0000 1.6 @@ -1,4 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book [ +<!ELEMENT intro (#PCDATA)> +<!ELEMENT include (#PCDATA)> +<!ATTLIST intro id ID #IMPLIED> +<!ATTLIST include xmlns CDATA #FIXED "http://www.w3.org/2001/XInclude"> +<!ELEMENT chapter (#PCDATA)> +<!ATTLIST chapter id ID #IMPLIED> +]> <book> <intro id="intro"> You will enjoy this book. |
From: Oleg T. <he...@us...> - 2004-11-01 08:04:12
|
Update of /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/EdUni/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27513/v1/test/XInclude-Test-Suite/EdUni/test Modified Files: book.xml chap1.xml chap2.xml extract.xml lang-samples.xml Log Message: Adjusting test suite. Index: chap1.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/EdUni/test/chap1.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- chap1.xml 30 Oct 2004 09:56:28 -0000 1.3 +++ chap1.xml 1 Nov 2004 08:04:02 -0000 1.4 @@ -1,4 +1,5 @@ <!DOCTYPE chapter [ +<!ELEMENT chapter (#PCDATA)> <!ATTLIST chapter id ID #IMPLIED> ]> <chapter id="chap1"> Index: extract.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/EdUni/test/extract.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- extract.xml 30 Oct 2004 09:56:28 -0000 1.3 +++ extract.xml 1 Nov 2004 08:04:02 -0000 1.4 @@ -1,4 +1,5 @@ <!DOCTYPE extract [ +<!ELEMENT include (#PCDATA)> <!ATTLIST include xmlns CDATA #FIXED "http://www.w3.org/2001/XInclude"> ]> <extract> Index: lang-samples.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/EdUni/test/lang-samples.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- lang-samples.xml 19 Oct 2004 16:24:57 -0000 1.1 +++ lang-samples.xml 1 Nov 2004 08:04:02 -0000 1.2 @@ -1,4 +1,5 @@ <!DOCTYPE sentences [ +<!ELEMENT sentence (#PCDATA)> <!ATTLIST sentence id ID #IMPLIED> ]> <sentences> Index: chap2.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/EdUni/test/chap2.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- chap2.xml 30 Oct 2004 09:56:28 -0000 1.3 +++ chap2.xml 1 Nov 2004 08:04:02 -0000 1.4 @@ -1,4 +1,5 @@ <!DOCTYPE chapter [ +<!ELEMENT chapter (#PCDATA)> <!ATTLIST chapter id ID #IMPLIED> ]> <chapter id="chap2"> Index: book.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/EdUni/test/book.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- book.xml 30 Oct 2004 09:56:28 -0000 1.5 +++ book.xml 1 Nov 2004 08:04:02 -0000 1.6 @@ -1,6 +1,10 @@ <!DOCTYPE book [ +<!ELEMENT intro (#PCDATA)> +<!ELEMENT include (#PCDATA)> <!ATTLIST intro id ID #IMPLIED> <!ATTLIST include xmlns CDATA #FIXED "http://www.w3.org/2001/XInclude"> +<!ELEMENT chapter (#PCDATA)> +<!ATTLIST chapter id ID #IMPLIED> ]> <book> <intro id="intro"> |
From: Oleg T. <he...@us...> - 2004-11-01 08:04:12
|
Update of /cvsroot/mvp-xml/XInclude/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27513/v1/test Modified Files: Elliotte_Rusty_HaroldTests.cs LTG_Edinburgh_UnivTests.cs NistTests.cs Log Message: Adjusting test suite. Index: LTG_Edinburgh_UnivTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/LTG_Edinburgh_UnivTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- LTG_Edinburgh_UnivTests.cs 1 Nov 2004 05:44:44 -0000 1.3 +++ LTG_Edinburgh_UnivTests.cs 1 Nov 2004 08:04:00 -0000 1.4 @@ -46,6 +46,7 @@ /// <summary> /// Verify that xi:include elements in the target have been processed in the acquired infoset, ie before the xpointer is applied. /// </summary> + /// <remarks>XIncludingReader doesn't support </remarks> [Test] public void eduni_2() { Index: Elliotte_Rusty_HaroldTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/Elliotte_Rusty_HaroldTests.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Elliotte_Rusty_HaroldTests.cs 1 Nov 2004 05:44:44 -0000 1.5 +++ Elliotte_Rusty_HaroldTests.cs 1 Nov 2004 08:04:00 -0000 1.6 @@ -82,7 +82,9 @@ /// An include element includes its following sibling element, which has a child /// include element including the sibling element after that one. /// </summary> + /// <remarks>INTRA-DOCUMENT REFERENCES ARE NOT SUPPORTED BY THE XIncludingReader.</remarks> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_05() { RunAndCompare("marshtest.xml", "../result/marshtest.xml"); @@ -93,7 +95,9 @@ /// <summary> /// Include a document that uses XPointers to reference various parts of itself /// </summary> + /// <remarks>INTRA-DOCUMENT REFERENCES ARE NOT SUPPORTED BY THE XIncludingReader.</remarks> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_06() { RunAndCompare("includedocumentwithintradocumentreferences.xml", "../result/includedocumentwithintradocumentreferences.xml"); @@ -142,7 +146,9 @@ /// xml:base attribute is not used to resolve a missing href. /// According to RFC 2396 empty string URI always refers to the current document irrespective of base URI. /// </summary> + /// <remarks>INTRA-DOCUMENT REFERENCES ARE NOT SUPPORTED BY THE XIncludingReader.</remarks> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_10() { RunAndCompare("marshtestwithxmlbase.xml", "../result/marshtestwithxmlbase.xml"); @@ -154,7 +160,9 @@ /// <summary> /// There's no difference between href="" and no href attribute. /// </summary> + /// <remarks>INTRA-DOCUMENT REFERENCES ARE NOT SUPPORTED BY THE XIncludingReader.</remarks> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_11() { RunAndCompare("marshtestwithxmlbaseandemptyhref.xml", "../result/marshtestwithxmlbase.xml"); @@ -166,7 +174,9 @@ /// <summary> /// Make sure base URIs are preserved when including from the same document. /// </summary> + /// <remarks>INTRA-DOCUMENT REFERENCES ARE NOT SUPPORTED BY THE XIncludingReader.</remarks> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_12() { RunAndCompare("includefromsamedocumentwithbase.xml", "../result/includefromsamedocumentwithbase.xml"); @@ -177,8 +187,9 @@ /// <summary> /// Syntactically incorrect IRI is a fatal error (Eitehr I'm missing something or the spec needs to state this prinicple more clearly.) /// </summary> + /// <remarks>We treat it as resource error</remarks> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(DirectoryNotFoundException))] public void harold_13() { RunAndCompare("badiri.xml", ""); @@ -189,8 +200,9 @@ /// <summary> /// Syntactically incorrect IRI with an unrecognized scheme is a fatal error /// </summary> + /// <remarks>We treat it as resource error</remarks> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(DirectoryNotFoundException))] public void harold_14() { RunAndCompare("badiri2.xml", ""); @@ -213,7 +225,7 @@ /// accept attribute contains carriage-return/linefeed pair /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(InvalidAcceptHTTPHeaderValue))] public void harold_16() { RunAndCompare("badaccept1.xml", ""); @@ -225,7 +237,7 @@ /// accept attribute contains Latin-1 character (non-breaking space) /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(InvalidAcceptHTTPHeaderValue))] public void harold_17() { RunAndCompare("badaccept2.xml", ""); @@ -269,7 +281,9 @@ /// <summary> /// An included document can use a fallback that points into the included document /// </summary> + /// <remarks>INTRA-DOCUMENT REFERENCES ARE NOT SUPPORTED BY THE XIncludingReader.</remarks> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_21() { RunAndCompare("metafallbacktest6.xml", "../result/metafallbacktest6.xml"); @@ -292,7 +306,7 @@ /// A fallback element in an included document contains an include element with a parse attribute with an illegal value. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(UnknownParseAttributeValueException))] public void harold_23() { RunAndCompare("metafallbacktest3.xml", ""); @@ -304,7 +318,7 @@ /// A fallback element in an included document contains an include element with neither an xpointer nor an href attribute. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(MissingHrefAndXpointerException))] public void harold_24() { RunAndCompare("metafallbacktest4.xml", ""); @@ -317,7 +331,7 @@ /// A fallback element in an included document contains an include element whose href attribute has a fragment ID. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] public void harold_25() { RunAndCompare("metafallbacktestwithfragmentid.xml", ""); @@ -329,7 +343,7 @@ /// The XPointer does not select anything in the acquired infoset, but does select something in the source infoset. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_26() { RunAndCompare("metafallbacktest5.xml", ""); @@ -377,7 +391,7 @@ /// then fails to find a resource, which is a fatal error if there's no fallback. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_30() { RunAndCompare("metamissingfallbacktestwithxpointer.xml", ""); @@ -390,7 +404,7 @@ /// then fails to find a resource, but it has a fallback, which itself has an include child, which then throws a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_31() { RunAndCompare("metafallbackwithbadxpointertest.xml", ""); @@ -413,7 +427,7 @@ /// An include element points to a document that includes it, using an xpointer to select part of that document. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(CircularInclusionException))] public void harold_33() { RunAndCompare("legalcircle.xml", ""); @@ -424,7 +438,9 @@ /// <summary> /// An include element points to another include element in the same document. /// </summary> + /// <remarks>INTRA-DOCUMENT REFERENCES ARE NOT SUPPORTED BY THE XIncludingReader.</remarks> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_34() { RunAndCompare("recursewithinsamedocument.xml", "../result/recursewithinsamedocument.xml"); @@ -458,7 +474,7 @@ /// Detect an inclusion loop when an include element refers to itself /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_37() { RunAndCompare("internalcircular.xml", ""); @@ -471,7 +487,7 @@ /// in the same document /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_38() { RunAndCompare("internalcircularviaancestor.xml", ""); @@ -528,7 +544,7 @@ /// testIncludeElementsCannotHaveIncludeChildren /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void harold_43() { RunAndCompare("nestedxinclude.xml", ""); @@ -540,7 +556,7 @@ /// Include elements cannot have children from the xinclude namespace except for fallback. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void harold_44() { RunAndCompare("nestedxincludenamespace.xml", ""); @@ -552,7 +568,7 @@ /// Fallback can only be a child of xinclude element /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void harold_45() { RunAndCompare("nakedfallback.xml", ""); @@ -564,7 +580,7 @@ /// A fallback element cannot have a fallback child element. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void harold_46() { RunAndCompare("fallbackcontainsfallback.xml", ""); @@ -578,7 +594,7 @@ /// In this test the fallback is activated. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void harold_47() { RunAndCompare("multiplefallbacks.xml", ""); @@ -592,7 +608,7 @@ /// In this test the fallback is not activated. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void harold_48() { RunAndCompare("multiplefallbacks2.xml", ""); @@ -604,7 +620,7 @@ /// A document cannot include itself /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(CircularInclusionException))] public void harold_49() { RunAndCompare("circle1.xml", ""); @@ -616,7 +632,7 @@ /// Document A includes document B which includes document A /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(CircularInclusionException))] public void harold_50() { RunAndCompare("circle2a.xml", ""); @@ -628,7 +644,7 @@ /// Include element is missing an href and xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(MissingHrefAndXpointerException))] public void harold_51() { RunAndCompare("missinghref.xml", ""); @@ -640,7 +656,7 @@ /// parse attribute must have value xml or text /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(UnknownParseAttributeValueException))] public void harold_52() { RunAndCompare("badparseattribute.xml", ""); @@ -652,7 +668,7 @@ /// Missing resource is fatal when there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_53() { RunAndCompare("missingfile.xml", ""); @@ -708,7 +724,7 @@ /// XPointer that selects nothing is a resource error, and fatal because there's no fallback. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_58() { RunAndCompare("xptridtest2.xml", ""); @@ -743,7 +759,7 @@ /// the second XPointer part is still a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_61() { RunAndCompare("laterfailure.xml", ""); @@ -756,7 +772,7 @@ /// the second XPointer part is still a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_62() { RunAndCompare("laterfailure2.xml", ""); @@ -767,7 +783,9 @@ /// <summary> /// You can include another element from the same document without an href attribute. /// </summary> + /// <remarks>INTRA-DOCUMENT REFERENCES ARE NOT SUPPORTED BY THE XIncludingReader.</remarks> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_63() { RunAndCompare("onlyxpointer.xml", "../result/onlyxpointer.xml"); @@ -843,7 +861,7 @@ /// An XPointer that doesn't point to anything is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_69() { RunAndCompare("xptrtumblertest2.xml", ""); @@ -855,7 +873,7 @@ /// Syntax error in an XPointer is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_70() { RunAndCompare("badxptr.xml", ""); @@ -867,7 +885,7 @@ /// Syntax error in an XPointer is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] public void harold_71() { RunAndCompare("badxptr2.xml", ""); @@ -967,7 +985,7 @@ /// Syntax error in an XPointer is a resource error; and fatal becaue there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_80() { RunAndCompare("badxptr3.xml", ""); @@ -979,7 +997,7 @@ /// Syntax error in an XPointer is a resource error; and fatal becaue there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_81() { RunAndCompare("badxptr4.xml", ""); @@ -991,7 +1009,7 @@ /// Circular references via xpointer are fatal /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(CircularInclusionException))] public void harold_82() { RunAndCompare("circlepointer1.xml", ""); @@ -1003,7 +1021,7 @@ /// href attribute with fragment ID is a fatal error even when there's an xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] public void harold_83() { RunAndCompare("xpointeroverridesfragmentid.xml", ""); @@ -1015,7 +1033,7 @@ /// href attribute with fragment ID is a fatal error /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] public void harold_84() { RunAndCompare("ignoresfragmentid.xml", ""); @@ -1039,7 +1057,7 @@ /// syntax of fragment IDs from RFC 2396. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] public void harold_86() { RunAndCompare("meaninglessfragmentid.xml", ""); @@ -1107,7 +1125,7 @@ /// Unrecognized scheme in XPointer is a fatal error if there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_91() { RunAndCompare("unrecognizedscheme.xml", ""); @@ -1141,7 +1159,7 @@ /// Included document has an include element with neither href nor xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(MissingHrefAndXpointerException))] public void harold_94() { RunAndCompare("toplevel.xml", ""); Index: NistTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/NistTests.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- NistTests.cs 1 Nov 2004 05:44:44 -0000 1.5 +++ NistTests.cs 1 Nov 2004 08:04:00 -0000 1.6 @@ -58,7 +58,7 @@ /// element, result in fatal errors. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(UnknownParseAttributeValueException))] public void Nist_include_03() { RunAndCompare("nist-include-03.xml", ""); @@ -82,7 +82,7 @@ /// child of an xinclude element. A fatal error should be generated. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void Nist_include_05() { RunAndCompare("nist-include-05.xml", ""); @@ -118,7 +118,7 @@ /// include element. A resource error results in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void Nist_include_08() { RunAndCompare("nist-include-08.xml", ""); @@ -153,7 +153,7 @@ /// Test a resource containing non-well-formed XML. The inclusion results in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void Nist_include_11() { RunAndCompare("nist-include-11.xml", ""); @@ -165,7 +165,7 @@ /// Test that is a fatal error for an include element to contain more than one fallback elements. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void Nist_include_12() { RunAndCompare("nist-include-12.xml", ""); @@ -199,7 +199,7 @@ /// It is illegal for an include element to point to itself, when parse="xml". /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(CircularInclusionException))] public void Nist_include_15() { RunAndCompare("nist-include-15.xml", ""); @@ -222,7 +222,9 @@ /// <summary> /// Test intra-document reference within include elements. /// </summary> + /// <remarks>INTRA-DOCUMENT REFERENCES ARE NOT SUPPORTED BY THE XIncludingReader.</remarks> [Test] + [ExpectedException(typeof(FatalResourceException))] public void Nist_include_17() { RunAndCompare("nist-include-17.xml", "../../result/nist-include-17.xml"); @@ -294,7 +296,7 @@ /// Test should fail because is including more than one element. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(MalformedXInclusionResultError))] public void Nist_include_23() { RunAndCompare("nist-include-23.xml", ""); @@ -398,7 +400,7 @@ /// Including an XML document using an XPointer element scheme. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void Nist_include_32() { RunAndCompare("nist-include-32.xml", ""); @@ -410,7 +412,7 @@ /// Including an XML document using an XPointer element scheme. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void Nist_include_33() { RunAndCompare("nist-include-33.xml", ""); @@ -504,7 +506,7 @@ /// This test should result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void nist_include_41() { RunAndCompare("nist-include-41.xml", ""); @@ -518,7 +520,7 @@ /// other elements from the xinclude namespace result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void Nist_include_42() { RunAndCompare("nist-include-42.xml", ""); @@ -531,7 +533,7 @@ /// The content must be one fallback. This test should result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void Nist_include_43() { RunAndCompare("nist-include-43.xml", ""); @@ -544,7 +546,7 @@ /// This test should result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XmlException))] public void Nist_include_44() { RunAndCompare("nist-include-44.xml", ""); @@ -557,7 +559,7 @@ /// This test should result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XmlException))] public void Nist_include_45() { RunAndCompare("nist-include-45.xml", ""); @@ -570,7 +572,7 @@ /// The xinclude element may contain a fallback element; other elements from the xinclude namespace result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void Nist_include_46() { RunAndCompare("nist-include-46.xml", ""); @@ -583,7 +585,7 @@ /// The xinclude element may contain a fallback element; other elements from the xinclude namespace result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void Nist_include_47() { RunAndCompare("nist-include-47.xml", ""); @@ -660,7 +662,7 @@ /// fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(AttributeOrNamespaceInIncludeLocationError))] public void Nist_include_53() { RunAndCompare("nist-include-53.xml", ""); @@ -673,7 +675,7 @@ /// fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(AttributeOrNamespaceInIncludeLocationError))] public void Nist_include_54() { RunAndCompare("nist-include-54.xml", ""); |
From: Oleg T. <he...@us...> - 2004-11-01 05:44:54
|
Update of /cvsroot/mvp-xml/XInclude/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9467/v1/test Modified Files: Elliotte_Rusty_HaroldTests.cs EntryPoint.cs FourThoughtTests.cs LTG_Edinburgh_UnivTests.cs NistTests.cs RedhatTests.cs TestsGen.xslt XIncludeReaderTests.cs XIncludeSyntaxTests.cs XIncludeTest.csproj Log Message: Ok, no in-memory mode for XIncludingReader. Only streaming mode. Index: XIncludeTest.csproj =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeTest.csproj,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- XIncludeTest.csproj 31 Oct 2004 08:02:44 -0000 1.10 +++ XIncludeTest.csproj 1 Nov 2004 05:44:44 -0000 1.11 @@ -100,11 +100,6 @@ BuildAction = "Compile" /> <File - RelPath = "Elliotte_Rusty_HaroldTests_NS.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "EntryPoint.cs" SubType = "Code" BuildAction = "Compile" @@ -115,11 +110,6 @@ BuildAction = "Compile" /> <File - RelPath = "FourThoughtTests_NS.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "generate-tests.cmd" BuildAction = "None" /> @@ -129,31 +119,16 @@ BuildAction = "Compile" /> <File - RelPath = "LTG_Edinburgh_UnivTests_NS.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "NISTTests.cs" SubType = "Code" BuildAction = "Compile" /> <File - RelPath = "NISTTests_NS.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "RedhatTests.cs" SubType = "Code" BuildAction = "Compile" /> <File - RelPath = "RedhatTests_NS.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "TestsGen.xslt" BuildAction = "Content" /> Index: EntryPoint.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/EntryPoint.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- EntryPoint.cs 31 Oct 2004 08:02:44 -0000 1.10 +++ EntryPoint.cs 1 Nov 2004 05:44:44 -0000 1.11 @@ -12,7 +12,7 @@ //XIncludeReaderTests rt = new XIncludeReaderTests(); //LTG_Edinburgh_UnivTests rt = new LTG_Edinburgh_UnivTests(); //NistTests rt = new NistTests(); - Elliotte_Rusty_HaroldTests_NS rt = new Elliotte_Rusty_HaroldTests_NS(); + Elliotte_Rusty_HaroldTests rt = new Elliotte_Rusty_HaroldTests(); //FourThoughtTests rt = new FourThoughtTests(); //XIncludeSyntaxTests rt = new XIncludeSyntaxTests(); try Index: XIncludeSyntaxTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeSyntaxTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- XIncludeSyntaxTests.cs 28 Oct 2004 18:27:06 -0000 1.3 +++ XIncludeSyntaxTests.cs 1 Nov 2004 05:44:44 -0000 1.4 @@ -31,18 +31,6 @@ } /// <summary> - /// No href and no xpointer attribute - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(MissingHrefAndXpointerException))] - public void NoHrefAndNoXPointerAttributes_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/nohref.xml", false); - while (xir.Read()); - xir.Close(); - } - - /// <summary> /// xi:include child of xi:include. /// </summary> [Test] @@ -53,19 +41,7 @@ while (xir.Read()); xir.Close(); } - - /// <summary> - /// xi:include child of xi:include - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] - public void IncludeChildOfInclude_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/includechildofinclude.xml", false); - while (xir.Read()); - xir.Close(); - } - + /// <summary> /// xi:fallback not child of xi:include. /// </summary> @@ -77,19 +53,7 @@ while (xir.Read()); xir.Close(); } - - /// <summary> - /// xi:fallback not child of xi:include - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] - public void FallbackNotChildOfInclude_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/fallbacknotchildinclude.xml", false); - while (xir.Read()); - xir.Close(); - } - + /// <summary> /// Unknown value of parse attribute. /// </summary> @@ -103,18 +67,6 @@ } /// <summary> - /// Unknown value of parse attribute - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(UnknownParseAttributeValueException))] - public void UnknownParseAttribute_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/unknownparseattr.xml", false); - while (xir.Read()); - xir.Close(); - } - - /// <summary> /// Two xi:fallback. /// </summary> [Test] @@ -124,19 +76,6 @@ XIncludingReader xir = new XIncludingReader("../../tests/twofallbacks.xml"); while (xir.Read()); xir.Close(); - } - - /// <summary> - /// Two xi:fallback - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] - public void TwoFallbacks_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/twofallbacks.xml", false); - while (xir.Read()); - xir.Close(); - } - + } } } Index: Elliotte_Rusty_HaroldTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/Elliotte_Rusty_HaroldTests.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Elliotte_Rusty_HaroldTests.cs 31 Oct 2004 08:02:28 -0000 1.4 +++ Elliotte_Rusty_HaroldTests.cs 1 Nov 2004 05:44:44 -0000 1.5 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/Harold/test/" + source, - "../../XInclude-Test-Suite/Harold/test/" + result, false, true); + "../../XInclude-Test-Suite/Harold/test/" + result); } @@ -83,7 +83,6 @@ /// include element including the sibling element after that one. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_05() { RunAndCompare("marshtest.xml", "../result/marshtest.xml"); @@ -95,7 +94,6 @@ /// Include a document that uses XPointers to reference various parts of itself /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_06() { RunAndCompare("includedocumentwithintradocumentreferences.xml", "../result/includedocumentwithintradocumentreferences.xml"); @@ -145,7 +143,6 @@ /// According to RFC 2396 empty string URI always refers to the current document irrespective of base URI. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_10() { RunAndCompare("marshtestwithxmlbase.xml", "../result/marshtestwithxmlbase.xml"); @@ -158,7 +155,6 @@ /// There's no difference between href="" and no href attribute. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_11() { RunAndCompare("marshtestwithxmlbaseandemptyhref.xml", "../result/marshtestwithxmlbase.xml"); @@ -171,7 +167,6 @@ /// Make sure base URIs are preserved when including from the same document. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_12() { RunAndCompare("includefromsamedocumentwithbase.xml", "../result/includefromsamedocumentwithbase.xml"); @@ -182,13 +177,8 @@ /// <summary> /// Syntactically incorrect IRI is a fatal error (Eitehr I'm missing something or the spec needs to state this prinicple more clearly.) /// </summary> - /// <remarks>According to the spec: - /// "A value that results in a syntactically invalid URI or IRI should be - /// reported as a fatal error, but some implementations may find it - /// impractical to distinguish this case from a resource error." - /// We do treat it as resource error.</remarks> [Test] - [ExpectedException(typeof(DirectoryNotFoundException))] + [ExpectedException(typeof(Exception))] public void harold_13() { RunAndCompare("badiri.xml", ""); @@ -199,13 +189,8 @@ /// <summary> /// Syntactically incorrect IRI with an unrecognized scheme is a fatal error /// </summary> - /// <remarks>According to the spec: - /// "A value that results in a syntactically invalid URI or IRI should be - /// reported as a fatal error, but some implementations may find it - /// impractical to distinguish this case from a resource error." - /// We do treat it as resource error.</remarks> [Test] - [ExpectedException(typeof(DirectoryNotFoundException))] + [ExpectedException(typeof(Exception))] public void harold_14() { RunAndCompare("badiri2.xml", ""); @@ -228,7 +213,7 @@ /// accept attribute contains carriage-return/linefeed pair /// </summary> [Test] - [ExpectedException(typeof(InvalidAcceptHTTPHeaderValue))] + [ExpectedException(typeof(Exception))] public void harold_16() { RunAndCompare("badaccept1.xml", ""); @@ -240,7 +225,7 @@ /// accept attribute contains Latin-1 character (non-breaking space) /// </summary> [Test] - [ExpectedException(typeof(InvalidAcceptHTTPHeaderValue))] + [ExpectedException(typeof(Exception))] public void harold_17() { RunAndCompare("badaccept2.xml", ""); @@ -285,7 +270,6 @@ /// An included document can use a fallback that points into the included document /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_21() { RunAndCompare("metafallbacktest6.xml", "../result/metafallbacktest6.xml"); @@ -308,7 +292,7 @@ /// A fallback element in an included document contains an include element with a parse attribute with an illegal value. /// </summary> [Test] - [ExpectedException(typeof(UnknownParseAttributeValueException))] + [ExpectedException(typeof(Exception))] public void harold_23() { RunAndCompare("metafallbacktest3.xml", ""); @@ -320,7 +304,7 @@ /// A fallback element in an included document contains an include element with neither an xpointer nor an href attribute. /// </summary> [Test] - [ExpectedException(typeof(MissingHrefAndXpointerException))] + [ExpectedException(typeof(Exception))] public void harold_24() { RunAndCompare("metafallbacktest4.xml", ""); @@ -333,7 +317,7 @@ /// A fallback element in an included document contains an include element whose href attribute has a fragment ID. /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_25() { RunAndCompare("metafallbacktestwithfragmentid.xml", ""); @@ -345,7 +329,7 @@ /// The XPointer does not select anything in the acquired infoset, but does select something in the source infoset. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_26() { RunAndCompare("metafallbacktest5.xml", ""); @@ -393,7 +377,7 @@ /// then fails to find a resource, which is a fatal error if there's no fallback. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_30() { RunAndCompare("metamissingfallbacktestwithxpointer.xml", ""); @@ -406,7 +390,7 @@ /// then fails to find a resource, but it has a fallback, which itself has an include child, which then throws a fatal error. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_31() { RunAndCompare("metafallbackwithbadxpointertest.xml", ""); @@ -429,7 +413,7 @@ /// An include element points to a document that includes it, using an xpointer to select part of that document. /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_33() { RunAndCompare("legalcircle.xml", ""); @@ -441,7 +425,6 @@ /// An include element points to another include element in the same document. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_34() { RunAndCompare("recursewithinsamedocument.xml", "../result/recursewithinsamedocument.xml"); @@ -475,7 +458,7 @@ /// Detect an inclusion loop when an include element refers to itself /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_37() { RunAndCompare("internalcircular.xml", ""); @@ -488,7 +471,7 @@ /// in the same document /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_38() { RunAndCompare("internalcircularviaancestor.xml", ""); @@ -545,7 +528,7 @@ /// testIncludeElementsCannotHaveIncludeChildren /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_43() { RunAndCompare("nestedxinclude.xml", ""); @@ -557,7 +540,7 @@ /// Include elements cannot have children from the xinclude namespace except for fallback. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_44() { RunAndCompare("nestedxincludenamespace.xml", ""); @@ -569,7 +552,7 @@ /// Fallback can only be a child of xinclude element /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_45() { RunAndCompare("nakedfallback.xml", ""); @@ -581,7 +564,7 @@ /// A fallback element cannot have a fallback child element. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_46() { RunAndCompare("fallbackcontainsfallback.xml", ""); @@ -595,7 +578,7 @@ /// In this test the fallback is activated. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_47() { RunAndCompare("multiplefallbacks.xml", ""); @@ -609,7 +592,7 @@ /// In this test the fallback is not activated. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_48() { RunAndCompare("multiplefallbacks2.xml", ""); @@ -621,7 +604,7 @@ /// A document cannot include itself /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_49() { RunAndCompare("circle1.xml", ""); @@ -633,7 +616,7 @@ /// Document A includes document B which includes document A /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_50() { RunAndCompare("circle2a.xml", ""); @@ -645,7 +628,7 @@ /// Include element is missing an href and xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(MissingHrefAndXpointerException))] + [ExpectedException(typeof(Exception))] public void harold_51() { RunAndCompare("missinghref.xml", ""); @@ -657,7 +640,7 @@ /// parse attribute must have value xml or text /// </summary> [Test] - [ExpectedException(typeof(UnknownParseAttributeValueException))] + [ExpectedException(typeof(Exception))] public void harold_52() { RunAndCompare("badparseattribute.xml", ""); @@ -669,7 +652,7 @@ /// Missing resource is fatal when there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_53() { RunAndCompare("missingfile.xml", ""); @@ -725,7 +708,7 @@ /// XPointer that selects nothing is a resource error, and fatal because there's no fallback. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_58() { RunAndCompare("xptridtest2.xml", ""); @@ -760,7 +743,7 @@ /// the second XPointer part is still a fatal error. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_61() { RunAndCompare("laterfailure.xml", ""); @@ -773,7 +756,7 @@ /// the second XPointer part is still a fatal error. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_62() { RunAndCompare("laterfailure2.xml", ""); @@ -785,7 +768,6 @@ /// You can include another element from the same document without an href attribute. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] public void harold_63() { RunAndCompare("onlyxpointer.xml", "../result/onlyxpointer.xml"); @@ -861,7 +843,7 @@ /// An XPointer that doesn't point to anything is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_69() { RunAndCompare("xptrtumblertest2.xml", ""); @@ -873,7 +855,7 @@ /// Syntax error in an XPointer is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_70() { RunAndCompare("badxptr.xml", ""); @@ -885,7 +867,7 @@ /// Syntax error in an XPointer is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_71() { RunAndCompare("badxptr2.xml", ""); @@ -985,7 +967,7 @@ /// Syntax error in an XPointer is a resource error; and fatal becaue there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_80() { RunAndCompare("badxptr3.xml", ""); @@ -997,7 +979,7 @@ /// Syntax error in an XPointer is a resource error; and fatal becaue there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_81() { RunAndCompare("badxptr4.xml", ""); @@ -1009,7 +991,7 @@ /// Circular references via xpointer are fatal /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_82() { RunAndCompare("circlepointer1.xml", ""); @@ -1021,7 +1003,7 @@ /// href attribute with fragment ID is a fatal error even when there's an xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_83() { RunAndCompare("xpointeroverridesfragmentid.xml", ""); @@ -1033,7 +1015,7 @@ /// href attribute with fragment ID is a fatal error /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_84() { RunAndCompare("ignoresfragmentid.xml", ""); @@ -1057,7 +1039,7 @@ /// syntax of fragment IDs from RFC 2396. /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_86() { RunAndCompare("meaninglessfragmentid.xml", ""); @@ -1125,7 +1107,7 @@ /// Unrecognized scheme in XPointer is a fatal error if there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_91() { RunAndCompare("unrecognizedscheme.xml", ""); @@ -1159,7 +1141,7 @@ /// Included document has an include element with neither href nor xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(MissingHrefAndXpointerException))] + [ExpectedException(typeof(Exception))] public void harold_94() { RunAndCompare("toplevel.xml", ""); Index: LTG_Edinburgh_UnivTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/LTG_Edinburgh_UnivTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- LTG_Edinburgh_UnivTests.cs 30 Oct 2004 09:56:28 -0000 1.2 +++ LTG_Edinburgh_UnivTests.cs 1 Nov 2004 05:44:44 -0000 1.3 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/EdUni/test/" + source, - "../../XInclude-Test-Suite/EdUni/test/" + result, false, true); + "../../XInclude-Test-Suite/EdUni/test/" + result); } Index: FourThoughtTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/FourThoughtTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- FourThoughtTests.cs 30 Oct 2004 09:56:28 -0000 1.3 +++ FourThoughtTests.cs 1 Nov 2004 05:44:44 -0000 1.4 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/FourThought/test/XInclude/docs/" + source, - "../../XInclude-Test-Suite/FourThought/test/XInclude/docs/" + result, false, true); + "../../XInclude-Test-Suite/FourThought/test/XInclude/docs/" + result); } Index: RedhatTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/RedhatTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- RedhatTests.cs 30 Oct 2004 09:56:28 -0000 1.2 +++ RedhatTests.cs 1 Nov 2004 05:44:44 -0000 1.3 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/Imaq/test/XInclude/docs/" + source, - "../../XInclude-Test-Suite/Imaq/test/XInclude/docs/" + result, false, true); + "../../XInclude-Test-Suite/Imaq/test/XInclude/docs/" + result); } Index: TestsGen.xslt =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/TestsGen.xslt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TestsGen.xslt 31 Oct 2004 08:02:44 -0000 1.3 +++ TestsGen.xslt 1 Nov 2004 05:44:44 -0000 1.4 @@ -2,9 +2,9 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="exsl str"> <xsl:template match="testsuite"> - <xsl:apply-templates select="testcases"> + <!--<xsl:apply-templates select="testcases"> <xsl:with-param name="streaming" select="false()"/> - </xsl:apply-templates> + </xsl:apply-templates> --> <xsl:apply-templates select="testcases"> <xsl:with-param name="streaming" select="true()"/> </xsl:apply-templates> @@ -46,7 +46,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/<xsl:value-of select="@basedir"/>/" + source, - "../../XInclude-Test-Suite/<xsl:value-of select="@basedir"/>/" + result, false, <xsl:choose><xsl:when test="$streaming">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose>); + "../../XInclude-Test-Suite/<xsl:value-of select="@basedir"/>/" + result<!--, false, <xsl:choose><xsl:when test="$streaming">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose>-->); } <xsl:apply-templates/> } Index: XIncludeReaderTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeReaderTests.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- XIncludeReaderTests.cs 31 Oct 2004 08:02:44 -0000 1.11 +++ XIncludeReaderTests.cs 1 Nov 2004 05:44:44 -0000 1.12 @@ -21,39 +21,23 @@ { Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); } - - /// <summary> - /// Utility method for running tests. - /// </summary> - public static void RunAndCompare(string source, string result, bool textAsCDATA) - { - RunAndCompare(source, result, textAsCDATA, true); - } - + /// <summary> /// Utility method for running tests. /// </summary> public static void RunAndCompare(string source, string result) { - RunAndCompare(source, result, false, true); - } - - /// <summary> - /// Utility method for running tests. - /// </summary> - public static void RunAndCompareNS(string source, string result) - { - RunAndCompare(source, result, false, false); - } + RunAndCompare(source, result, false); + } /// <summary> /// Utility method for running tests. /// </summary> - public static void RunAndCompare(string source, string result, bool textAsCDATA, bool streaming) + public static void RunAndCompare(string source, string result, bool textAsCDATA) { XmlDocument doc = new XmlDocument(); doc.PreserveWhitespace = true; - XIncludingReader xir = new XIncludingReader(source, streaming); + XIncludingReader xir = new XIncludingReader(source); xir.ExposeTextInclusionsAsCDATA = textAsCDATA; // while (xir.Read()) @@ -189,15 +173,7 @@ { RunAndCompare("../../tests/document.xml", "../../results/document.xml"); } - - /// <summary> - /// General test - it should work actually - non streaming. - /// </summary> - [Test] - public void ItWorksAtLeast_NonStreaming() - { - RunAndCompareNS("../../tests/document.xml", "../../results/document.xml"); - } + /// <summary> /// Non XML character in the included document. @@ -207,17 +183,7 @@ public void NonXMLChar() { RunAndCompare("../../tests/nonxmlchar.xml", "../../results/nonxmlchar.xml"); - } - - /// <summary> - /// Non XML character in the included document - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(NonXmlCharacterException))] - public void NonXMLChar_NonStreaming() - { - RunAndCompareNS("../../tests/nonxmlchar.xml", "../../results/nonxmlchar.xml"); - } + } /// <summary> /// File not found and no fallback. @@ -227,17 +193,7 @@ public void FileNotFound() { RunAndCompare("../../tests/filenotfound.xml", "../../results/filenotfound.xml"); - } - - /// <summary> - /// File not found and no fallback - non streaming. - /// </summary> - [Test] - [ExpectedException(typeof(FatalResourceException))] - public void FileNotFound_NonStreaming() - { - RunAndCompareNS("../../tests/filenotfound.xml", "../../results/filenotfound.xml"); - } + } /// <summary> /// Includes itself by url. @@ -246,16 +202,7 @@ public void IncludesItselfByUrl() { RunAndCompare("../../tests/includesitself.xml", "../../results/includesitself.xml"); - } - - /// <summary> - /// Includes itself by url - non steraming. - /// </summary> - [Test] - public void IncludesItselfByUrl_NonStreaming() - { - RunAndCompareNS("../../tests/includesitself.xml", "../../results/includesitself.xml"); - } + } /// <summary> /// Includes itself by url - no href - as text. @@ -265,16 +212,7 @@ public void IncludesItselfNoHrefText() { RunAndCompare("../../tests/includesitself-nohref-text.xml", "../../results/includesitself-nohref-text.xml"); - } - - /// <summary> - /// Includes itself by url - no href - as text - non streaming. - /// </summary> - [Test] - public void IncludesItselfNoHrefText_NonStreaming() - { - RunAndCompareNS("../../tests/includesitself-nohref-text.xml", "../../results/includesitself-nohref-text.xml"); - } + } /// <summary> /// Text inclusion. @@ -284,16 +222,7 @@ { RunAndCompare("../../tests/working_example.xml", "../../results/working_example.xml"); } - - /// <summary> - /// Text inclusion - non streaming. - /// </summary> - [Test] - public void TextInclusion_NonStreaming() - { - RunAndCompareNS("../../tests/working_example.xml", "../../results/working_example.xml"); - } - + /// <summary> /// Text inclusion. /// </summary> @@ -301,16 +230,7 @@ public void TextInclusion2() { RunAndCompare("../../tests/working_example2.xml", "../../results/working_example2.xml"); - } - - /// <summary> - /// Text inclusion - non streaming. - /// </summary> - [Test] - public void TextInclusion2_NonStreaming() - { - RunAndCompareNS("../../tests/working_example2.xml", "../../results/working_example2.xml"); - } + } /// <summary> /// Fallback. @@ -319,17 +239,7 @@ public void Fallback() { RunAndCompare("../../tests/fallback.xml", "../../results/fallback.xml"); - } - - /// <summary> - /// Fallback - non streaming. - /// </summary> - [Test] - public void Fallback_NonStreaming() - { - RunAndCompareNS("../../tests/fallback.xml", "../../results/fallback.xml"); - } - + } /// <summary> /// XPointer. @@ -338,16 +248,7 @@ public void XPointer() { RunAndCompare("../../tests/xpointer.xml", "../../results/xpointer.xml"); - } - - /// <summary> - /// XPointer - non streaming. - /// </summary> - [Test] - public void XPointer_NonStreaming() - { - RunAndCompareNS("../../tests/xpointer.xml", "../../results/xpointer.xml"); - } + } /// <summary> /// ReadOuterXml() test. @@ -366,26 +267,7 @@ doc.Load(xir); string outerXml2 = doc.DocumentElement.OuterXml; Assert.AreEqual(outerXml, outerXml2); - } - - /// <summary> - /// ReadOuterXml() test - non streaming. - /// </summary> - [Test] - public void OuterXmlTest_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/document.xml", false); - xir.MoveToContent(); - string outerXml = xir.ReadOuterXml(); - xir.Close(); - xir = new XIncludingReader("../../tests/document.xml", false); - xir.MoveToContent(); - XmlDocument doc = new XmlDocument(); - doc.PreserveWhitespace = true; - doc.Load(xir); - string outerXml2 = doc.DocumentElement.OuterXml; - Assert.AreEqual(outerXml, outerXml2); - } + } /// <summary> /// ReadInnerXml() test. @@ -404,26 +286,7 @@ doc.Load(xir); string innerXml2 = doc.DocumentElement.InnerXml; Assert.AreEqual(innerXml, innerXml2); - } - - /// <summary> - /// ReadInnerXml() test - non streaming. - /// </summary> - [Test] - public void InnerXmlTest_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/document.xml", false); - xir.MoveToContent(); - string innerXml = xir.ReadInnerXml(); - xir.Close(); - xir = new XIncludingReader("../../tests/document.xml", false); - xir.MoveToContent(); - XmlDocument doc = new XmlDocument(); - doc.PreserveWhitespace = true; - doc.Load(xir); - string innerXml2 = doc.DocumentElement.InnerXml; - Assert.AreEqual(innerXml, innerXml2); - } + } /// <summary> /// Depth test. @@ -442,25 +305,7 @@ string expected = "00011211111111223221100"; Assert.AreEqual(sb.ToString(), expected); } - - /// <summary> - /// Depth test - non streaming. - /// </summary> - [Test] - public void DepthTest_NonStreaming() - { - XIncludingReader xir = new XIncludingReader("../../tests/document.xml", false); - StringBuilder sb = new StringBuilder(); - while (xir.Read()) - { - Console.WriteLine("{0} | {1} | {2} | {3}", - xir.NodeType, xir.Name, xir.Value, xir.Depth); - sb.Append(xir.Depth); - } - string expected = "00011211111111223221100"; - Assert.AreEqual(sb.ToString(), expected); - } - + // /// <summary> // /// Custom resolver test. // /// </summary> Index: NistTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/NistTests.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- NistTests.cs 30 Oct 2004 09:56:28 -0000 1.4 +++ NistTests.cs 1 Nov 2004 05:44:44 -0000 1.5 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/Nist/test/docs/" + source, - "../../XInclude-Test-Suite/Nist/test/docs/" + result, false, true); + "../../XInclude-Test-Suite/Nist/test/docs/" + result); } |
From: Oleg T. <he...@us...> - 2004-11-01 05:44:54
|
Update of /cvsroot/mvp-xml/XInclude/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9467/v1/src Modified Files: XIncludingReader.cs Log Message: Ok, no in-memory mode for XIncludingReader. Only streaming mode. Index: XIncludingReader.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/src/XIncludingReader.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- XIncludingReader.cs 31 Oct 2004 08:02:27 -0000 1.21 +++ XIncludingReader.cs 1 Nov 2004 05:44:44 -0000 1.22 @@ -70,11 +70,7 @@ //XmlResolver to resolve URIs XmlResolver _xmlResolver; //Expose text inclusions as CDATA - private bool _exposeTextAsCDATA; - //Work in streaming mode (no support for intra-document references) - private bool _streamingMode = true; - //Precompiled XPath expression for selecting ancestors with xml:base - private XPathExpression _selectBases; + private bool _exposeTextAsCDATA; #endregion #region Constructors @@ -82,12 +78,9 @@ /// Creates new instance of <c>XIncludingReader</c> class with /// specified underlying <c>XmlReader</c> reader. /// </summary> - /// <param name="reader">Underlying reader to read from</param> - /// <param name="streamingMode">Work in streaming mode</param> - /// <remarks>Note: intra-document references are not supported in streaming mode.</remarks> - public XIncludingReader(XmlReader reader, bool streamingMode) - { - _streamingMode = streamingMode; + /// <param name="reader">Underlying reader to read from</param> + public XIncludingReader(XmlReader reader) + { XmlTextReader xtr = reader as XmlTextReader; if (xtr != null) { @@ -98,154 +91,27 @@ ValidationCallback); _normalization = xtr.Normalization; _whiteSpaceHandling = xtr.WhitespaceHandling; - - if (_streamingMode) - _reader = vr; - else - { - //In-memory mode - _reader = CreateInMemoryReader(vr); - } + _reader = vr; } else { - if (_streamingMode) - _reader = reader; - else - { - //In-memory mode - _reader = CreateInMemoryReader(reader); - } + _reader = reader; } - _nameTable = reader.NameTable; - Init(); + _nameTable = reader.NameTable; + _keywords = new XIncludeKeywords(NameTable); + _topBaseUri = new Uri(_reader.BaseURI); + _readers = new Stack(); + _state = XIncludingReaderState.Default; } - - /// <summary> - /// Creates new instance of <c>XIncludingReader</c> class with - /// specified URL. - /// </summary> - /// <param name="url">Document location.</param> - /// <param name="streamingMode">Work in streaming mode</param> - /// <remarks>Note: intra-document references are not supported in streaming mode.</remarks> - public XIncludingReader(string url, bool streamingMode) - : this(new XmlBaseAwareXmlTextReader(url), streamingMode) {} - - /// <summary> - /// Creates new instance of <c>XIncludingReader</c> class with - /// specified URL and nametable. - /// </summary> - /// <param name="url">Document location.</param> - /// <param name="nt">Name table.</param> - /// <param name="streamingMode">Work in streaming mode</param> - /// <remarks>Note: intra-document references are not supported in streaming mode.</remarks> - public XIncludingReader(string url, XmlNameTable nt, bool streamingMode) : - this(new XmlBaseAwareXmlTextReader(url, nt), streamingMode) {} - - /// <summary> - /// Creates new instance of <c>XIncludingReader</c> class with - /// specified <c>TextReader</c> reader. - /// </summary> - /// <param name="reader"><c>TextReader</c>.</param> - /// <param name="streamingMode">Work in streaming mode</param> - /// <remarks>Note: intra-document references are not supported in streaming mode.</remarks> - public XIncludingReader(TextReader reader, bool streamingMode) - : this(new XmlBaseAwareXmlTextReader(reader), streamingMode) {} - - /// <summary> - /// Creates new instance of <c>XIncludingReader</c> class with - /// specified URL and <c>TextReader</c> reader. - /// </summary> - /// <param name="reader"><c>TextReader</c>.</param> - /// <param name="url">Source document's URL</param> - /// <param name="streamingMode">Work in streaming mode</param> - /// <remarks>Note: intra-document references are not supported in streaming mode.</remarks> - public XIncludingReader(string url, TextReader reader, bool streamingMode) - : this(new XmlBaseAwareXmlTextReader(url, reader), streamingMode) {} - - /// <summary> - /// Creates new instance of <c>XIncludingReader</c> class with - /// specified <c>TextReader</c> reader and nametable. - /// </summary> - /// <param name="reader"><c>TextReader</c>.</param> - /// <param name="nt">Nametable.</param> - /// <param name="streamingMode">Work in streaming mode</param> - /// <remarks>Note: intra-document references are not supported in streaming mode.</remarks> - public XIncludingReader(TextReader reader, XmlNameTable nt, bool streamingMode) : - this(new XmlBaseAwareXmlTextReader(reader, nt), streamingMode) {} - - /// <summary> - /// Creates new instance of <c>XIncludingReader</c> class with - /// specified URL, <c>TextReader</c> reader and nametable. - /// </summary> - /// <param name="reader"><c>TextReader</c>.</param> - /// <param name="nt">Nametable.</param> - /// <param name="url">Source document's URI</param> - /// <param name="streamingMode">Work in streaming mode</param> - /// <remarks>Note: intra-document references are not supported in streaming mode.</remarks> - public XIncludingReader(string url, TextReader reader, XmlNameTable nt, bool streamingMode) : - this(new XmlBaseAwareXmlTextReader(url, reader, nt), streamingMode) {} - - /// <summary> - /// Creates new instance of <c>XIncludingReader</c> class with - /// specified <c>Stream</c>. - /// </summary> - /// <param name="input"><c>Stream</c>.</param> - /// <param name="streamingMode">Work in streaming mode</param> - /// <remarks>Note: intra-document references are not supported in streaming mode.</remarks> - public XIncludingReader(Stream input, bool streamingMode) - : this(new XmlBaseAwareXmlTextReader(input), streamingMode) {} - - /// <summary> - /// Creates new instance of <c>XIncludingReader</c> class with - /// specified URL and <c>Stream</c>. - /// </summary> - /// <param name="input"><c>Stream</c>.</param> - /// <param name="url">Source document's URL</param> - /// <param name="streamingMode">Work in streaming mode</param> - /// <remarks>Note: intra-document references are not supported in streaming mode.</remarks> - public XIncludingReader(string url, Stream input, bool streamingMode) - : this(new XmlBaseAwareXmlTextReader(url, input), streamingMode) {} - - /// <summary> - /// Creates new instance of <c>XIncludingReader</c> class with - /// specified <c>Stream</c> and nametable. - /// </summary> - /// <param name="input"><c>Stream</c>.</param> - /// <param name="nt">Nametable</param> - /// <param name="streamingMode">Work in streaming mode</param> - /// <remarks>Note: intra-document references are not supported in streaming mode.</remarks> - public XIncludingReader(Stream input, XmlNameTable nt, bool streamingMode) : - this(new XmlBaseAwareXmlTextReader(input, nt), streamingMode) {} - - /// <summary> - /// Creates new instance of <c>XIncludingReader</c> class with - /// specified URL, <c>Stream</c> and nametable. - /// </summary> - /// <param name="input"><c>Stream</c>.</param> - /// <param name="nt">Nametable</param> - /// <param name="url">Source document's URL</param> - /// <param name="streamingMode">Work in streaming mode</param> - /// <remarks>Note: intra-document references are not supported in streaming mode.</remarks> - public XIncludingReader(string url, Stream input, XmlNameTable nt, bool streamingMode) : - this(new XmlBaseAwareXmlTextReader(url, input, nt), streamingMode) {} - - /// <summary> - /// Creates new instance of <c>XIncludingReader</c> class with - /// specified underlying <c>XmlReader</c> reader. - /// </summary> - /// <param name="reader">Underlying reader to read from.</param> - public XIncludingReader(XmlReader reader) - : this(reader, true) {} - + /// <summary> /// Creates new instance of <c>XIncludingReader</c> class with /// specified URL. /// </summary> /// <param name="url">Document location.</param> public XIncludingReader(string url) - : this(new XmlBaseAwareXmlTextReader(url), true) {} + : this(new XmlBaseAwareXmlTextReader(url)) {} /// <summary> /// Creates new instance of <c>XIncludingReader</c> class with @@ -254,7 +120,7 @@ /// <param name="url">Document location.</param> /// <param name="nt">Name table.</param> public XIncludingReader(string url, XmlNameTable nt) : - this(new XmlBaseAwareXmlTextReader(url, nt), true) {} + this(new XmlBaseAwareXmlTextReader(url, nt)) {} /// <summary> /// Creates new instance of <c>XIncludingReader</c> class with @@ -262,7 +128,7 @@ /// </summary> /// <param name="reader"><c>TextReader</c>.</param> public XIncludingReader(TextReader reader) - : this(new XmlBaseAwareXmlTextReader(reader), true) {} + : this(new XmlBaseAwareXmlTextReader(reader)) {} /// <summary> /// Creates new instance of <c>XIncludingReader</c> class with @@ -271,7 +137,7 @@ /// <param name="reader"><c>TextReader</c>.</param> /// <param name="url">Source document's URL</param> public XIncludingReader(string url, TextReader reader) - : this(new XmlBaseAwareXmlTextReader(url, reader), true) {} + : this(new XmlBaseAwareXmlTextReader(url, reader)) {} /// <summary> /// Creates new instance of <c>XIncludingReader</c> class with @@ -280,7 +146,7 @@ /// <param name="reader"><c>TextReader</c>.</param> /// <param name="nt">Nametable.</param> public XIncludingReader(TextReader reader, XmlNameTable nt) : - this(new XmlBaseAwareXmlTextReader(reader, nt), true) {} + this(new XmlBaseAwareXmlTextReader(reader, nt)) {} /// <summary> /// Creates new instance of <c>XIncludingReader</c> class with @@ -290,7 +156,7 @@ /// <param name="nt">Nametable.</param> /// <param name="url">Source document's URI</param> public XIncludingReader(string url, TextReader reader, XmlNameTable nt) : - this(new XmlBaseAwareXmlTextReader(url, reader, nt), true) {} + this(new XmlBaseAwareXmlTextReader(url, reader, nt)) {} /// <summary> /// Creates new instance of <c>XIncludingReader</c> class with @@ -298,7 +164,7 @@ /// </summary> /// <param name="input"><c>Stream</c>.</param> public XIncludingReader(Stream input) - : this(new XmlBaseAwareXmlTextReader(input), true) {} + : this(new XmlBaseAwareXmlTextReader(input)) {} /// <summary> /// Creates new instance of <c>XIncludingReader</c> class with @@ -307,7 +173,7 @@ /// <param name="input"><c>Stream</c>.</param> /// <param name="url">Source document's URL</param> public XIncludingReader(string url, Stream input) - : this(new XmlBaseAwareXmlTextReader(url, input), true) {} + : this(new XmlBaseAwareXmlTextReader(url, input)) {} /// <summary> /// Creates new instance of <c>XIncludingReader</c> class with @@ -316,7 +182,7 @@ /// <param name="input"><c>Stream</c>.</param> /// <param name="nt">Nametable</param> public XIncludingReader(Stream input, XmlNameTable nt) : - this(new XmlBaseAwareXmlTextReader(input, nt), true) {} + this(new XmlBaseAwareXmlTextReader(input, nt)) {} /// <summary> /// Creates new instance of <c>XIncludingReader</c> class with @@ -326,7 +192,7 @@ /// <param name="nt">Nametable</param> /// <param name="url">Source document's URL</param> public XIncludingReader(string url, Stream input, XmlNameTable nt) : - this(new XmlBaseAwareXmlTextReader(url, input, nt), true) {} + this(new XmlBaseAwareXmlTextReader(url, input, nt)) {} #endregion @@ -1033,16 +899,7 @@ get { return _exposeTextAsCDATA; } set { _exposeTextAsCDATA = value; } } - - /// <summary> - /// Streaming or in-memory mode (streaming by default). - /// </summary> - public bool StreamingMode - { - get { return _streamingMode; } - } - - + #endregion #region Private methods @@ -1054,17 +911,6 @@ } /// <summary> - /// Internal initializer. - /// </summary> - private void Init() - { - _keywords = new XIncludeKeywords(NameTable); - _topBaseUri = new Uri(_reader.BaseURI); - _readers = new Stack(); - _state = XIncludingReaderState.Default; - } - - /// <summary> /// Checks if given reader is positioned on a xi:include element. /// </summary> private bool IsIncludeElement(XmlReader r) @@ -1179,17 +1025,13 @@ SR.GetString("MissingHrefAndXpointerException", _reader.BaseURI.ToString())); } - //No support for intra-document refs in streaming mode - if (_streamingMode) - throw new InvalidOperationException(SR.IntradocumentReferencesNotSupported); - return ProcessIntraDocXMLInclusion(xpointer); + //No support for intra-document refs + throw new InvalidOperationException(SR.IntradocumentReferencesNotSupported); } else if (parse.Equals(_keywords.Text)) { - //No support for intra-document refs in streaming mode - if (_streamingMode) - throw new InvalidOperationException(SR.IntradocumentReferencesNotSupported); - return ProcessIntraDocTextInclusion(); + //No support for intra-document refs + throw new InvalidOperationException(SR.IntradocumentReferencesNotSupported); } } else @@ -1224,37 +1066,7 @@ try { if (_xmlResolver == null) - { - if (_streamingMode) - { - includeLocation = new Uri(new Uri(_reader.BaseURI), href, false); - } - else - { - //Reconstruct base URI - IHasXPathNavigator hasXPathNav = _reader as IHasXPathNavigator; - if (hasXPathNav != null) - { - Uri baseUri = new Uri(_reader.BaseURI); - XPathNavigator node = hasXPathNav.GetNavigator(); - if (_selectBases == null) - { - _selectBases = node.Compile("ancestor-or-self::*/@xml:base"); - XmlNamespaceManager nsm = new XmlNamespaceManager(_nameTable); - nsm.AddNamespace(_keywords.Xml, _keywords.XmlNamespace); - _selectBases.SetContext(nsm); - } - XPathNodeIterator ni = node.Select(_selectBases); - while (ni.MoveNext()) - baseUri = new Uri(baseUri, ni.Current.Value, false); - includeLocation = new Uri(baseUri, href, false); - } - else - { - throw new InvalidOperationException("WTF????"); - } - } - } + includeLocation = new Uri(new Uri(_reader.BaseURI), href, false); else includeLocation = _xmlResolver.ResolveUri(new Uri(_reader.BaseURI), href); } @@ -1456,7 +1268,7 @@ private XmlReader CreateAcquiredInfoset(string uri, Stream stream) { //TODO: Try to stream out this stuff - XIncludingReader xir = new XIncludingReader(uri, stream, _nameTable, _streamingMode); + XIncludingReader xir = new XIncludingReader(uri, stream, _nameTable); StringWriter sw = new StringWriter(); XmlTextWriter w = new XmlTextWriter(sw); try @@ -1490,32 +1302,7 @@ xir.Close(); w.Close(); return new XmlTextReader(uri, new StringReader(sw.ToString())); - } - - /// <summary> - /// Processes intra-document inclusion (no href attribute). - /// </summary> - /// <param name="xpointer">Required XPointer pointer</param> - private bool ProcessIntraDocXMLInclusion(string xpointer) - { - //Include current document as XML - CheckLoops(null, xpointer); - //No XML resolving for intra-doc references - //Push current reader to the stack - _readers.Push(_reader); - //For an intra-document reference (via xpointer attribute) - //the source infoset is used as the acquired infoset. - IHasXPathNavigator hasXPathNav = _reader as IHasXPathNavigator; - if (hasXPathNav != null) - { - XPathNavigator nav = hasXPathNav.GetNavigator(); - nav.MoveToRoot(); - _reader = new XPointerReader(nav, xpointer); - return Read(); - } - else - throw new InvalidOperationException("How on earth this could happen?"); - } + } /// <summary> /// Processes inter-document inclusion (xml mode). @@ -1549,11 +1336,8 @@ { XmlTextReader r = new XmlBaseAwareXmlTextReader(wRes.ResponseUri.AbsoluteUri, stream, _nameTable); r.Normalization = _normalization; - r.WhitespaceHandling = _whiteSpaceHandling; - if (_streamingMode) - _reader = r; - else - _reader = CreateInMemoryReader(r); + r.WhitespaceHandling = _whiteSpaceHandling; + _reader = r; } return Read(); } @@ -1603,20 +1387,9 @@ { //No XPointer if (resource is Stream) - { - XmlTextReader r = new XmlBaseAwareXmlTextReader(includeLocation.AbsoluteUri, (Stream)resource, _nameTable); - if (_streamingMode) - _reader = r; - else - _reader = CreateInMemoryReader(r); - } - else if (resource is XmlReader) - { - if (_streamingMode) - _reader = (XmlReader)resource; - else - _reader = CreateInMemoryReader((XmlReader)resource); - } + _reader = new XmlBaseAwareXmlTextReader(includeLocation.AbsoluteUri, (Stream)resource, _nameTable); + else if (resource is XmlReader) + _reader = (XmlReader)resource; else { //Unsupported type @@ -1648,67 +1421,7 @@ _exposeTextAsCDATA); return Read(); } - - /// <summary> - /// Process intra-document inclusion as text. - /// </summary> - private bool ProcessIntraDocTextInclusion() - { - //Ok, in non-streaming mode _reader must implement IHasXPathNavigator - IHasXPathNavigator hasXPathNav = _reader as IHasXPathNavigator; - if (hasXPathNav != null) - { - XPathNavigator nav = hasXPathNav.GetNavigator(); - IHasXmlNode hasXmlNode = nav as IHasXmlNode; - if (hasXmlNode != null) - { - XmlDocument currentDoc = hasXmlNode.GetNode().OwnerDocument; - //Push current reader to the stack - _readers.Push(_reader); - _reader = new TextIncludingReader(currentDoc.OuterXml, _exposeTextAsCDATA); - return Read(); - } - else - { - throw new InvalidOperationException("How this could happen?"); -// nav.MoveToRoot(); -// XPathNavigatorReader r= new XPathNavigatorReader(nav); -// r.Read(); -// //Push current reader to the stack -// _readers.Push(_reader); -// _reader = new TextIncludingReader(r.ReadOuterXml(), _exposeTextAsCDATA); -// r.Close(); -// return Read(); - } - } - else - throw new InvalidOperationException("How this could happen?"); - } - - /// <summary> - /// Creates XmlReader for non-streaming mode. - /// </summary> - /// <param name="reader">Source reader</param> - private XmlReader CreateInMemoryReader(XmlReader reader) - { - XmlReader r = null; - if (reader is XmlTextReader) - { - XmlValidatingReader vr = new XmlValidatingReader(reader); - vr.ValidationType = ValidationType.None; - vr.EntityHandling = EntityHandling.ExpandEntities; - vr.ValidationEventHandler += new ValidationEventHandler( - ValidationCallback); - r = vr; - } - else - r = reader; - XmlDocument doc = new XmlDocument(); - doc.PreserveWhitespace = true; - doc.Load(r); - r.Close(); - return new XPathNavigatorReader(doc.CreateNavigator()); - } + /// <summary> /// Checks for inclusion loops. |
From: Oleg T. <he...@us...> - 2004-10-31 09:07:27
|
Update of /cvsroot/mvp-xml/XPointer/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15144/v1/src Modified Files: Pointer.cs SchemaBasedPointer.cs ShorthandPointer.cs XPointerReader.cs Log Message: Fixing bugs. Index: Pointer.cs =================================================================== RCS file: /cvsroot/mvp-xml/XPointer/v1/src/Pointer.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Pointer.cs 9 Oct 2004 19:52:18 -0000 1.2 +++ Pointer.cs 31 Oct 2004 08:07:15 -0000 1.3 @@ -30,10 +30,10 @@ /// Evaluates <see cref="XPointer"/> pointer and returns /// iterator over pointed nodes. /// </summary> - /// <param name="doc">Document to evaluate the + /// <param name="nav">Navigator to evaluate the /// <see cref="XPointer"/> on.</param> /// <returns><see cref="XPathNodeIterator"/> over pointed nodes. Note - this iterator is moved to the first node already.</returns> - public abstract XPathNodeIterator Evaluate(IXPathNavigable doc); + public abstract XPathNodeIterator Evaluate(XPathNavigator nav); #endregion } Index: ShorthandPointer.cs =================================================================== RCS file: /cvsroot/mvp-xml/XPointer/v1/src/ShorthandPointer.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ShorthandPointer.cs 28 Oct 2004 12:55:01 -0000 1.4 +++ ShorthandPointer.cs 31 Oct 2004 08:07:15 -0000 1.5 @@ -50,12 +50,11 @@ /// iterator over pointed nodes. /// </summary> /// <remarks>Note, that returned XPathNodeIterator is already moved once.</remarks> - /// <param name="doc">Document to evaluate the + /// <param name="nav">XPathNavigator to evaluate the /// <see cref="XPointer"/> on.</param> /// <returns><see cref="XPathNodeIterator"/> over pointed nodes</returns> - public override XPathNodeIterator Evaluate(IXPathNavigable doc) - { - XPathNavigator nav = doc.CreateNavigator(); + public override XPathNodeIterator Evaluate(XPathNavigator nav) + { XPathNodeIterator result = XPathCache.Select("id('"+ _NCName + "')", nav, (XmlNamespaceManager)null); if (result != null && result.MoveNext()) { Index: SchemaBasedPointer.cs =================================================================== RCS file: /cvsroot/mvp-xml/XPointer/v1/src/SchemaBasedPointer.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- SchemaBasedPointer.cs 28 Oct 2004 12:55:01 -0000 1.4 +++ SchemaBasedPointer.cs 31 Oct 2004 08:07:15 -0000 1.5 @@ -56,13 +56,12 @@ /// Evaluates <see cref="XPointer"/> pointer and returns /// iterator over pointed nodes. /// </summary> - /// <param name="doc">Document to evaluate the + /// <param name="nav">XPathNavigator to evaluate the /// <see cref="XPointer"/> on.</param> /// <returns><see cref="XPathNodeIterator"/> over pointed nodes</returns> - public override XPathNodeIterator Evaluate(IXPathNavigable doc) + public override XPathNodeIterator Evaluate(XPathNavigator nav) { - XPathNodeIterator result; - XPathNavigator nav = doc.CreateNavigator(); + XPathNodeIterator result; XmlNamespaceManager nm = new XmlNamespaceManager(nav.NameTable); for (int i=0; i<_parts.Count; i++) { Index: XPointerReader.cs =================================================================== RCS file: /cvsroot/mvp-xml/XPointer/v1/src/XPointerReader.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- XPointerReader.cs 28 Oct 2004 18:21:23 -0000 1.6 +++ XPointerReader.cs 31 Oct 2004 08:07:15 -0000 1.7 @@ -29,10 +29,10 @@ /// <summary> /// Initializes the <c>XPointerReader</c>. /// </summary> - private void Init(IXPathNavigable doc, string xpointer) + private void Init(XPathNavigator nav, string xpointer) { Pointer pointer = XPointerParser.ParseXPointer(xpointer); - _pointedNodes = pointer.Evaluate(doc); + _pointedNodes = pointer.Evaluate(nav); //There is always at least one identified node //XPathNodeIterator is already at the first node _reader = new XPathNavigatorReader(_pointedNodes.Current); @@ -49,12 +49,19 @@ #region constructors /// <summary> - /// Creates <c>XPointerReader</c> instnace with given <see cref="IXpathNavigable"/> + /// Creates <c>XPointerReader</c> instnace with given <see cref="IXPathNavigable"/> /// and xpointer. /// </summary> public XPointerReader(IXPathNavigable doc, string xpointer) + : this (doc.CreateNavigator(), xpointer) {} + + /// <summary> + /// Creates <c>XPointerReader</c> instnace with given <see cref="XPathNavigator"/> + /// and xpointer. + /// </summary> + public XPointerReader(XPathNavigator nav, string xpointer) { - Init(doc, xpointer); + Init(nav, xpointer); } /// <summary> @@ -113,7 +120,7 @@ vr.ValidationEventHandler += new System.Xml.Schema.ValidationEventHandler(ValidationCallback); XPathDocument doc = new XPathDocument(vr, XmlSpace.Preserve); vr.Close(); - Init(doc, xpointer); + Init(doc.CreateNavigator(), xpointer); } #endregion |
From: Oleg T. <he...@us...> - 2004-10-31 09:03:08
|
Update of /cvsroot/mvp-xml/XInclude/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14200/v1/src Modified Files: SR.resx XIncludingReader.cs Log Message: Fixing bugs. Index: XIncludingReader.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/src/XIncludingReader.cs,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- XIncludingReader.cs 30 Oct 2004 09:56:27 -0000 1.20 +++ XIncludingReader.cs 31 Oct 2004 08:02:27 -0000 1.21 @@ -73,6 +73,8 @@ private bool _exposeTextAsCDATA; //Work in streaming mode (no support for intra-document references) private bool _streamingMode = true; + //Precompiled XPath expression for selecting ancestors with xml:base + private XPathExpression _selectBases; #endregion #region Constructors @@ -1221,8 +1223,38 @@ Uri includeLocation; try { - if (_xmlResolver == null) - includeLocation = new Uri(new Uri(_reader.BaseURI), href, false); + if (_xmlResolver == null) + { + if (_streamingMode) + { + includeLocation = new Uri(new Uri(_reader.BaseURI), href, false); + } + else + { + //Reconstruct base URI + IHasXPathNavigator hasXPathNav = _reader as IHasXPathNavigator; + if (hasXPathNav != null) + { + Uri baseUri = new Uri(_reader.BaseURI); + XPathNavigator node = hasXPathNav.GetNavigator(); + if (_selectBases == null) + { + _selectBases = node.Compile("ancestor-or-self::*/@xml:base"); + XmlNamespaceManager nsm = new XmlNamespaceManager(_nameTable); + nsm.AddNamespace(_keywords.Xml, _keywords.XmlNamespace); + _selectBases.SetContext(nsm); + } + XPathNodeIterator ni = node.Select(_selectBases); + while (ni.MoveNext()) + baseUri = new Uri(baseUri, ni.Current.Value, false); + includeLocation = new Uri(baseUri, href, false); + } + else + { + throw new InvalidOperationException("WTF????"); + } + } + } else includeLocation = _xmlResolver.ResolveUri(new Uri(_reader.BaseURI), href); } @@ -1424,13 +1456,21 @@ private XmlReader CreateAcquiredInfoset(string uri, Stream stream) { //TODO: Try to stream out this stuff - XIncludingReader xir = new XIncludingReader(uri, stream, _nameTable); + XIncludingReader xir = new XIncludingReader(uri, stream, _nameTable, _streamingMode); StringWriter sw = new StringWriter(); XmlTextWriter w = new XmlTextWriter(sw); - while (xir.Read()) - w.WriteNode(xir, false); - xir.Close(); - w.Close(); + try + { + while (xir.Read()) + w.WriteNode(xir, false); + } + finally + { + if (xir != null) + xir.Close(); + if (w != null) + w.Close(); + } return new XmlTextReader(uri, new StringReader(sw.ToString())); } @@ -1465,10 +1505,10 @@ _readers.Push(_reader); //For an intra-document reference (via xpointer attribute) //the source infoset is used as the acquired infoset. - IHasXPathNavigator hxn = _reader as IHasXPathNavigator; - if (_reader != null) + IHasXPathNavigator hasXPathNav = _reader as IHasXPathNavigator; + if (hasXPathNav != null) { - XPathNavigator nav = hxn.GetNavigator(); + XPathNavigator nav = hasXPathNav.GetNavigator(); nav.MoveToRoot(); _reader = new XPointerReader(nav, xpointer); return Read(); @@ -1615,20 +1655,34 @@ private bool ProcessIntraDocTextInclusion() { //Ok, in non-streaming mode _reader must implement IHasXPathNavigator - if (_reader is IHasXPathNavigator) + IHasXPathNavigator hasXPathNav = _reader as IHasXPathNavigator; + if (hasXPathNav != null) { - XPathNavigator nav = ((IHasXPathNavigator)_reader).GetNavigator(); - nav.MoveToRoot(); - XPathNavigatorReader r= new XPathNavigatorReader(nav); - r.Read(); - //Push current reader to the stack - _readers.Push(_reader); - _reader = new TextIncludingReader(r.ReadOuterXml(), _exposeTextAsCDATA); - r.Close(); - return Read(); + XPathNavigator nav = hasXPathNav.GetNavigator(); + IHasXmlNode hasXmlNode = nav as IHasXmlNode; + if (hasXmlNode != null) + { + XmlDocument currentDoc = hasXmlNode.GetNode().OwnerDocument; + //Push current reader to the stack + _readers.Push(_reader); + _reader = new TextIncludingReader(currentDoc.OuterXml, _exposeTextAsCDATA); + return Read(); + } + else + { + throw new InvalidOperationException("How this could happen?"); +// nav.MoveToRoot(); +// XPathNavigatorReader r= new XPathNavigatorReader(nav); +// r.Read(); +// //Push current reader to the stack +// _readers.Push(_reader); +// _reader = new TextIncludingReader(r.ReadOuterXml(), _exposeTextAsCDATA); +// r.Close(); +// return Read(); + } } else - throw new InvalidOperationException("How this could happen?"); + throw new InvalidOperationException("How this could happen?"); } /// <summary> @@ -1649,7 +1703,10 @@ } else r = reader; - XPathDocument doc = new XPathDocument(r, XmlSpace.Preserve); + XmlDocument doc = new XmlDocument(); + doc.PreserveWhitespace = true; + doc.Load(r); + r.Close(); return new XPathNavigatorReader(doc.CreateNavigator()); } Index: SR.resx =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/src/SR.resx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- SR.resx 28 Oct 2004 18:27:05 -0000 1.5 +++ SR.resx 31 Oct 2004 08:02:27 -0000 1.6 @@ -91,7 +91,7 @@ <value>'href' or 'xpointer' attributes can't both be omitted on xi:include element. Location: {0}, Line {1}, Position {2}.</value> </data> <data name="IntradocumentReferencesNotSupported" type="System.String" mimetype="System.String"> - <value>Intra-document references are not supported in the streaming mode.</value> + <value>Intra-document references are not supported in the streaming mode</value> </data> <data name="CustomXmlResolverError" type="System.String" mimetype="System.String"> <value>An exception has occured during GetEntity call to custom XmlResolver.</value> |
From: Oleg T. <he...@us...> - 2004-10-31 09:02:54
|
Update of /cvsroot/mvp-xml/XInclude/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14200/v1/test Modified Files: Elliotte_Rusty_HaroldTests.cs Elliotte_Rusty_HaroldTests_NS.cs EntryPoint.cs FourThoughtTests_NS.cs LTG_Edinburgh_UnivTests_NS.cs NISTTests_NS.cs RedhatTests_NS.cs TestsGen.xslt XIncludeReaderTests.cs XIncludeTest.csproj Log Message: Fixing bugs. Index: RedhatTests_NS.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/RedhatTests_NS.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- RedhatTests_NS.cs 30 Oct 2004 09:56:28 -0000 1.1 +++ RedhatTests_NS.cs 31 Oct 2004 08:02:44 -0000 1.2 @@ -13,9 +13,9 @@ /// Edinburgh University test cases from the XInclude Test suite. /// </summary> [TestFixture] - public class RedhatTests + public class RedhatTests_NS { - public RedhatTests() + public RedhatTests_NS() { Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); } Index: XIncludeTest.csproj =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeTest.csproj,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- XIncludeTest.csproj 30 Oct 2004 09:56:28 -0000 1.9 +++ XIncludeTest.csproj 31 Oct 2004 08:02:44 -0000 1.10 @@ -101,6 +101,7 @@ /> <File RelPath = "Elliotte_Rusty_HaroldTests_NS.cs" + SubType = "Code" BuildAction = "Compile" /> <File @@ -115,6 +116,7 @@ /> <File RelPath = "FourThoughtTests_NS.cs" + SubType = "Code" BuildAction = "Compile" /> <File @@ -128,6 +130,7 @@ /> <File RelPath = "LTG_Edinburgh_UnivTests_NS.cs" + SubType = "Code" BuildAction = "Compile" /> <File @@ -137,6 +140,7 @@ /> <File RelPath = "NISTTests_NS.cs" + SubType = "Code" BuildAction = "Compile" /> <File @@ -146,6 +150,7 @@ /> <File RelPath = "RedhatTests_NS.cs" + SubType = "Code" BuildAction = "Compile" /> <File Index: EntryPoint.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/EntryPoint.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- EntryPoint.cs 28 Oct 2004 18:27:05 -0000 1.9 +++ EntryPoint.cs 31 Oct 2004 08:02:44 -0000 1.10 @@ -9,15 +9,15 @@ { public static void Main() { - XIncludeReaderTests rt = new XIncludeReaderTests(); + //XIncludeReaderTests rt = new XIncludeReaderTests(); //LTG_Edinburgh_UnivTests rt = new LTG_Edinburgh_UnivTests(); //NistTests rt = new NistTests(); - //Elliotte_Rusty_HaroldTests rt = new Elliotte_Rusty_HaroldTests(); + Elliotte_Rusty_HaroldTests_NS rt = new Elliotte_Rusty_HaroldTests_NS(); //FourThoughtTests rt = new FourThoughtTests(); //XIncludeSyntaxTests rt = new XIncludeSyntaxTests(); try { - rt.IncludesItselfNoHrefText_NonStreaming(); + rt.harold_21(); } catch (Exception e) { Index: Elliotte_Rusty_HaroldTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/Elliotte_Rusty_HaroldTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Elliotte_Rusty_HaroldTests.cs 30 Oct 2004 09:56:28 -0000 1.3 +++ Elliotte_Rusty_HaroldTests.cs 31 Oct 2004 08:02:28 -0000 1.4 @@ -83,6 +83,7 @@ /// include element including the sibling element after that one. /// </summary> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_05() { RunAndCompare("marshtest.xml", "../result/marshtest.xml"); @@ -94,6 +95,7 @@ /// Include a document that uses XPointers to reference various parts of itself /// </summary> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_06() { RunAndCompare("includedocumentwithintradocumentreferences.xml", "../result/includedocumentwithintradocumentreferences.xml"); @@ -143,6 +145,7 @@ /// According to RFC 2396 empty string URI always refers to the current document irrespective of base URI. /// </summary> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_10() { RunAndCompare("marshtestwithxmlbase.xml", "../result/marshtestwithxmlbase.xml"); @@ -155,6 +158,7 @@ /// There's no difference between href="" and no href attribute. /// </summary> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_11() { RunAndCompare("marshtestwithxmlbaseandemptyhref.xml", "../result/marshtestwithxmlbase.xml"); @@ -167,6 +171,7 @@ /// Make sure base URIs are preserved when including from the same document. /// </summary> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_12() { RunAndCompare("includefromsamedocumentwithbase.xml", "../result/includefromsamedocumentwithbase.xml"); @@ -177,8 +182,13 @@ /// <summary> /// Syntactically incorrect IRI is a fatal error (Eitehr I'm missing something or the spec needs to state this prinicple more clearly.) /// </summary> + /// <remarks>According to the spec: + /// "A value that results in a syntactically invalid URI or IRI should be + /// reported as a fatal error, but some implementations may find it + /// impractical to distinguish this case from a resource error." + /// We do treat it as resource error.</remarks> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(DirectoryNotFoundException))] public void harold_13() { RunAndCompare("badiri.xml", ""); @@ -189,8 +199,13 @@ /// <summary> /// Syntactically incorrect IRI with an unrecognized scheme is a fatal error /// </summary> + /// <remarks>According to the spec: + /// "A value that results in a syntactically invalid URI or IRI should be + /// reported as a fatal error, but some implementations may find it + /// impractical to distinguish this case from a resource error." + /// We do treat it as resource error.</remarks> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(DirectoryNotFoundException))] public void harold_14() { RunAndCompare("badiri2.xml", ""); @@ -213,7 +228,7 @@ /// accept attribute contains carriage-return/linefeed pair /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(InvalidAcceptHTTPHeaderValue))] public void harold_16() { RunAndCompare("badaccept1.xml", ""); @@ -225,7 +240,7 @@ /// accept attribute contains Latin-1 character (non-breaking space) /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(InvalidAcceptHTTPHeaderValue))] public void harold_17() { RunAndCompare("badaccept2.xml", ""); @@ -270,6 +285,7 @@ /// An included document can use a fallback that points into the included document /// </summary> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_21() { RunAndCompare("metafallbacktest6.xml", "../result/metafallbacktest6.xml"); @@ -292,7 +308,7 @@ /// A fallback element in an included document contains an include element with a parse attribute with an illegal value. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(UnknownParseAttributeValueException))] public void harold_23() { RunAndCompare("metafallbacktest3.xml", ""); @@ -304,7 +320,7 @@ /// A fallback element in an included document contains an include element with neither an xpointer nor an href attribute. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(MissingHrefAndXpointerException))] public void harold_24() { RunAndCompare("metafallbacktest4.xml", ""); @@ -317,7 +333,7 @@ /// A fallback element in an included document contains an include element whose href attribute has a fragment ID. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] public void harold_25() { RunAndCompare("metafallbacktestwithfragmentid.xml", ""); @@ -329,7 +345,7 @@ /// The XPointer does not select anything in the acquired infoset, but does select something in the source infoset. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_26() { RunAndCompare("metafallbacktest5.xml", ""); @@ -377,7 +393,7 @@ /// then fails to find a resource, which is a fatal error if there's no fallback. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_30() { RunAndCompare("metamissingfallbacktestwithxpointer.xml", ""); @@ -390,7 +406,7 @@ /// then fails to find a resource, but it has a fallback, which itself has an include child, which then throws a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_31() { RunAndCompare("metafallbackwithbadxpointertest.xml", ""); @@ -413,7 +429,7 @@ /// An include element points to a document that includes it, using an xpointer to select part of that document. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(CircularInclusionException))] public void harold_33() { RunAndCompare("legalcircle.xml", ""); @@ -425,6 +441,7 @@ /// An include element points to another include element in the same document. /// </summary> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_34() { RunAndCompare("recursewithinsamedocument.xml", "../result/recursewithinsamedocument.xml"); @@ -458,7 +475,7 @@ /// Detect an inclusion loop when an include element refers to itself /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_37() { RunAndCompare("internalcircular.xml", ""); @@ -471,7 +488,7 @@ /// in the same document /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_38() { RunAndCompare("internalcircularviaancestor.xml", ""); @@ -528,7 +545,7 @@ /// testIncludeElementsCannotHaveIncludeChildren /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void harold_43() { RunAndCompare("nestedxinclude.xml", ""); @@ -540,7 +557,7 @@ /// Include elements cannot have children from the xinclude namespace except for fallback. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void harold_44() { RunAndCompare("nestedxincludenamespace.xml", ""); @@ -552,7 +569,7 @@ /// Fallback can only be a child of xinclude element /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void harold_45() { RunAndCompare("nakedfallback.xml", ""); @@ -564,7 +581,7 @@ /// A fallback element cannot have a fallback child element. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void harold_46() { RunAndCompare("fallbackcontainsfallback.xml", ""); @@ -578,7 +595,7 @@ /// In this test the fallback is activated. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void harold_47() { RunAndCompare("multiplefallbacks.xml", ""); @@ -592,7 +609,7 @@ /// In this test the fallback is not activated. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(XIncludeSyntaxError))] public void harold_48() { RunAndCompare("multiplefallbacks2.xml", ""); @@ -604,7 +621,7 @@ /// A document cannot include itself /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(CircularInclusionException))] public void harold_49() { RunAndCompare("circle1.xml", ""); @@ -616,7 +633,7 @@ /// Document A includes document B which includes document A /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(CircularInclusionException))] public void harold_50() { RunAndCompare("circle2a.xml", ""); @@ -628,7 +645,7 @@ /// Include element is missing an href and xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(MissingHrefAndXpointerException))] public void harold_51() { RunAndCompare("missinghref.xml", ""); @@ -640,7 +657,7 @@ /// parse attribute must have value xml or text /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(UnknownParseAttributeValueException))] public void harold_52() { RunAndCompare("badparseattribute.xml", ""); @@ -652,7 +669,7 @@ /// Missing resource is fatal when there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_53() { RunAndCompare("missingfile.xml", ""); @@ -708,7 +725,7 @@ /// XPointer that selects nothing is a resource error, and fatal because there's no fallback. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_58() { RunAndCompare("xptridtest2.xml", ""); @@ -743,7 +760,7 @@ /// the second XPointer part is still a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_61() { RunAndCompare("laterfailure.xml", ""); @@ -756,7 +773,7 @@ /// the second XPointer part is still a fatal error. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_62() { RunAndCompare("laterfailure2.xml", ""); @@ -768,6 +785,7 @@ /// You can include another element from the same document without an href attribute. /// </summary> [Test] + [ExpectedException(typeof(FatalResourceException))] public void harold_63() { RunAndCompare("onlyxpointer.xml", "../result/onlyxpointer.xml"); @@ -843,7 +861,7 @@ /// An XPointer that doesn't point to anything is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_69() { RunAndCompare("xptrtumblertest2.xml", ""); @@ -855,7 +873,7 @@ /// Syntax error in an XPointer is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_70() { RunAndCompare("badxptr.xml", ""); @@ -867,7 +885,7 @@ /// Syntax error in an XPointer is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] public void harold_71() { RunAndCompare("badxptr2.xml", ""); @@ -967,7 +985,7 @@ /// Syntax error in an XPointer is a resource error; and fatal becaue there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_80() { RunAndCompare("badxptr3.xml", ""); @@ -979,7 +997,7 @@ /// Syntax error in an XPointer is a resource error; and fatal becaue there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_81() { RunAndCompare("badxptr4.xml", ""); @@ -991,7 +1009,7 @@ /// Circular references via xpointer are fatal /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(CircularInclusionException))] public void harold_82() { RunAndCompare("circlepointer1.xml", ""); @@ -1003,7 +1021,7 @@ /// href attribute with fragment ID is a fatal error even when there's an xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] public void harold_83() { RunAndCompare("xpointeroverridesfragmentid.xml", ""); @@ -1015,7 +1033,7 @@ /// href attribute with fragment ID is a fatal error /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] public void harold_84() { RunAndCompare("ignoresfragmentid.xml", ""); @@ -1039,7 +1057,7 @@ /// syntax of fragment IDs from RFC 2396. /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] public void harold_86() { RunAndCompare("meaninglessfragmentid.xml", ""); @@ -1107,7 +1125,7 @@ /// Unrecognized scheme in XPointer is a fatal error if there's no fallback /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(FatalResourceException))] public void harold_91() { RunAndCompare("unrecognizedscheme.xml", ""); @@ -1141,7 +1159,7 @@ /// Included document has an include element with neither href nor xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(MissingHrefAndXpointerException))] public void harold_94() { RunAndCompare("toplevel.xml", ""); Index: FourThoughtTests_NS.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/FourThoughtTests_NS.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- FourThoughtTests_NS.cs 30 Oct 2004 09:56:28 -0000 1.1 +++ FourThoughtTests_NS.cs 31 Oct 2004 08:02:44 -0000 1.2 @@ -13,9 +13,9 @@ /// Edinburgh University test cases from the XInclude Test suite. /// </summary> [TestFixture] - public class FourThoughtTests + public class FourThoughtTests_NS { - public FourThoughtTests() + public FourThoughtTests_NS() { Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); } Index: TestsGen.xslt =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/TestsGen.xslt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TestsGen.xslt 30 Oct 2004 09:56:28 -0000 1.2 +++ TestsGen.xslt 31 Oct 2004 08:02:44 -0000 1.3 @@ -15,10 +15,9 @@ <xsl:variable name="filename"> <xsl:value-of select="$creator"/> <xsl:text>Tests</xsl:text> - <xsl:if test="not($streaming)">_NS</xsl:if> - <xsl:text>.cs</xsl:text> + <xsl:if test="not($streaming)">_NS</xsl:if> </xsl:variable> - <exsl:document href="{$filename}" method="text" encoding="UTF-8">using System; + <exsl:document href="{$filename}.cs" method="text" encoding="UTF-8">using System; using System.Diagnostics; using System.Xml; using System.IO; @@ -33,9 +32,9 @@ /// Edinburgh University test cases from the XInclude Test suite. /// </summary> [TestFixture] - public class <xsl:value-of select="$creator"/>Tests + public class <xsl:value-of select="$filename"/> { - public <xsl:value-of select="$creator"/>Tests() + public <xsl:value-of select="$filename"/>() { Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); } Index: LTG_Edinburgh_UnivTests_NS.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/LTG_Edinburgh_UnivTests_NS.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- LTG_Edinburgh_UnivTests_NS.cs 30 Oct 2004 09:56:28 -0000 1.1 +++ LTG_Edinburgh_UnivTests_NS.cs 31 Oct 2004 08:02:44 -0000 1.2 @@ -13,9 +13,9 @@ /// Edinburgh University test cases from the XInclude Test suite. /// </summary> [TestFixture] - public class LTG_Edinburgh_UnivTests + public class LTG_Edinburgh_UnivTests_NS { - public LTG_Edinburgh_UnivTests() + public LTG_Edinburgh_UnivTests_NS() { Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); } Index: NISTTests_NS.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/NISTTests_NS.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- NISTTests_NS.cs 30 Oct 2004 09:56:28 -0000 1.1 +++ NISTTests_NS.cs 31 Oct 2004 08:02:44 -0000 1.2 @@ -13,9 +13,9 @@ /// Edinburgh University test cases from the XInclude Test suite. /// </summary> [TestFixture] - public class NISTTests + public class NISTTests_NS { - public NISTTests() + public NISTTests_NS() { Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); } Index: Elliotte_Rusty_HaroldTests_NS.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/Elliotte_Rusty_HaroldTests_NS.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Elliotte_Rusty_HaroldTests_NS.cs 30 Oct 2004 09:56:28 -0000 1.1 +++ Elliotte_Rusty_HaroldTests_NS.cs 31 Oct 2004 08:02:44 -0000 1.2 @@ -13,9 +13,9 @@ /// Edinburgh University test cases from the XInclude Test suite. /// </summary> [TestFixture] - public class Elliotte_Rusty_HaroldTests + public class Elliotte_Rusty_HaroldTests_NS { - public Elliotte_Rusty_HaroldTests() + public Elliotte_Rusty_HaroldTests_NS() { Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); } @@ -177,8 +177,13 @@ /// <summary> /// Syntactically incorrect IRI is a fatal error (Eitehr I'm missing something or the spec needs to state this prinicple more clearly.) /// </summary> + /// <remarks>According to the spec: + /// "A value that results in a syntactically invalid URI or IRI should be + /// reported as a fatal error, but some implementations may find it + /// impractical to distinguish this case from a resource error." + /// We do treat it as resource error.</remarks> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(DirectoryNotFoundException))] public void harold_13() { RunAndCompare("badiri.xml", ""); @@ -189,8 +194,13 @@ /// <summary> /// Syntactically incorrect IRI with an unrecognized scheme is a fatal error /// </summary> + /// <remarks>According to the spec: + /// "A value that results in a syntactically invalid URI or IRI should be + /// reported as a fatal error, but some implementations may find it + /// impractical to distinguish this case from a resource error." + /// We do treat it as resource error.</remarks> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(DirectoryNotFoundException))] public void harold_14() { RunAndCompare("badiri2.xml", ""); @@ -213,7 +223,7 @@ /// accept attribute contains carriage-return/linefeed pair /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(InvalidAcceptHTTPHeaderValue))] public void harold_16() { RunAndCompare("badaccept1.xml", ""); @@ -225,7 +235,7 @@ /// accept attribute contains Latin-1 character (non-breaking space) /// </summary> [Test] - [ExpectedException(typeof(Exception))] + [ExpectedException(typeof(InvalidAcceptHTTPHeaderValue))] public void harold_17() { RunAndCompare("badaccept2.xml", ""); Index: XIncludeReaderTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeReaderTests.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- XIncludeReaderTests.cs 28 Oct 2004 18:27:06 -0000 1.10 +++ XIncludeReaderTests.cs 31 Oct 2004 08:02:44 -0000 1.11 @@ -54,7 +54,13 @@ XmlDocument doc = new XmlDocument(); doc.PreserveWhitespace = true; XIncludingReader xir = new XIncludingReader(source, streaming); + xir.ExposeTextInclusionsAsCDATA = textAsCDATA; +// while (xir.Read()) +// { +// Console.WriteLine("{0} | {1} | {2} | {3}", xir.NodeType, xir.Name, xir.Value, xir.IsEmptyElement); +// } +// throw new Exception(); try { doc.Load(xir); @@ -255,6 +261,7 @@ /// Includes itself by url - no href - as text. /// </summary> [Test] + [ExpectedException(typeof(FatalResourceException))] public void IncludesItselfNoHrefText() { RunAndCompare("../../tests/includesitself-nohref-text.xml", "../../results/includesitself-nohref-text.xml"); |
Update of /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/Harold/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14200/v1/test/XInclude-Test-Suite/Harold/test Modified Files: docwithid.xml docwithidandtumbler.xml marshtest.xml marshtestwithxmlbase.xml marshtestwithxmlbaseandemptyhref.xml Log Message: Fixing bugs. Index: docwithid.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/Harold/test/docwithid.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- docwithid.xml 30 Oct 2004 09:56:29 -0000 1.3 +++ docwithid.xml 31 Oct 2004 08:02:44 -0000 1.4 @@ -1,4 +1,5 @@ <!DOCTYPE test [ + <!ELEMENT p (#PCDATA)> <!ATTLIST p id ID #REQUIRED> ]> <test> Index: marshtestwithxmlbase.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/Harold/test/marshtestwithxmlbase.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- marshtestwithxmlbase.xml 19 Oct 2004 16:25:06 -0000 1.1 +++ marshtestwithxmlbase.xml 31 Oct 2004 08:02:44 -0000 1.2 @@ -1,4 +1,5 @@ <!DOCTYPE root [ + <!ELEMENT x (#PCDATA)> <!ATTLIST x id ID #IMPLIED> ]> <root xmlns:xi="http://www.w3.org/2001/XInclude" xml:base="http://www.example.org/"> Index: marshtestwithxmlbaseandemptyhref.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/Harold/test/marshtestwithxmlbaseandemptyhref.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- marshtestwithxmlbaseandemptyhref.xml 19 Oct 2004 16:25:21 -0000 1.1 +++ marshtestwithxmlbaseandemptyhref.xml 31 Oct 2004 08:02:44 -0000 1.2 @@ -1,4 +1,5 @@ <!DOCTYPE root [ + <!ELEMENT x (#PCDATA)> <!ATTLIST x id ID #IMPLIED> ]> <root xmlns:xi="http://www.w3.org/2001/XInclude" xml:base="http://www.example.org/"> Index: marshtest.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/Harold/test/marshtest.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- marshtest.xml 19 Oct 2004 16:25:06 -0000 1.1 +++ marshtest.xml 31 Oct 2004 08:02:44 -0000 1.2 @@ -1,4 +1,5 @@ <!DOCTYPE root [ + <!ELEMENT x (#PCDATA)> <!ATTLIST x id ID #IMPLIED> ]> <root xmlns:xi="http://www.w3.org/2001/XInclude"> Index: docwithidandtumbler.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/Harold/test/docwithidandtumbler.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- docwithidandtumbler.xml 30 Oct 2004 09:56:29 -0000 1.3 +++ docwithidandtumbler.xml 31 Oct 2004 08:02:44 -0000 1.4 @@ -1,4 +1,5 @@ <!DOCTYPE test [ + <!ELEMENT p (#PCDATA)> <!ATTLIST p id ID #REQUIRED> ]> <test> |
From: Oleg T. <he...@us...> - 2004-10-31 09:02:54
|
Update of /cvsroot/mvp-xml/XInclude/v1/test/results In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14200/v1/test/results Modified Files: includesitself-nohref-text.xml Log Message: Fixing bugs. Index: includesitself-nohref-text.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/results/includesitself-nohref-text.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- includesitself-nohref-text.xml 28 Oct 2004 18:27:06 -0000 1.1 +++ includesitself-nohref-text.xml 31 Oct 2004 08:02:45 -0000 1.2 @@ -1,10 +1,12 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <document xmlns:xi="http://www.w3.org/2003/XInclude"> <p>120 Mz is adequate for an average home user.</p> - <document xmlns:xi="http://www.w3.org/2003/XInclude"> + <?xml version="1.0"?> +<document xmlns:xi="http://www.w3.org/2003/XInclude"> <p>120 Mz is adequate for an average home user.</p> - <xi:include parse="text"><foo /></xi:include> + <xi:include parse="text"><foo></foo></xi:include> foo </document> + foo -</document> +</document> \ No newline at end of file |
From: Oleg T. <he...@us...> - 2004-10-30 09:56:41
|
Update of /cvsroot/mvp-xml/XInclude/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26849/v1/test Modified Files: Elliotte_Rusty_HaroldTests.cs FourThoughtTests.cs LTG_Edinburgh_UnivTests.cs NistTests.cs RedhatTests.cs TestsGen.xslt XIncludeTest.csproj Added Files: Elliotte_Rusty_HaroldTests_NS.cs FourThoughtTests_NS.cs LTG_Edinburgh_UnivTests_NS.cs NISTTests_NS.cs RedhatTests_NS.cs Log Message: Updated Test Suite and added non-streaming mode tests. --- NEW FILE: RedhatTests_NS.cs --- (This appears to be a binary file; contents omitted.) Index: XIncludeTest.csproj =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeTest.csproj,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- XIncludeTest.csproj 28 Oct 2004 18:27:06 -0000 1.8 +++ XIncludeTest.csproj 30 Oct 2004 09:56:28 -0000 1.9 @@ -100,6 +100,10 @@ BuildAction = "Compile" /> <File + RelPath = "Elliotte_Rusty_HaroldTests_NS.cs" + BuildAction = "Compile" + /> + <File RelPath = "EntryPoint.cs" SubType = "Code" BuildAction = "Compile" @@ -110,6 +114,10 @@ BuildAction = "Compile" /> <File + RelPath = "FourThoughtTests_NS.cs" + BuildAction = "Compile" + /> + <File RelPath = "generate-tests.cmd" BuildAction = "None" /> @@ -119,16 +127,28 @@ BuildAction = "Compile" /> <File + RelPath = "LTG_Edinburgh_UnivTests_NS.cs" + BuildAction = "Compile" + /> + <File RelPath = "NISTTests.cs" SubType = "Code" BuildAction = "Compile" /> <File + RelPath = "NISTTests_NS.cs" + BuildAction = "Compile" + /> + <File RelPath = "RedhatTests.cs" SubType = "Code" BuildAction = "Compile" /> <File + RelPath = "RedhatTests_NS.cs" + BuildAction = "Compile" + /> + <File RelPath = "TestsGen.xslt" BuildAction = "Content" /> Index: Elliotte_Rusty_HaroldTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/Elliotte_Rusty_HaroldTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Elliotte_Rusty_HaroldTests.cs 26 Oct 2004 19:28:43 -0000 1.2 +++ Elliotte_Rusty_HaroldTests.cs 30 Oct 2004 09:56:28 -0000 1.3 @@ -25,17 +25,9 @@ /// </summary> public static void RunAndCompare(string source, string result) { - RunAndCompare(source, result, false); - } - - /// <summary> - /// Utility method for running tests. - /// </summary> - public static void RunAndCompare(string source, string result, bool textAsCDATA) - { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/Harold/test/" + source, - "../../XInclude-Test-Suite/Harold/test/" + result, textAsCDATA); + "../../XInclude-Test-Suite/Harold/test/" + result, false, true); } @@ -185,15 +177,8 @@ /// <summary> /// Syntactically incorrect IRI is a fatal error (Eitehr I'm missing something or the spec needs to state this prinicple more clearly.) /// </summary> - /// <remarks> - /// As per spec: - /// "A value that results in a syntactically invalid URI or IRI should be - /// reported as a fatal error, but some implementations may find it - /// impractical to distinguish this case from a resource error." - /// We do treat it as a resource error. - /// </remarks> [Test] - [ExpectedException(typeof(DirectoryNotFoundException))] + [ExpectedException(typeof(Exception))] public void harold_13() { RunAndCompare("badiri.xml", ""); @@ -204,15 +189,8 @@ /// <summary> /// Syntactically incorrect IRI with an unrecognized scheme is a fatal error /// </summary> - /// <remarks> - /// As per spec: - /// "A value that results in a syntactically invalid URI or IRI should be - /// reported as a fatal error, but some implementations may find it - /// impractical to distinguish this case from a resource error." - /// We do treat it as a resource error. - /// </remarks> [Test] - [ExpectedException(typeof(DirectoryNotFoundException))] + [ExpectedException(typeof(Exception))] public void harold_14() { RunAndCompare("badiri2.xml", ""); @@ -235,7 +213,7 @@ /// accept attribute contains carriage-return/linefeed pair /// </summary> [Test] - [ExpectedException(typeof(InvalidAcceptHTTPHeaderValue))] + [ExpectedException(typeof(Exception))] public void harold_16() { RunAndCompare("badaccept1.xml", ""); @@ -247,7 +225,7 @@ /// accept attribute contains Latin-1 character (non-breaking space) /// </summary> [Test] - [ExpectedException(typeof(InvalidAcceptHTTPHeaderValue))] + [ExpectedException(typeof(Exception))] public void harold_17() { RunAndCompare("badaccept2.xml", ""); @@ -305,7 +283,7 @@ [Test] public void harold_22() { - RunAndCompare("metafallbacktest2.xml", "../result/metafallbacktest2.xml", true); + RunAndCompare("metafallbacktest2.xml", "../result/metafallbacktest2.xml"); } @@ -314,7 +292,7 @@ /// A fallback element in an included document contains an include element with a parse attribute with an illegal value. /// </summary> [Test] - [ExpectedException(typeof(UnknownParseAttributeValueException))] + [ExpectedException(typeof(Exception))] public void harold_23() { RunAndCompare("metafallbacktest3.xml", ""); @@ -326,7 +304,7 @@ /// A fallback element in an included document contains an include element with neither an xpointer nor an href attribute. /// </summary> [Test] - [ExpectedException(typeof(MissingHrefAndXpointerException))] + [ExpectedException(typeof(Exception))] public void harold_24() { RunAndCompare("metafallbacktest4.xml", ""); @@ -339,7 +317,7 @@ /// A fallback element in an included document contains an include element whose href attribute has a fragment ID. /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_25() { RunAndCompare("metafallbacktestwithfragmentid.xml", ""); @@ -351,7 +329,7 @@ /// The XPointer does not select anything in the acquired infoset, but does select something in the source infoset. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_26() { RunAndCompare("metafallbacktest5.xml", ""); @@ -399,7 +377,7 @@ /// then fails to find a resource, which is a fatal error if there's no fallback. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_30() { RunAndCompare("metamissingfallbacktestwithxpointer.xml", ""); @@ -412,7 +390,7 @@ /// then fails to find a resource, but it has a fallback, which itself has an include child, which then throws a fatal error. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_31() { RunAndCompare("metafallbackwithbadxpointertest.xml", ""); @@ -434,8 +412,8 @@ /// <summary> /// An include element points to a document that includes it, using an xpointer to select part of that document. /// </summary> - [Test] - [ExpectedException(typeof(CircularInclusionException))] + [Test] + [ExpectedException(typeof(Exception))] public void harold_33() { RunAndCompare("legalcircle.xml", ""); @@ -480,7 +458,7 @@ /// Detect an inclusion loop when an include element refers to itself /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_37() { RunAndCompare("internalcircular.xml", ""); @@ -493,7 +471,7 @@ /// in the same document /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_38() { RunAndCompare("internalcircularviaancestor.xml", ""); @@ -550,7 +528,7 @@ /// testIncludeElementsCannotHaveIncludeChildren /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_43() { RunAndCompare("nestedxinclude.xml", ""); @@ -562,7 +540,7 @@ /// Include elements cannot have children from the xinclude namespace except for fallback. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_44() { RunAndCompare("nestedxincludenamespace.xml", ""); @@ -574,7 +552,7 @@ /// Fallback can only be a child of xinclude element /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_45() { RunAndCompare("nakedfallback.xml", ""); @@ -586,7 +564,7 @@ /// A fallback element cannot have a fallback child element. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_46() { RunAndCompare("fallbackcontainsfallback.xml", ""); @@ -600,7 +578,7 @@ /// In this test the fallback is activated. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_47() { RunAndCompare("multiplefallbacks.xml", ""); @@ -614,7 +592,7 @@ /// In this test the fallback is not activated. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void harold_48() { RunAndCompare("multiplefallbacks2.xml", ""); @@ -626,7 +604,7 @@ /// A document cannot include itself /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_49() { RunAndCompare("circle1.xml", ""); @@ -638,7 +616,7 @@ /// Document A includes document B which includes document A /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_50() { RunAndCompare("circle2a.xml", ""); @@ -650,7 +628,7 @@ /// Include element is missing an href and xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(MissingHrefAndXpointerException))] + [ExpectedException(typeof(Exception))] public void harold_51() { RunAndCompare("missinghref.xml", ""); @@ -662,7 +640,7 @@ /// parse attribute must have value xml or text /// </summary> [Test] - [ExpectedException(typeof(UnknownParseAttributeValueException))] + [ExpectedException(typeof(Exception))] public void harold_52() { RunAndCompare("badparseattribute.xml", ""); @@ -674,7 +652,7 @@ /// Missing resource is fatal when there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_53() { RunAndCompare("missingfile.xml", ""); @@ -730,7 +708,7 @@ /// XPointer that selects nothing is a resource error, and fatal because there's no fallback. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_58() { RunAndCompare("xptridtest2.xml", ""); @@ -765,7 +743,7 @@ /// the second XPointer part is still a fatal error. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_61() { RunAndCompare("laterfailure.xml", ""); @@ -778,7 +756,7 @@ /// the second XPointer part is still a fatal error. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_62() { RunAndCompare("laterfailure2.xml", ""); @@ -865,7 +843,7 @@ /// An XPointer that doesn't point to anything is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_69() { RunAndCompare("xptrtumblertest2.xml", ""); @@ -877,7 +855,7 @@ /// Syntax error in an XPointer is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_70() { RunAndCompare("badxptr.xml", ""); @@ -889,7 +867,7 @@ /// Syntax error in an XPointer is a resource error; and fatal because there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_71() { RunAndCompare("badxptr2.xml", ""); @@ -989,7 +967,7 @@ /// Syntax error in an XPointer is a resource error; and fatal becaue there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_80() { RunAndCompare("badxptr3.xml", ""); @@ -1001,7 +979,7 @@ /// Syntax error in an XPointer is a resource error; and fatal becaue there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_81() { RunAndCompare("badxptr4.xml", ""); @@ -1013,7 +991,7 @@ /// Circular references via xpointer are fatal /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void harold_82() { RunAndCompare("circlepointer1.xml", ""); @@ -1025,7 +1003,7 @@ /// href attribute with fragment ID is a fatal error even when there's an xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_83() { RunAndCompare("xpointeroverridesfragmentid.xml", ""); @@ -1037,7 +1015,7 @@ /// href attribute with fragment ID is a fatal error /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_84() { RunAndCompare("ignoresfragmentid.xml", ""); @@ -1061,7 +1039,7 @@ /// syntax of fragment IDs from RFC 2396. /// </summary> [Test] - [ExpectedException(typeof(FragmentIdentifierInHrefAttribute))] + [ExpectedException(typeof(Exception))] public void harold_86() { RunAndCompare("meaninglessfragmentid.xml", ""); @@ -1120,7 +1098,7 @@ [Test] public void harold_90() { - RunAndCompare("accepthtml.xml", "../result/accepthtml.xml", true); + RunAndCompare("accepthtml.xml", "../result/accepthtml.xml"); } @@ -1129,7 +1107,7 @@ /// Unrecognized scheme in XPointer is a fatal error if there's no fallback /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void harold_91() { RunAndCompare("unrecognizedscheme.xml", ""); @@ -1163,7 +1141,7 @@ /// Included document has an include element with neither href nor xpointer attribute /// </summary> [Test] - [ExpectedException(typeof(MissingHrefAndXpointerException))] + [ExpectedException(typeof(Exception))] public void harold_94() { RunAndCompare("toplevel.xml", ""); Index: FourThoughtTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/FourThoughtTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FourThoughtTests.cs 19 Oct 2004 16:24:56 -0000 1.2 +++ FourThoughtTests.cs 30 Oct 2004 09:56:28 -0000 1.3 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/FourThought/test/XInclude/docs/" + source, - "../../XInclude-Test-Suite/FourThought/test/XInclude/docs/" + result); + "../../XInclude-Test-Suite/FourThought/test/XInclude/docs/" + result, false, true); } --- NEW FILE: FourThoughtTests_NS.cs --- (This appears to be a binary file; contents omitted.) Index: RedhatTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/RedhatTests.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- RedhatTests.cs 19 Oct 2004 16:24:56 -0000 1.1 +++ RedhatTests.cs 30 Oct 2004 09:56:28 -0000 1.2 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/Imaq/test/XInclude/docs/" + source, - "../../XInclude-Test-Suite/Imaq/test/XInclude/docs/" + result); + "../../XInclude-Test-Suite/Imaq/test/XInclude/docs/" + result, false, true); } Index: NistTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/NistTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NistTests.cs 19 Oct 2004 16:24:56 -0000 1.3 +++ NistTests.cs 30 Oct 2004 09:56:28 -0000 1.4 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/Nist/test/docs/" + source, - "../../XInclude-Test-Suite/Nist/test/docs/" + result); + "../../XInclude-Test-Suite/Nist/test/docs/" + result, false, true); } @@ -58,7 +58,7 @@ /// element, result in fatal errors. /// </summary> [Test] - [ExpectedException(typeof(UnknownParseAttributeValueException))] + [ExpectedException(typeof(Exception))] public void Nist_include_03() { RunAndCompare("nist-include-03.xml", ""); @@ -82,7 +82,7 @@ /// child of an xinclude element. A fatal error should be generated. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void Nist_include_05() { RunAndCompare("nist-include-05.xml", ""); @@ -118,7 +118,7 @@ /// include element. A resource error results in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void Nist_include_08() { RunAndCompare("nist-include-08.xml", ""); @@ -153,7 +153,7 @@ /// Test a resource containing non-well-formed XML. The inclusion results in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void Nist_include_11() { RunAndCompare("nist-include-11.xml", ""); @@ -165,7 +165,7 @@ /// Test that is a fatal error for an include element to contain more than one fallback elements. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void Nist_include_12() { RunAndCompare("nist-include-12.xml", ""); @@ -199,7 +199,7 @@ /// It is illegal for an include element to point to itself, when parse="xml". /// </summary> [Test] - [ExpectedException(typeof(CircularInclusionException))] + [ExpectedException(typeof(Exception))] public void Nist_include_15() { RunAndCompare("nist-include-15.xml", ""); @@ -294,7 +294,7 @@ /// Test should fail because is including more than one element. /// </summary> [Test] - [ExpectedException(typeof(MalformedXInclusionResultError))] + [ExpectedException(typeof(Exception))] public void Nist_include_23() { RunAndCompare("nist-include-23.xml", ""); @@ -398,7 +398,7 @@ /// Including an XML document using an XPointer element scheme. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void Nist_include_32() { RunAndCompare("nist-include-32.xml", ""); @@ -410,7 +410,7 @@ /// Including an XML document using an XPointer element scheme. /// </summary> [Test] - [ExpectedException(typeof(FatalResourceException))] + [ExpectedException(typeof(Exception))] public void Nist_include_33() { RunAndCompare("nist-include-33.xml", ""); @@ -504,7 +504,7 @@ /// This test should result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void nist_include_41() { RunAndCompare("nist-include-41.xml", ""); @@ -518,7 +518,7 @@ /// other elements from the xinclude namespace result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void Nist_include_42() { RunAndCompare("nist-include-42.xml", ""); @@ -531,7 +531,7 @@ /// The content must be one fallback. This test should result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void Nist_include_43() { RunAndCompare("nist-include-43.xml", ""); @@ -544,7 +544,7 @@ /// This test should result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(XmlException))] + [ExpectedException(typeof(Exception))] public void Nist_include_44() { RunAndCompare("nist-include-44.xml", ""); @@ -557,7 +557,7 @@ /// This test should result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(XmlException))] + [ExpectedException(typeof(Exception))] public void Nist_include_45() { RunAndCompare("nist-include-45.xml", ""); @@ -570,7 +570,7 @@ /// The xinclude element may contain a fallback element; other elements from the xinclude namespace result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void Nist_include_46() { RunAndCompare("nist-include-46.xml", ""); @@ -583,7 +583,7 @@ /// The xinclude element may contain a fallback element; other elements from the xinclude namespace result in a fatal error. /// </summary> [Test] - [ExpectedException(typeof(XIncludeSyntaxError))] + [ExpectedException(typeof(Exception))] public void Nist_include_47() { RunAndCompare("nist-include-47.xml", ""); @@ -660,7 +660,7 @@ /// fatal error. /// </summary> [Test] - [ExpectedException(typeof(AttributeOrNamespaceInIncludeLocationError))] + [ExpectedException(typeof(Exception))] public void Nist_include_53() { RunAndCompare("nist-include-53.xml", ""); @@ -673,7 +673,7 @@ /// fatal error. /// </summary> [Test] - [ExpectedException(typeof(AttributeOrNamespaceInIncludeLocationError))] + [ExpectedException(typeof(Exception))] public void Nist_include_54() { RunAndCompare("nist-include-54.xml", ""); Index: LTG_Edinburgh_UnivTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/LTG_Edinburgh_UnivTests.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- LTG_Edinburgh_UnivTests.cs 19 Oct 2004 16:24:56 -0000 1.1 +++ LTG_Edinburgh_UnivTests.cs 30 Oct 2004 09:56:28 -0000 1.2 @@ -27,7 +27,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/EdUni/test/" + source, - "../../XInclude-Test-Suite/EdUni/test/" + result); + "../../XInclude-Test-Suite/EdUni/test/" + result, false, true); } Index: TestsGen.xslt =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/TestsGen.xslt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TestsGen.xslt 19 Oct 2004 16:24:56 -0000 1.1 +++ TestsGen.xslt 30 Oct 2004 09:56:28 -0000 1.2 @@ -2,11 +2,23 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="exsl str"> <xsl:template match="testsuite"> - <xsl:apply-templates select="testcases"/> - </xsl:template> + <xsl:apply-templates select="testcases"> + <xsl:with-param name="streaming" select="false()"/> + </xsl:apply-templates> + <xsl:apply-templates select="testcases"> + <xsl:with-param name="streaming" select="true()"/> + </xsl:apply-templates> + </xsl:template> <xsl:template match="testcases"> + <xsl:param name="streaming" select="false()"/> <xsl:variable name="creator" select="translate(@creator, ' ,', '_')"/> - <exsl:document href="{$creator}Tests.cs" method="text" encoding="UTF-8">using System; + <xsl:variable name="filename"> + <xsl:value-of select="$creator"/> + <xsl:text>Tests</xsl:text> + <xsl:if test="not($streaming)">_NS</xsl:if> + <xsl:text>.cs</xsl:text> + </xsl:variable> + <exsl:document href="{$filename}" method="text" encoding="UTF-8">using System; using System.Diagnostics; using System.Xml; using System.IO; @@ -35,7 +47,7 @@ { XIncludeReaderTests.RunAndCompare( "../../XInclude-Test-Suite/<xsl:value-of select="@basedir"/>/" + source, - "../../XInclude-Test-Suite/<xsl:value-of select="@basedir"/>/" + result); + "../../XInclude-Test-Suite/<xsl:value-of select="@basedir"/>/" + result, false, <xsl:choose><xsl:when test="$streaming">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose>); } <xsl:apply-templates/> } --- NEW FILE: LTG_Edinburgh_UnivTests_NS.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: NISTTests_NS.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Elliotte_Rusty_HaroldTests_NS.cs --- (This appears to be a binary file; contents omitted.) |
From: Oleg T. <he...@us...> - 2004-10-30 09:56:40
|
Update of /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/Imaq/result/XInclude In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26849/v1/test/XInclude-Test-Suite/Imaq/result/XInclude Modified Files: docids.xml Log Message: Updated Test Suite and added non-streaming mode tests. Index: docids.xml =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XInclude-Test-Suite/Imaq/result/XInclude/docids.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- docids.xml 17 Oct 2004 21:01:12 -0000 1.2 +++ docids.xml 30 Oct 2004 09:56:29 -0000 1.3 @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!DOCTYPE book [ -<!ELEMENT book (doc*)> -<!ELEMENT doc (isid*)> +<!ELEMENT book (doc)*> +<!ELEMENT doc (isid)*> <!ELEMENT isid EMPTY> <!ATTLIST isid myid ID #IMPLIED> ]> |