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...> - 2005-10-16 15:17:48
|
Update of /cvsroot/mvp-xml/XPointer/v2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18605/v2 Removed Files: UpgradeLog.XML Log Message: --- UpgradeLog.XML DELETED --- |
From: Oleg T. <he...@us...> - 2005-10-16 15:17:16
|
Update of /cvsroot/mvp-xml/XPointer/v2/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18461/v2/test Added Files: .cvsignore EntryPoint.cs XPointerParserTests.cs XPointerReaderTests.cs XPointerTest.csproj changelog.txt northwind.dtd northwind.xml pubNS.xsd pubsNS.xml Log Message: --- NEW FILE: .cvsignore --- bin obj *.user *.suo --- NEW FILE: EntryPoint.cs --- using System; namespace Mvp.Xml.XPointer.Test { /// <summary> /// Entry point for console application. /// </summary> public class EntryPoint { public static void Main() { //XPointerParserTests pt = new XPointerParserTests(); //pt.CircumflexErrorTest(); XPointerReaderTests rt = new XPointerReaderTests(); try { rt.XSDDefnedIDTest(); } catch (Exception e) { Console.WriteLine(e); } } } } --- NEW FILE: changelog.txt --- --------------------------------------------------------- October 11, 2004 Added test XML/XSD and unit test for schema-determined IDs. --------------------------------------------------------- October 9, 2004 Added unit tests. --------------------------------------------------------- September 28, 2004 Initial setup. Will contain the project's tests. --- NEW FILE: XPointerTest.csproj --- (This appears to be a binary file; contents omitted.) --- NEW FILE: XPointerParserTests.cs --- using System; using System.Diagnostics; using Mvp.Xml.XPointer; using NUnit.Framework; namespace Mvp.Xml.XPointer.Test { /// <summary> /// Summary description for XPointerParserTests. /// </summary> [TestFixture] public class XPointerParserTests { public XPointerParserTests() { Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); } [Test] [ExpectedException(typeof(XPointerSyntaxException))] public void SyntaxErrorTest() { Pointer p = Pointer.Compile("too bad"); } [Test] public void ParenthesisTest() { Pointer p = Pointer.Compile("xmlns(p=http://foo.com^))"); p = Pointer.Compile("xmlns(p=http://foo.com^()"); } [Test] public void EscapingCircumflexTest() { Pointer p = Pointer.Compile("xmlns(p=http://foo.com^^)"); } [Test] [ExpectedException(typeof(XPointerSyntaxException))] public void CircumflexErrorTest() { Pointer p = Pointer.Compile("xmlns(p=http://fo^o.com)"); } [Test] [ExpectedException(typeof(XPointerSyntaxException))] public void BadNCName() { Pointer p = Pointer.Compile("foo:bar"); } [Test] [ExpectedException(typeof(XPointerSyntaxException))] public void BadElementPointer() { Pointer p = Pointer.Compile("element(1/33/foo)"); } [Test] public void UnknownSchemePointer() { Pointer p = Pointer.Compile("xpath1(/foo) foo(abr)"); } } } --- NEW FILE: pubsNS.xml --- <?xml version="1.0"?> <dsPubs id="123" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="pubNS.xsd"> <publishers pub_id="id07364"> <pub_name>New Moon Books</pub_name> <city>Boston</city> <state>MA</state> <country>USA</country> <titles> <title_id>BU2075</title_id> <title>You Can Combat Computer Stress!</title> <type>business </type> <pub_id>0736</pub_id> <price>2.99</price> <advance>10125</advance> <royalty>24</royalty> <ytd_sales>18722</ytd_sales> <notes>The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.</notes> <pubdate>1991-06-30T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>PS2091</title_id> <title>Is Anger the Enemy?</title> <type>psychology </type> <pub_id>0736</pub_id> <price>10.95</price> <advance>2275</advance> <royalty>12</royalty> <ytd_sales>2045</ytd_sales> <notes>Carefully researched study of the effects of strong emotions on the body. Metabolic charts included.</notes> <pubdate>1991-06-15T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>PS2106</title_id> <title>Life Without Fear</title> <type>psychology </type> <pub_id>0736</pub_id> <price>7</price> <advance>6000</advance> <royalty>10</royalty> <ytd_sales>111</ytd_sales> <notes>New exercise, meditation, and nutritional techniques that can reduce the shock of daily interactions. Popular audience. Sample menus included, exercise video available separately.</notes> <pubdate>1991-10-05T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>PS3333</title_id> <title>Prolonged Data Deprivation: Four Case Studies</title> <type>psychology </type> <pub_id>0736</pub_id> <price>19.99</price> <advance>2000</advance> <royalty>10</royalty> <ytd_sales>4072</ytd_sales> <notes>What happens when the data runs dry? Searching evaluations of information-shortage effects.</notes> <pubdate>1991-06-12T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>PS7777</title_id> <title>Emotional Security: A New Algorithm</title> <type>psychology </type> <pub_id>0736</pub_id> <price>7.99</price> <advance>4000</advance> <royalty>10</royalty> <ytd_sales>3336</ytd_sales> <notes>Protecting yourself and your loved ones from undue emotional stress in the modern world. Use of computer and nutritional aids emphasized.</notes> <pubdate>1991-06-12T00:00:00.0000000-03:00</pubdate> </titles> </publishers> <publishers pub_id="id0877"> <pub_name>Binnet & Hardley</pub_name> <city>Washington</city> <state>DC</state> <country>USA</country> <titles> <title_id>MC2222</title_id> <title>Silicon Valley Gastronomic Treats</title> <type>mod_cook </type> <pub_id>0877</pub_id> <price>19.99</price> <advance>0</advance> <royalty>12</royalty> <ytd_sales>2032</ytd_sales> <notes>Favorite recipes for quick, easy, and elegant meals.</notes> <pubdate>1991-06-09T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>MC3021</title_id> <title>The Gourmet Microwave</title> <type>mod_cook </type> <pub_id>0877</pub_id> <price>2.99</price> <advance>15000</advance> <royalty>24</royalty> <ytd_sales>22246</ytd_sales> <notes>Traditional French gourmet recipes adapted for modern microwave cooking.</notes> <pubdate>1991-06-18T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>MC3026</title_id> <title>The Psychology of Computer Cooking</title> <type>UNDECIDED </type> <pub_id>0877</pub_id> <pubdate>2000-08-06T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>PS1372</title_id> <title>Computer Phobic AND Non-Phobic Individuals: Behavior Variations</title> <type>psychology </type> <pub_id>0877</pub_id> <price>21.59</price> <advance>7000</advance> <royalty>10</royalty> <ytd_sales>375</ytd_sales> <notes>A must for the specialist, this book examines the difference between those who hate and fear computers and those who don't.</notes> <pubdate>1991-10-21T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>TC3218</title_id> <title>Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean</title> <type>trad_cook </type> <pub_id>0877</pub_id> <price>20.95</price> <advance>7000</advance> <royalty>10</royalty> <ytd_sales>375</ytd_sales> <notes>Profusely illustrated in color, this makes a wonderful gift book for a cuisine-oriented friend.</notes> <pubdate>1991-10-21T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>TC4203</title_id> <title>Fifty Years in Buckingham Palace Kitchens</title> <type>trad_cook </type> <pub_id>0877</pub_id> <price>11.95</price> <advance>4000</advance> <royalty>14</royalty> <ytd_sales>15096</ytd_sales> <notes>More anecdotes from the Queen's favorite cook describing life among English royalty. Recipes, techniques, tender vignettes.</notes> <pubdate>1991-06-12T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>TC7777</title_id> <title>Sushi, Anyone?</title> <type>trad_cook </type> <pub_id>0877</pub_id> <price>14.99</price> <advance>8000</advance> <royalty>10</royalty> <ytd_sales>4095</ytd_sales> <notes>Detailed instructions on how to make authentic Japanese sushi in your spare time.</notes> <pubdate>1991-06-12T00:00:00.0000000-03:00</pubdate> </titles> </publishers> <publishers pub_id="id1389"> <pub_name>Algodata Infosystems</pub_name> <city>Berkeley</city> <state>CA</state> <country>USA</country> <titles> <title_id>BU1032</title_id> <title>The Busy Executive's Database Guide</title> <type>business </type> <pub_id>1389</pub_id> <price>19.99</price> <advance>5000</advance> <royalty>10</royalty> <ytd_sales>4095</ytd_sales> <notes>An overview of available database systems with emphasis on common business applications. Illustrated.</notes> <pubdate>1991-06-12T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>BU1111</title_id> <title>Cooking with Computers: Surreptitious Balance Sheets</title> <type>business </type> <pub_id>1389</pub_id> <price>11.95</price> <advance>5000</advance> <royalty>10</royalty> <ytd_sales>3876</ytd_sales> <notes>Helpful hints on how to use your electronic resources to the best advantage.</notes> <pubdate>1991-06-09T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>BU7832</title_id> <title>Straight Talk About Computers</title> <type>business </type> <pub_id>1389</pub_id> <price>19.99</price> <advance>5000</advance> <royalty>10</royalty> <ytd_sales>4095</ytd_sales> <notes>Annotated analysis of what computers can do for you: a no-hype guide for the critical user.</notes> <pubdate>1991-06-22T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>PC1035</title_id> <title>But Is It User Friendly?</title> <type>popular_comp</type> <pub_id>1389</pub_id> <price>22.95</price> <advance>7000</advance> <royalty>16</royalty> <ytd_sales>8780</ytd_sales> <notes>A survey of software for the naive user, focusing on the 'friendliness' of each.</notes> <pubdate>1991-06-30T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>PC8888</title_id> <title>Secrets of Silicon Valley</title> <type>popular_comp</type> <pub_id>1389</pub_id> <price>20</price> <advance>8000</advance> <royalty>10</royalty> <ytd_sales>4095</ytd_sales> <notes>Muckraking reporting on the world's largest computer hardware and software manufacturers.</notes> <pubdate>1994-06-12T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>PC9999</title_id> <title>Net Etiquette</title> <type>popular_comp</type> <pub_id>1389</pub_id> <notes>A must-read for computer conferencing.</notes> <pubdate>2000-08-06T00:00:00.0000000-03:00</pubdate> </titles> </publishers> <publishers pub_id="id1622"> <pub_name>Five Lakes Publishing</pub_name> <city>Chicago</city> <state>IL</state> <country>USA</country> </publishers> <publishers pub_id="id1756"> <pub_name>Ramona Publishers</pub_name> <city>Dallas</city> <state>TX</state> <country>USA</country> </publishers> <publishers pub_id="id9901"> <pub_name>GGG&G</pub_name> <city>München</city> <country>Germany</country> </publishers> <publishers pub_id="id9952"> <pub_name>Scootney Books</pub_name> <city>New York</city> <state>NY</state> <country>USA</country> </publishers> <publishers pub_id="id9999"> <pub_name>Lucerne Publishing</pub_name> <city>Paris</city> <country>France</country> </publishers> <publishers pub_id="id0736"> <pub_name>New Moon Books</pub_name> <city>Boston</city> <state>MA</state> <country>USA</country> <titles> <title_id>BU2075</title_id> <title>You Can Combat Computer Stress!</title> <type>business </type> <pub_id>0736</pub_id> <price>2.99</price> <advance>10125</advance> <royalty>24</royalty> <ytd_sales>18722</ytd_sales> <notes>The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.</notes> <pubdate>1991-06-30T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>PS2091</title_id> <title>Is Anger the Enemy?</title> <type>psychology </type> <pub_id>0736</pub_id> <price>10.95</price> <advance>2275</advance> <royalty>12</royalty> <ytd_sales>2045</ytd_sales> <notes>Carefully researched study of the effects of strong emotions on the body. Metabolic charts included.</notes> <pubdate>1991-06-15T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>PS2106</title_id> <title>Life Without Fear</title> <type>psychology </type> <pub_id>0736</pub_id> <price>7</price> <advance>6000</advance> <royalty>10</royalty> <ytd_sales>111</ytd_sales> <notes>New exercise, meditation, and nutritional techniques that can reduce the shock of daily interactions. Popular audience. Sample menus included, exercise video available separately.</notes> <pubdate>1991-10-05T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>PS3333</title_id> <title>Prolonged Data Deprivation: Four Case Studies</title> <type>psychology </type> <pub_id>0736</pub_id> <price>19.99</price> <advance>2000</advance> <royalty>10</royalty> <ytd_sales>4072</ytd_sales> <notes>What happens when the data runs dry? Searching evaluations of information-shortage effects.</notes> <pubdate>1991-06-12T00:00:00.0000000-03:00</pubdate> </titles> <titles> <title_id>PS7777</title_id> <title>Emotional Security: A New Algorithm</title> <type>psychology </type> <pub_id>0736</pub_id> <price>7.99</price> <advance>4000</advance> <royalty>10</royalty> <ytd_sales>3336</ytd_sales> <notes>Protecting yourself and your loved ones from undue emotional stress in the modern world. Use of computer and nutritional aids emphasized.</notes> <pubdate>1991-06-12T00:00:00.0000000-03:00</pubdate> </titles> </publishers> </dsPubs> --- NEW FILE: northwind.xml --- (This appears to be a binary file; contents omitted.) --- NEW FILE: XPointerReaderTests.cs --- using System; using System.Xml.XPath; using System.Xml; using System.Text; using System.IO; using Mvp.Xml.Tests; using Mvp.Xml.XPointer; using NUnit.Framework; namespace Mvp.Xml.XPointer.Test { /// <summary> /// Unit tests for XPointerReader class. /// </summary> [TestFixture] public class XPointerReaderTests { /// <summary> /// xmlns() + xpath1() + namespaces works /// </summary> [Test] public void XmlNsXPath1SchemeTest() { string xptr = "xmlns(m=mvp-xml)xpath1(m:dsPubs/m:publishers[m:pub_id='1389']/m:pub_name)"; XmlReader reader = new XmlTextReader(Globals.GetResource(Globals.PubsNsResource)); XPointerReader xpr = new XPointerReader(reader, xptr); StringBuilder sb = new StringBuilder(); while (xpr.Read()) { sb.Append(xpr.ReadOuterXml()); } string expected = @"<pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name>"; Assert.AreEqual(sb.ToString(), expected); } /// <summary> /// xpath1() + namespaces doesn't work w/o xmlns() /// </summary> [Test] [ExpectedException(typeof(NoSubresourcesIdentifiedException))] public void XPath1SchemeWithoutXmlnsTest() { string xptr = "xpath1(m:dsPubs/m:publishers[m:pub_id='1389']/m:pub_name)"; XmlReader reader = new XmlTextReader(Globals.GetResource(Globals.PubsNsResource)); XPointerReader xpr = new XPointerReader(reader, xptr); StringBuilder sb = new StringBuilder(); while (xpr.Read()) { sb.Append(xpr.ReadOuterXml()); } string expected = @"<pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name>"; Assert.AreEqual(sb.ToString(), expected); } /// <summary> /// xpath1() that doesn't select a node w/o namespaces /// </summary> [Test] [ExpectedException(typeof(NoSubresourcesIdentifiedException))] public void XPath1SchemeNoSelectedNodeTest() { string xptr = "xpath1(no-such-node/foo)"; XmlReader reader = new XmlTextReader(Globals.GetResource(Globals.PubsNsResource)); XPointerReader xpr = new XPointerReader(reader, xptr); while (xpr.Read()) {} } /// <summary> /// xpath1() that returns scalar value, not a node /// </summary> [Test] [ExpectedException(typeof(NoSubresourcesIdentifiedException))] public void XPath1SchemeScalarResultTest() { string xptr = "xpath1(2+2)"; XmlReader reader = new XmlTextReader(Globals.GetResource(Globals.PubsNsResource)); XPointerReader xpr = new XPointerReader(reader, xptr); while (xpr.Read()) {} } /// <summary> /// xmlns() + xpointer() + namespaces works /// </summary> [Test] public void XmlNsXPointerSchemeTest() { string xptr = "xmlns(m=mvp-xml)xpointer(m:dsPubs/m:publishers[m:pub_id='1389']/m:pub_name)"; XmlReader reader = new XmlTextReader(Globals.GetResource(Globals.PubsNsResource)); XPointerReader xpr = new XPointerReader(reader, xptr); StringBuilder sb = new StringBuilder(); while (xpr.Read()) { sb.Append(xpr.ReadOuterXml()); } string expected = @"<pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name>"; Assert.AreEqual(sb.ToString(), expected); } /// <summary> /// xpointer() + namespaces doesn't work w/o xmlns() /// </summary> [Test] [ExpectedException(typeof(NoSubresourcesIdentifiedException))] public void XPointerSchemeWithoutXmlnsTest() { string xptr = "xpointer(m:dsPubs/m:publishers[m:pub_id='1389']/m:pub_name)"; XmlReader reader = new XmlTextReader(Globals.GetResource(Globals.PubsNsResource)); XPointerReader xpr = new XPointerReader(reader, xptr); StringBuilder sb = new StringBuilder(); while (xpr.Read()) { sb.Append(xpr.ReadOuterXml()); } string expected = @"<pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name>"; Assert.AreEqual(sb.ToString(), expected); } /// <summary> /// xpointer() that doesn't select a node w/o namespaces /// </summary> [Test] [ExpectedException(typeof(NoSubresourcesIdentifiedException))] public void XPointerSchemeNoSelectedNodeTest() { string xptr = "xpointer(no-such-node/foo)"; XmlReader reader = new XmlTextReader(Globals.GetResource(Globals.PubsNsResource)); XPointerReader xpr = new XPointerReader(reader, xptr); while (xpr.Read()) {} } /// <summary> /// xpointer() that returns scalar value, not a node /// </summary> [Test] [ExpectedException(typeof(NoSubresourcesIdentifiedException))] public void XPointerSchemeScalarResultTest() { string xptr = "xpointer(2+2)"; XmlReader reader = new XmlTextReader(Globals.GetResource(Globals.PubsNsResource)); XPointerReader xpr = new XPointerReader(reader, xptr); while (xpr.Read()) {} } /// <summary> /// superfluous xmlns() doesn't hurt /// </summary> [Test] public void SuperfluousXmlNsSchemeTest() { string xptr = "xmlns(m=mvp-xml)xpointer(dsPubs/publishers[pub_id='1389']/pub_name)"; XmlReader reader = new XmlTextReader(Globals.GetResource(Globals.PubsResource)); XPointerReader xpr = new XPointerReader(reader, xptr); StringBuilder sb = new StringBuilder(); while (xpr.Read()) { sb.Append(xpr.ReadOuterXml()); } string expected = @"<pub_name>Algodata Infosystems</pub_name>"; Assert.AreEqual(sb.ToString(), expected); } /// <summary> /// xpointer() + xmlns() + namespaces doesn't work /// </summary> [Test] [ExpectedException(typeof(NoSubresourcesIdentifiedException))] public void XmlnsAfterTest() { string xptr = "xpointer(m:dsPubs/m:publishers[m:pub_id='1389']/m:pub_name)xmlns(m=mvp-xml)"; XmlReader reader = new XmlTextReader(Globals.GetResource(Globals.PubsNsResource)); XPointerReader xpr = new XPointerReader(reader, xptr); while (xpr.Read()) {} } /// <summary> /// namespace re3efinition doesn't hurt /// </summary> [Test] public void NamespaceRedefinitionTest() { string xptr = "xmlns(m=mvp-xml)xmlns(m=http://foo.com)xmlns(m=mvp-xml)xpointer(m:dsPubs/m:publishers[m:pub_id='1389']/m:pub_name)"; XmlReader reader = new XmlTextReader(Globals.GetResource(Globals.PubsNsResource)); XPointerReader xpr = new XPointerReader(reader, xptr); StringBuilder sb = new StringBuilder(); while (xpr.Read()) { sb.Append(xpr.ReadOuterXml()); } string expected = @"<pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name><pub_name xmlns=""mvp-xml"">Algodata Infosystems</pub_name>"; Assert.AreEqual(sb.ToString(), expected); } /// <summary> /// Shorthand pointer works /// </summary> [Test] public void ShorthandTest() { string xptr = "o10535"; XmlReader reader = new XmlTextReader("../../northwind.xml"); XPointerReader xpr = new XPointerReader(reader, xptr); string expected = @"<Item orderID=""o10535""> <OrderDate> 6/13/95</OrderDate> <ShipAddress> Mataderos 2312</ShipAddress> </Item>"; while (xpr.Read()) { Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } throw new InvalidOperationException("This means shorthand XPointer didn't work as expected."); } /// <summary> /// Shorthand pointer works via stream /// </summary> [Test] public void ShorthandViaStreamTest() { string xptr = "o10535"; FileInfo file = new FileInfo("../../northwind.xml"); using (FileStream fs = file.OpenRead()) { XPointerReader xpr = new XPointerReader( new XmlTextReader(file.FullName, fs), xptr); string expected = @"<Item orderID=""o10535""> <OrderDate> 6/13/95</OrderDate> <ShipAddress> Mataderos 2312</ShipAddress> </Item>"; while (xpr.Read()) { Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } throw new InvalidOperationException("This means shorthand XPointer didn't work as expected."); } } /// <summary> /// Shorthand pointer points to nothing /// </summary> [Test] [ExpectedException(typeof(NoSubresourcesIdentifiedException))] public void ShorthandNotFoundTest() { string xptr = "no-such-id"; XmlReader reader = new XmlTextReader("../../northwind.xml"); XPointerReader xpr = new XPointerReader(reader, xptr); } /// <summary> /// element() scheme pointer works /// </summary> [Test] public void ElementSchemeTest() { string xptr = "element(o10535)"; XmlReader reader = new XmlTextReader("../../northwind.xml"); XPointerReader xpr = new XPointerReader(reader, xptr); string expected = @"<Item orderID=""o10535""> <OrderDate> 6/13/95</OrderDate> <ShipAddress> Mataderos 2312</ShipAddress> </Item>"; while (xpr.Read()) { Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> /// element() scheme pointer works /// </summary> [Test] public void ElementSchemeTest2() { string xptr = "element(o10535/1)"; XmlReader reader = new XmlTextReader("../../northwind.xml"); XPointerReader xpr = new XPointerReader(reader, xptr); string expected = @"<OrderDate> 6/13/95</OrderDate>"; while (xpr.Read()) { Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> /// element() scheme pointer works /// </summary> [Test] public void ElementSchemeTest3() { string xptr = "element(/1/1/2)"; XmlReader reader = new XmlTextReader("../../northwind.xml"); XPointerReader xpr = new XPointerReader(reader, xptr); string expected = @"<CompanyName> Alfreds Futterkiste</CompanyName>"; while (xpr.Read()) { Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> /// element() scheme pointer points to nothing /// </summary> [Test] [ExpectedException(typeof(NoSubresourcesIdentifiedException))] public void ElementSchemeNotFoundTest() { string xptr = "element(no-such-id)"; XmlReader reader = new XmlTextReader("../../northwind.xml"); XPointerReader xpr = new XPointerReader(reader, xptr); } /// <summary> /// compound pointer /// </summary> [Test] public void CompoundPointerTest() { string xptr = "xmlns(p=12345)xpath1(/no/such/node) xpointer(/and/such) element(/1/1/2) element(o10535/1)"; XmlReader reader = new XmlTextReader("../../northwind.xml"); XPointerReader xpr = new XPointerReader(reader, xptr); string expected = @"<CompanyName> Alfreds Futterkiste</CompanyName>"; while (xpr.Read()) { Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> /// Unknown scheme pointer /// </summary> [Test] public void UnknownSchemeTest() { string xptr = "dummy(foo) element(/1/1/2)"; XmlReader reader = new XmlTextReader("../../northwind.xml"); XPointerReader xpr = new XPointerReader(reader, xptr); string expected = @"<CompanyName> Alfreds Futterkiste</CompanyName>"; while (xpr.Read()) { Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> /// Unknown scheme pointer /// </summary> [Test] public void UnknownSchemeTest2() { string xptr = "foo:dummy(bar) element(/1/1/2)"; XmlReader reader = new XmlTextReader("../../northwind.xml"); XPointerReader xpr = new XPointerReader(reader, xptr); string expected = @"<CompanyName> Alfreds Futterkiste</CompanyName>"; while (xpr.Read()) { Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> /// Unknown scheme pointer /// </summary> [Test] public void UnknownSchemeTest3() { string xptr = "xmlns(foo=http://foo.com/schemas)foo:dummy(bar) element(/1/1/2)"; XmlReader reader = new XmlTextReader("../../northwind.xml"); XPointerReader xpr = new XPointerReader(reader, xptr); string expected = @"<CompanyName> Alfreds Futterkiste</CompanyName>"; while (xpr.Read()) { Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> /// XSD-defined ID /// </summary> [Test] public void XSDDefnedIDTest() { string xptr = "element(id1389/1)"; XmlReader reader = new XmlTextReader("../../pubsNS.xml"); XPointerReader xpr = new XPointerReader(reader, xptr, true); string expected = @"<pub_name>Algodata Infosystems</pub_name>"; while (xpr.Read()) { Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } throw new InvalidOperationException("This means XPointer didn't work as expected."); } } } --- NEW FILE: northwind.dtd --- (This appears to be a binary file; contents omitted.) --- NEW FILE: pubNS.xsd --- <?xml version="1.0"?> <xs:schema elementFormDefault="unqualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="dsPubs"> <xs:complexType> <xs:sequence> <xs:element ref="publishers" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="id" type="xs:string"/> </xs:complexType> </xs:element> <xs:element name="publishers"> <xs:complexType> <xs:sequence> <xs:element name="pub_name" type="xs:string"/> <xs:element name="city" type="xs:string"/> <xs:element name="state" type="xs:string" minOccurs="0"/> <xs:element name="country" type="xs:string"/> <xs:element name="titles" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="title_id" type="xs:string"/> <xs:element name="title" type="xs:string"/> <xs:element name="type" type="xs:string"/> <xs:element name="pub_id" type="xs:unsignedShort"/> <xs:element name="price" type="xs:decimal" minOccurs="0"/> <xs:element name="advance" type="xs:unsignedShort" minOccurs="0"/> <xs:element name="royalty" type="xs:unsignedByte" minOccurs="0"/> <xs:element name="ytd_sales" type="xs:unsignedShort" minOccurs="0"/> <xs:element name="notes" type="xs:string" minOccurs="0"/> <xs:element name="pubdate" type="xs:dateTime"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="pub_id" type="xs:ID"/> </xs:complexType> </xs:element> </xs:schema> |
From: Oleg T. <he...@us...> - 2005-10-16 15:17:15
|
Update of /cvsroot/mvp-xml/XPointer/v2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18461/v2 Added Files: .cvsignore UpgradeLog.XML XPointer.sln Log Message: --- NEW FILE: XPointer.sln --- Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XPointer", "src\XPointer.csproj", "{E0E9C344-ABB5-4CE9-A055-DECB508298E7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XPointerTest", "test\XPointerTest.csproj", "{79267547-881D-45DA-90B7-17CAC2EE8814}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E0E9C344-ABB5-4CE9-A055-DECB508298E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E0E9C344-ABB5-4CE9-A055-DECB508298E7}.Debug|Any CPU.Build.0 = Debug|Any CPU {E0E9C344-ABB5-4CE9-A055-DECB508298E7}.Release|Any CPU.ActiveCfg = Release|Any CPU {E0E9C344-ABB5-4CE9-A055-DECB508298E7}.Release|Any CPU.Build.0 = Release|Any CPU {79267547-881D-45DA-90B7-17CAC2EE8814}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {79267547-881D-45DA-90B7-17CAC2EE8814}.Debug|Any CPU.Build.0 = Debug|Any CPU {79267547-881D-45DA-90B7-17CAC2EE8814}.Release|Any CPU.ActiveCfg = Release|Any CPU {79267547-881D-45DA-90B7-17CAC2EE8814}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal --- NEW FILE: .cvsignore --- bin obj *.user *.suo --- NEW FILE: UpgradeLog.XML --- <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type='text/xsl' href='_UpgradeReport_Files/UpgradeReport.xslt'?><UpgradeLog> <Properties><Property Name="Solution" Value="XPointer"> </Property><Property Name="Solution File" Value="D:\projects\Mvp.Xml\XPointer\v2\XPointer.sln"> </Property><Property Name="Date" Value="Sunday, October 16, 2005"> </Property><Property Name="Time" Value="16:15 PM"> </Property></Properties><Event ErrorLevel="0" Project="XPointer" Source="src\XPointer.csproj" Description="Project converted successfully"> </Event><Event ErrorLevel="3" Project="XPointer" Source="src\XPointer.csproj" Description="Converted"> </Event><Event ErrorLevel="1" Project="D:\projects\Mvp.Xml\XPointer\v2\test\XPointerTest.csproj" Source="test\XPointerTest.csproj" Description="MSB2014: The project-to-project reference with GUID {17955FFF-E5FC-43B8-B390-86E370658CB1} cannot be converted because it is not listed in the file 'D:\projects\Mvp.Xml\XPointer\v2\XPointer.sln'."> </Event><Event ErrorLevel="0" Project="XPointerTest" Source="test\XPointerTest.csproj" Description="Project converted successfully"> </Event><Event ErrorLevel="3" Project="XPointerTest" Source="test\XPointerTest.csproj" Description="Converted"> </Event><Event ErrorLevel="0" Project="" Source="XPointer.sln" Description="Solution converted successfully"> </Event><Event ErrorLevel="3" Project="" Source="XPointer.sln" Description="Converted"> </Event><Event ErrorLevel="0" Project="XPointer" Source="src\XPointer.csproj" Description="Scan complete: Upgrade not required for project files."> </Event><Event ErrorLevel="0" Project="XPointerTest" Source="test\XPointerTest.csproj" Description="Scan complete: Upgrade not required for project files."> </Event></UpgradeLog> |
Update of /cvsroot/mvp-xml/XPointer/v2/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18461/v2/src Added Files: .cvsignore AssemblyInfo.cs ElementSchemaPointerPart.cs IDAssuredValidatingReader.cs LexUtils.cs Pointer.cs PointerPart.cs SR.cs SR.resx SchemaBasedPointer.cs ShorthandPointer.cs XPath1SchemaPointerPart.cs XPointer.csproj XPointerException.cs XPointerLexer.cs XPointerParser.cs XPointerReader.cs XPointerSchema.cs XPointerSchemaPointerPart.cs XmlnsSchemaPointerPart.cs changelog.txt Log Message: --- NEW FILE: IDAssuredValidatingReader.cs --- #region using using System.Xml; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// Auxillary XmlReader that always reports dummy DOCTYPE. This is done /// to turn on support for id() function in XML Schema defined XML documents. /// See http://www.tkachenko.com/blog/archives/000060.html. /// </summary> internal class IdAssuredValidatingReader : XmlValidatingReader { #region private members private bool _exposeDummyDoctype; private bool _isInProlog = true; #endregion #region constructors /// <summary> /// Constructs <c>IdAssuredValidatingReader</c> on top of another reader. /// </summary> /// <param name="r"></param> public IdAssuredValidatingReader(XmlReader r) : base (r) {} #endregion #region XmlValidatingReader overrides /// <summary>See <see cref="XmlValidatingReader.NodeType"/>.</summary> public override XmlNodeType NodeType { get { return _exposeDummyDoctype ? XmlNodeType.DocumentType : base.NodeType; } } /// <summary>See <see cref="XmlValidatingReader.MoveToNextAttribute"/>.</summary> public override bool MoveToNextAttribute() { return _exposeDummyDoctype? false : base.MoveToNextAttribute(); } /// <summary>See <see cref="XmlValidatingReader.Read"/>.</summary> public override bool Read() { if (_isInProlog) { if (!_exposeDummyDoctype) { //We are looking for the very first element bool baseRead = base.Read(); if (base.NodeType == XmlNodeType.Element) { _exposeDummyDoctype = true; return true; } else if (base.NodeType == XmlNodeType.DocumentType) { //Document has own DOCTYPE, switch back to normal flow _exposeDummyDoctype = false; _isInProlog = false; return true; } else { return baseRead; } } else { //Done, switch back to normal flow _exposeDummyDoctype = false; _isInProlog = false; return true; } } else return base.Read(); } #endregion } } --- NEW FILE: .cvsignore --- bin obj *.user *.suo --- NEW FILE: Pointer.cs --- #region using using System; using System.Xml; using System.Xml.XPath; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// Abstract XPointer pointer. /// </summary> public abstract class Pointer { #region public methods /// <summary> /// Parses XPointer pointer and compiles it into /// an instance of <see cref="Pointer"/> class. /// </summary> /// <param name="xpointer">XPointer pointer</param> /// <returns>Parsed and compiled XPointer</returns> public static Pointer Compile(string xpointer) { return XPointerParser.ParseXPointer(xpointer); } /// <summary> /// Evaluates <see cref="XPointer"/> pointer and returns /// iterator over pointed nodes. /// </summary> /// <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(XPathNavigator nav); #endregion } } --- NEW FILE: SchemaBasedPointer.cs --- #region using using System; using System.Collections.Generic; using System.Xml; using System.Xml.XPath; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// SchemaBased XPointer pointer. /// </summary> internal class SchemaBasedPointer : Pointer { #region private members private IList<PointerPart> _parts; private string _xpointer; #endregion #region constructors /// <summary> /// Creates scheme based XPointer given list of pointer parts. /// </summary> /// <param name="parts">List of pointer parts</param> /// <param name="xpointer">String representation of the XPointer /// (for error diagnostics)</param> public SchemaBasedPointer(IList<PointerPart> parts, string xpointer) { _parts = parts; _xpointer = xpointer; } #endregion #region Pointer overrides /// <summary> /// Evaluates <see cref="XPointer"/> pointer and returns /// iterator over pointed nodes. /// </summary> /// <param name="nav">XPathNavigator to evaluate the /// <see cref="XPointer"/> on.</param> /// <returns><see cref="XPathNodeIterator"/> over pointed nodes</returns> public override XPathNodeIterator Evaluate(XPathNavigator nav) { XPathNodeIterator result; XmlNamespaceManager nm = new XmlNamespaceManager(nav.NameTable); for (int i=0; i<_parts.Count; i++) { PointerPart part = _parts[i]; result = part.Evaluate(nav, nm); if (result != null && result.MoveNext()) return result; } throw new NoSubresourcesIdentifiedException(SR.GetString("NoSubresourcesIdentifiedException", _xpointer)); } #endregion } } --- NEW FILE: XmlnsSchemaPointerPart.cs --- #region using using System; using System.Xml; using System.Xml.XPath; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// xmlns() scheme based <see cref="XPointer"/> pointer part. /// </summary> internal class XmlnsSchemaPointerPart : PointerPart { #region private members private string _prefix, _uri; #endregion #region constructors /// <summary> /// Creates xmlns() scheme pointer part with given /// namespace prefix and namespace URI. /// </summary> /// <param name="prefix">Namespace prefix</param> /// <param name="uri">Namespace URI</param> public XmlnsSchemaPointerPart(string prefix, string uri) { _prefix = prefix; _uri = uri; } #endregion #region PointerPart overrides /// <summary> /// Evaluates <see cref="XPointer"/> pointer part and returns pointed nodes. /// </summary> /// <param name="doc">Document to evaluate pointer part on</param> /// <param name="nm">Namespace manager</param> /// <returns>Pointed nodes</returns> public override XPathNodeIterator Evaluate(XPathNavigator doc, XmlNamespaceManager nm) { nm.AddNamespace(_prefix, _uri); return null; } #endregion #region parser public static XmlnsSchemaPointerPart ParseSchemaData(XPointerLexer lexer) { //[1] XmlnsSchemeData ::= NCName S? '=' S? EscapedNamespaceName //[2] EscapedNamespaceName ::= EscapedData* //Read prefix as NCName lexer.NextLexeme(); if (lexer.Kind != XPointerLexer.LexKind.NCName) { Debug.WriteLine(SR.InvalidTokenInXmlnsSchemeWhileNCNameExpected); return null; } string prefix = lexer.NCName; lexer.SkipWhiteSpace(); lexer.NextLexeme(); if (lexer.Kind != XPointerLexer.LexKind.Eq) { Debug.WriteLine(SR.InvalidTokenInXmlnsSchemeWhileEqualsSignExpected); return null; } lexer.SkipWhiteSpace(); string nsURI; try { nsURI = lexer.ParseEscapedData(); } catch (Exception e) { throw new XPointerSyntaxException(SR.GetString("SyntaxErrorInXmlnsSchemeData", e.Message)); } return new XmlnsSchemaPointerPart(prefix, nsURI); } #endregion } } --- NEW FILE: ShorthandPointer.cs --- #region using using System; using System.Xml; using System.Xml.XPath; using Mvp.Xml.Common.XPath; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// Shorthand XPointer pointer. /// </summary> internal class ShorthandPointer : Pointer { #region private members private string _NCName; #endregion #region constructors /// <summary> /// Creates shorthand XPointer given bare name. /// </summary> /// <param name="n">Shorthand (bare name)</param> public ShorthandPointer(string n) { _NCName = n; } #endregion #region Pointer overrides /// <summary> /// Evaluates <see cref="XPointer"/> pointer and returns /// iterator over pointed nodes. /// </summary> /// <remarks>Note, that returned XPathNodeIterator is already moved once.</remarks> /// <param name="nav">XPathNavigator to evaluate the /// <see cref="XPointer"/> on.</param> /// <returns><see cref="XPathNodeIterator"/> over pointed nodes</returns> public override XPathNodeIterator Evaluate(XPathNavigator nav) { XPathNodeIterator result = XPathCache.Select("id('"+ _NCName + "')", nav, (XmlNamespaceManager)null); if (result != null && result.MoveNext()) { return result; } else throw new NoSubresourcesIdentifiedException(SR.GetString("NoSubresourcesIdentifiedException", _NCName)); } #endregion } } --- NEW FILE: changelog.txt --- --------------------------------------------------------- October 16, 2005 Ported to .NET 2.0. --------------------------------------------------------- October 11, 2004 Added optional and limited support for schema-determined IDs. --------------------------------------------------------- October 9, 2004 Changed namespace to Mvp.Xml.XPointer. Externalized strings. Did general code review and cleanup. Simplified XPointerReader, switched to XPathDocument. Optimized by using XPathCache and XPathNavigatorReader. --------------------------------------------------------- September 28, 2004 Initial setup. Will contain the project's source code. --- NEW FILE: AssemblyInfo.cs --- using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security.Permissions; [assembly: ComVisible(false)] [assembly: CLSCompliant(true)] [assembly: AssemblyTitle("Mvp.Xml.XPointer")] [assembly: AssemblyDescription("MVP XML Library - XPointer.NET Module")] [assembly: AssemblyVersion("2.0.*")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("../../../../../Global/v1/mvp-xml.snk")] [assembly: AssemblyKeyName("")] #region Security Permissions //[assembly: SecurityPermission(SecurityAction.RequestRefuse, UnmanagedCode=true)] #endregion Security Permissions --- NEW FILE: XPath1SchemaPointerPart.cs --- #region using using System; using System.Xml; using System.Xml.XPath; using Mvp.Xml.Common.XPath; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// xpath1() scheme based XPointer pointer part. /// </summary> internal class XPath1SchemaPointerPart : PointerPart { #region private members private string _xpath; #endregion #region PointerPart overrides /// <summary> /// Evaluates <see cref="XPointer"/> pointer part and returns pointed nodes. /// </summary> /// <param name="doc">Document to evaluate pointer part on</param> /// <param name="nm">Namespace manager</param> /// <returns>Pointed nodes</returns> public override XPathNodeIterator Evaluate(XPathNavigator doc, XmlNamespaceManager nm) { try { return XPathCache.Select(_xpath, doc, nm); } catch { return null; } } #endregion #region parser public static XPath1SchemaPointerPart ParseSchemaData(XPointerLexer lexer) { XPath1SchemaPointerPart part = new XPath1SchemaPointerPart(); try { part.XPath = lexer.ParseEscapedData(); } catch (Exception e) { throw new XPointerSyntaxException(SR.GetString("SyntaxErrorInXPath1SchemeData", e.Message)); } return part; } #endregion } } --- NEW FILE: SR.resx --- <?xml version="1.0" encoding="utf-8" ?> <root> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="ResMimeType"> <value>text/microsoft-resx</value> </resheader> <resheader name="Version"> <value>1.0.0.0</value> </resheader> <resheader name="Reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="Writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <data name="InvalidTokenInElementSchemeWhileNumberExpected" type="System.String" mimetype="System.String"> <value>Syntax error in element() scheme data: Invalid token in ChildSequence, a number was expected.</value> </data> <data name="ZeroIndexInElementSchemechildSequence" type="System.String" mimetype="System.String"> <value>Syntax error in element() scheme data: 0 index in ChildSequence.</value> </data> <data name="InvalidTokenInElementSchemeWhileClosingRoundBracketExpected" type="System.String" mimetype="System.String"> <value>Syntax error in element() scheme data: Invalid token in ChildSequence, a closing round bracket was expected.</value> </data> <data name="EmptyElementSchemeXPointer" type="System.String" mimetype="System.String"> <value>Syntax error in element() scheme data: empty XPointer.</value> </data> <data name="NoSubresourcesIdentifiedException" type="System.String" mimetype="System.String"> <value>XPointer '{0}' doesn't identify any subresources.</value> </data> <data name="InvalidTokenInXmlnsSchemeWhileNCNameExpected" type="System.String" mimetype="System.String"> <value>Syntax error in xmlns() scheme data: Invalid token in XmlnsSchemaData, NCName was expected.</value> </data> <data name="SyntaxErrorInXmlnsSchemeData" type="System.String" mimetype="System.String"> <value>Syntax error in xmlns() scheme data: {0}</value> </data> <data name="SyntaxErrorInXPath1SchemeData" type="System.String" mimetype="System.String"> <value>Syntax error in xpath1() scheme data: {0}</value> </data> <data name="NullXPointer" type="System.String" mimetype="System.String"> <value>XPointer pointer cannot be null.</value> </data> <data name="CircumflexCharMustBeEscaped" type="System.String" mimetype="System.String"> <value>Circumflex character must be escaped in XPointer.</value> </data> <data name="InvalidNameToken" type="System.String" mimetype="System.String"> <value>Invalid Name token: {0}:{1}.</value> </data> <data name="UnexpectedEndOfSchemeData" type="System.String" mimetype="System.String"> <value>Unexpected end of scheme data.</value> </data> <data name="UndeclaredPrefix" type="System.String" mimetype="System.String"> <value>Undeclared prefix '{0}'.</value> </data> <data name="InvalidTokenAfterShorthandPointer" type="System.String" mimetype="System.String"> <value>Invalid token after shorthand pointer.</value> </data> <data name="InvalidToken" type="System.String" mimetype="System.String"> <value>Invalid token.</value> </data> <data name="SyntaxErrorInXPointerSchemeData" type="System.String" mimetype="System.String"> <value>Syntax error in xpointer() scheme data: {0}</value> </data> </root> --- NEW FILE: XPointerSchema.cs --- #region using using System; using System.Collections.Generic; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// XPointer scheme. /// </summary> internal class XPointerSchema { #region public members public enum SchemaType { Element, Xmlns, XPath1, XPointer, Unknown } public static IDictionary<string, SchemaType> Schemas = CreateSchemasTable(); private static IDictionary<string, SchemaType> CreateSchemasTable() { IDictionary<string, SchemaType> table = new Dictionary<string, SchemaType>(4); //<namespace uri>:<ncname> table.Add(":element", SchemaType.Element); table.Add(":xmlns", SchemaType.Xmlns); table.Add(":xpath1", SchemaType.XPath1); table.Add(":xpointer", SchemaType.XPointer); return table; } #endregion } } --- NEW FILE: ElementSchemaPointerPart.cs --- #region using using System; using System.Xml.XPath; using System.Xml; using System.Text; using Mvp.Xml.Common.XPath; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// element() scheme based <see cref="XPointer"/> pointer part. /// </summary> internal class ElementSchemaPointerPart : PointerPart { #region private fields private string _xpath; #endregion #region public members /// <summary> /// Equivalent XPath expression. /// </summary> public string XPath { get { return _xpath; } set { _xpath = value; } } #endregion #region PointerPart overrides /// <summary> /// Evaluates <see cref="XPointer"/> pointer part and returns pointed nodes. /// </summary> /// <param name="doc">Document to evaluate pointer part on</param> /// <param name="nm">Namespace manager</param> /// <returns>Pointed nodes</returns> public override XPathNodeIterator Evaluate(XPathNavigator doc, XmlNamespaceManager nm) { return XPathCache.Select(_xpath, doc, nm); } #endregion #region parser /// <summary> /// Parses element() based pointer part and builds instance of <c>ElementSchemaPointerPart</c> class. /// </summary> /// <param name="lexer">Lexical analizer.</param> /// <returns>Newly created <c>ElementSchemaPointerPart</c> object.</returns> public static ElementSchemaPointerPart ParseSchemaData(XPointerLexer lexer) { //Productions: //[1] ElementSchemeData ::= (NCName ChildSequence?) | ChildSequence //[2] ChildSequence ::= ('/' [1-9] [0-9]*)+ StringBuilder xpathBuilder = new StringBuilder(); ElementSchemaPointerPart part = new ElementSchemaPointerPart(); lexer.NextLexeme(); if (lexer.Kind == XPointerLexer.LexKind.NCName) { xpathBuilder.Append("id('"); xpathBuilder.Append(lexer.NCName); xpathBuilder.Append("')"); lexer.NextLexeme(); } int childSequenceLen = 0; while (lexer.Kind == XPointerLexer.LexKind.Slash) { lexer.NextLexeme(); if (lexer.Kind != XPointerLexer.LexKind.Number) { Debug.WriteLine(SR.InvalidTokenInElementSchemeWhileNumberExpected); return null; } if (lexer.Number == 0) { Debug.WriteLine(SR.ZeroIndexInElementSchemechildSequence); return null; } childSequenceLen++; xpathBuilder.Append("/*["); xpathBuilder.Append(lexer.Number); xpathBuilder.Append("]"); lexer.NextLexeme(); } if (lexer.Kind != XPointerLexer.LexKind.RRBracket) { throw new XPointerSyntaxException(SR.InvalidTokenInElementSchemeWhileClosingRoundBracketExpected); } if (part.NCName==null && childSequenceLen==0) { Debug.WriteLine(SR.EmptyElementSchemeXPointer); return null; } part.XPath = xpathBuilder.ToString(); return part; } #endregion } } --- NEW FILE: XPointerParser.cs --- #region using using System; using System.Collections.Generic; using System.Xml; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// XPointer parser. /// </summary> internal class XPointerParser { #region private members private static IDictionary<string, XPointerSchema.SchemaType> _schemas = XPointerSchema.Schemas; private static XPointerSchema.SchemaType GetSchema(XPointerLexer lexer, IList<PointerPart> parts) { string schemaNSURI; if (lexer.Prefix != String.Empty) { schemaNSURI = null; //resolve prefix for (int i=parts.Count-1; i>=0; i--) { PointerPart part = parts[i]; if (part is XmlnsSchemaPointerPart) { XmlnsSchemaPointerPart xmlnsPart = (XmlnsSchemaPointerPart)part; if (xmlnsPart.Prefix == lexer.Prefix) { schemaNSURI = xmlnsPart.Uri; break; } } } if (schemaNSURI == null) //No binding for the prefix - ignore pointer part return XPointerSchema.SchemaType.Unknown; } else schemaNSURI = String.Empty; XPointerSchema.SchemaType schemaType = _schemas[schemaNSURI + ':' + lexer.NCName]; return schemaType != null ? schemaType : XPointerSchema.SchemaType.Unknown; } #endregion #region public members public static Pointer ParseXPointer(string xpointer) { IList<PointerPart> parts; XPointerLexer lexer; lexer = new XPointerLexer( xpointer); lexer.NextLexeme(); if (lexer.Kind == XPointerLexer.LexKind.NCName && !lexer.CanBeSchemaName) { //Shorthand pointer Pointer ptr = new ShorthandPointer(lexer.NCName); lexer.NextLexeme(); if (lexer.Kind != XPointerLexer.LexKind.Eof) throw new XPointerSyntaxException(SR.InvalidTokenAfterShorthandPointer); return ptr; } else { //SchemaBased pointer parts = new List<PointerPart>(); while (lexer.Kind != XPointerLexer.LexKind.Eof) { if ((lexer.Kind == XPointerLexer.LexKind.NCName || lexer.Kind == XPointerLexer.LexKind.QName) && lexer.CanBeSchemaName) { XPointerSchema.SchemaType schemaType = GetSchema(lexer, parts); //Move to '(' lexer.NextLexeme(); switch (schemaType) { case XPointerSchema.SchemaType.Element: ElementSchemaPointerPart elemPart = ElementSchemaPointerPart.ParseSchemaData(lexer); if (elemPart != null) parts.Add(elemPart); break; case XPointerSchema.SchemaType.Xmlns: XmlnsSchemaPointerPart xmlnsPart = XmlnsSchemaPointerPart.ParseSchemaData(lexer); if (xmlnsPart != null) parts.Add(xmlnsPart); break; case XPointerSchema.SchemaType.XPath1: XPath1SchemaPointerPart xpath1Part = XPath1SchemaPointerPart.ParseSchemaData(lexer); if (xpath1Part != null) parts.Add(xpath1Part); break; case XPointerSchema.SchemaType.XPointer: XPointerSchemaPointerPart xpointerPart = XPointerSchemaPointerPart.ParseSchemaData(lexer); if (xpointerPart != null) parts.Add(xpointerPart); break; default: //Unknown scheme lexer.ParseEscapedData(); break; } //Skip ')' lexer.NextLexeme(); //Skip possible whitespace if (lexer.Kind == XPointerLexer.LexKind.Space) lexer.NextLexeme(); } else throw new XPointerSyntaxException(SR.InvalidToken); } return new SchemaBasedPointer(parts, xpointer); } } #endregion } } --- NEW FILE: XPointerLexer.cs --- #region using using System; using System.Xml; using System.Text; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// XPointer lexical analyzer. /// </summary> internal class XPointerLexer { #region private members private string _ptr; private int _ptrIndex; private LexKind _kind; private char _currChar; private int _number; private string _ncname; private string _prefix; private bool _canBeSchemaName; private string ParseName() { int start = _ptrIndex - 1; int len = 0; while (LexUtils.IsNCNameChar(_currChar)) { NextChar(); len ++; } return _ptr.Substring(start, len); } #endregion #region constructors public XPointerLexer(string p) { if (p == null) throw new ArgumentNullException("pointer", SR.NullXPointer); _ptr = p; NextChar(); } #endregion #region public members public bool NextChar() { if (_ptrIndex < _ptr.Length) { _currChar = _ptr[_ptrIndex++]; return true; } else { _currChar = '\0'; return false; } } public LexKind Kind { get { return _kind; } } public int Number { get { return _number; } } public string NCName { get { return _ncname; } } public string Prefix { get { return _prefix; } } public bool CanBeSchemaName { get { return _canBeSchemaName; } } public void SkipWhiteSpace() { while (LexUtils.IsWhitespace(_currChar)) NextChar(); } public bool NextLexeme() { switch (_currChar) { case '\0' : _kind = LexKind.Eof; return false; case '(': case ')': case '=': case '/': _kind = (LexKind)Convert.ToInt32(_currChar); NextChar(); break; case '^': NextChar(); if (_currChar=='^' || _currChar=='(' || _currChar==')') { _kind = LexKind.EscapedData; NextChar(); } else throw new XPointerSyntaxException(SR.CircumflexCharMustBeEscaped); break; default: if (Char.IsDigit(_currChar)) { _kind = LexKind.Number; int start = _ptrIndex - 1; int len = 0; while (Char.IsDigit(_currChar)) { NextChar(); len ++; } _number = XmlConvert.ToInt32(_ptr.Substring(start, len)); break; } else if (LexUtils.IsStartNameChar(_currChar)) { _kind = LexKind.NCName; _prefix = String.Empty; _ncname = ParseName(); if (_currChar == ':') { //QName? NextChar(); _prefix = _ncname; _kind = LexKind.QName; if (LexUtils.IsStartNCNameChar(_currChar)) _ncname = ParseName(); else throw new XPointerSyntaxException(SR.GetString("InvalidNameToken", _prefix, _currChar)); } _canBeSchemaName = _currChar=='('; break; } else if (LexUtils.IsWhitespace(_currChar)) { _kind = LexKind.Space; while (LexUtils.IsWhitespace(_currChar)) NextChar(); break; } else { _kind = LexKind.EscapedData; break; } } return true; } public string ParseEscapedData() { int depth = 0; StringBuilder sb = new StringBuilder(); while (true) { switch (_currChar) { case '^': if (!NextChar()) throw new XPointerSyntaxException(SR.UnexpectedEndOfSchemeData); else if (_currChar=='^' || _currChar=='(' || _currChar==')') sb.Append(_currChar); else throw new XPointerSyntaxException(SR.CircumflexCharMustBeEscaped); break; case '(': depth++; goto default; case ')': if (depth-- == 0) { //Skip ')' NextLexeme(); return sb.ToString(); } else goto default; default: sb.Append(_currChar); break; } if (!NextChar()) throw new XPointerSyntaxException(SR.UnexpectedEndOfSchemeData); } } public enum LexKind { NCName = 'N', QName = 'Q', LRBracket = '(', RRBracket = ')', Circumflex = '^', Number = 'd', Eq = '=', Space = 'S', Slash = '/', EscapedData = 'D', Eof = 'E' } #endregion } } --- NEW FILE: PointerPart.cs --- #region using using System; using System.Xml; using System.Xml.XPath; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// Part of SchemaBased <see cref="XPointer"/> pointer. /// </summary> internal abstract class PointerPart { #region public methods /// <summary> /// Evaluates <see cref="XPointer"/> pointer part and returns pointed nodes. /// </summary> /// <param name="doc">Document to evaluate pointer part on</param> /// <param name="nm">Namespace manager</param> /// <returns>Pointed nodes</returns> public abstract XPathNodeIterator Evaluate(XPathNavigator doc, XmlNamespaceManager nm); #endregion } } --- NEW FILE: XPointerReader.cs --- #region using using System; using System.Xml; using System.Xml.XPath; using System.Xml.Schema; using System.IO; using System.Collections.Generic; using Mvp.Xml.Common.XPath; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// <c>XPointerReader</c> implements XPointer Framework in /// a fast, non-caching, forward-only way. <c>XPointerReader</c> /// supports XPointer Framework, element(), xmlns(), xpath1() and /// xpointer() (XPath subset only) XPointer schemes. /// </summary> /// <remarks>See <a href="http://mvp-xml.sf.net/xpointer">XPointer.NET homepage</a> for more info.</remarks> /// <author>Oleg Tkachenko, ol...@tk...</author> public class XPointerReader : XmlReader, IHasXPathNavigator { #region private members //Underlying reader private XmlReader _reader; //Nodes selected by xpointer private XPathNodeIterator _pointedNodes; //Document cache private static IDictionary<string, WeakReference> _cache; /// <summary> /// Initializes the <c>XPointerReader</c>. /// </summary> private void Init(XPathNavigator nav, string xpointer) { Pointer pointer = XPointerParser.ParseXPointer(xpointer); _pointedNodes = pointer.Evaluate(nav); //There is always at least one identified node //XPathNodeIterator is already at the first node _reader = new XPathNavigatorReader(_pointedNodes.Current); } private XPathDocument CreateAndCacheDocument(XmlReader r, bool supportSchemaDeterminedIDs) { string uri = r.BaseURI; XmlValidatingReader vr = null; if (supportSchemaDeterminedIDs) { vr = new IdAssuredValidatingReader(r); vr.ValidationType = ValidationType.Auto; } else { vr = new XmlValidatingReader(r); vr.ValidationType = ValidationType.None; } vr.EntityHandling = EntityHandling.ExpandEntities; vr.ValidationEventHandler += new System.Xml.Schema.ValidationEventHandler(ValidationCallback); XPathDocument doc = new XPathDocument(vr, XmlSpace.Preserve); vr.Close(); lock(_cache) { if (!_cache.ContainsKey(uri)) _cache.Add(uri, new WeakReference(doc)); } return doc; } //Dummy validation even handler private static void ValidationCallback(object sender, ValidationEventArgs args) { //do nothing } #endregion #region constructors /// <summary> /// 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(nav, xpointer); } /// <summary> /// Creates <c>XPointerReader</c> instance with given uri and xpointer. /// </summary> public XPointerReader(string uri, string xpointer) : this (new XmlTextReader(uri), xpointer, false) {} /// <summary> /// Creates <c>XPointerReader</c> instance with given uri, nametable and xpointer. /// </summary> public XPointerReader(string uri, XmlNameTable nt, string xpointer) : this (new XmlTextReader(uri, nt), xpointer, false) {} /// <summary> /// Creates <c>XPointerReader</c> instance with given uri, nametable and xpointer. /// Additionally sets a flag whether to support schema-determined IDs. /// </summary> public XPointerReader(string uri, XmlNameTable nt, string xpointer, bool supportSchemaDeterminedIDs) : this (new XmlTextReader(uri, nt), xpointer, supportSchemaDeterminedIDs) {} /// <summary> /// Creates <c>XPointerReader</c> instance with given uri, stream, nametable and xpointer. /// </summary> public XPointerReader(string uri, Stream stream, XmlNameTable nt, string xpointer) : this (uri, stream, nt, xpointer, false) {} /// <summary> /// Creates <c>XPointerReader</c> instance with given uri, stream, nametable and xpointer. /// Additionally sets a flag whether to support schema-determined IDs. /// </summary> public XPointerReader(string uri, Stream stream, XmlNameTable nt, string xpointer, bool supportSchemaDeterminedIDs) : this (new XmlTextReader(uri, stream, nt), xpointer, supportSchemaDeterminedIDs) {} /// <summary> /// Creates <c>XPointerReader</c> instance with given uri, stream and xpointer. /// </summary> public XPointerReader(string uri, Stream stream, string xpointer) : this (uri, stream, new NameTable(), xpointer) {} /// <summary> /// Creates <c>XPointerReader</c> instance with given uri, stream and xpointer. /// Additionally sets a flag whether to support schema-determined IDs. /// </summary> public XPointerReader(string uri, Stream stream, string xpointer, bool supportSchemaDeterminedIDs) : this (uri, stream, new NameTable(), xpointer, supportSchemaDeterminedIDs) {} /// <summary> /// Creates <c>XPointerReader</c> instance with given XmlReader and xpointer. /// Additionally sets a flag whether to support schema-determined IDs. /// </summary> public XPointerReader(XmlReader reader, string xpointer) : this (reader, xpointer, false) {} /// <summary> /// Creates <c>XPointerReader</c> instance with given XmlReader and xpointer. /// Additionally sets a flag whether to support schema-determined IDs. /// </summary> public XPointerReader(XmlReader reader, string xpointer, bool supportSchemaDeterminedIDs) { XPathDocument doc = null; if (_cache == null) _cache = new Dictionary<string, WeakReference>(); WeakReference wr = _cache[reader.BaseURI]; if (wr != null && wr.IsAlive) { doc = (XPathDocument)wr.Target; reader.Close(); } else { //Not cached or GCollected doc = CreateAndCacheDocument(reader, supportSchemaDeterminedIDs); } Init(doc.CreateNavigator(), xpointer); } /// <summary> /// Creates <c>XPointerReader</c> instance with given /// document's URI and content. /// </summary> /// <param name="uri">XML document's base URI</param> /// <param name="content">XML document's content</param> /// <param name="xpointer">XPointer pointer</param> public XPointerReader(string uri, string content, string xpointer) : this(uri, content, xpointer, false) {} /// <summary> /// Creates <c>XPointerReader</c> instance with given /// document's URI and content. /// </summary> /// <param name="uri">XML document's base URI</param> /// <param name="content">XML document's content</param> /// <param name="xpointer">XPointer pointer</param> /// <param name="supportSchemaDeterminedIDs">A flag whether to /// support schema-determined IDs</param> public XPointerReader(string uri, string content, string xpointer, bool supportSchemaDeterminedIDs) { XPathDocument doc = null; if (_cache == null) _cache = new Dictionary<string, WeakReference>(); WeakReference wr = _cache[uri]; if (wr != null && wr.IsAlive) doc = (XPathDocument)wr.Target; else { //Not cached or GCollected XmlTextReader r = new XmlTextReader(uri, new StringReader(content)); doc = CreateAndCacheDocument(r, supportSchemaDeterminedIDs); } Init(doc.CreateNavigator(), xpointer); } #endregion #region XmlReader overrides /// <summary>See <see cref="XmlReader.AttributeCount"/>.</summary> public override int AttributeCount { get { return _reader.AttributeCount; } } /// <summary>See <see cref="XmlReader.BaseURI"/>.</summary> public override string BaseURI { get { return _reader.BaseURI; } } /// <summary>See <see cref="XmlReader.HasValue"/>.</summary> public override bool HasValue { get { return _reader.HasValue; } } /// <summary>See <see cref="XmlReader.IsDefault"/>.</summary> public override bool IsDefault { get { return _reader.IsDefault; } } /// <summary>See <see cref="XmlReader.Name"/>.</summary> public override string Name { get { return _reader.Name; } } /// <summary>See <see cref="XmlReader.LocalName"/>.</summary> public override string LocalName { get { return _reader.LocalName; } } /// <summary>See <see cref="XmlReader.NamespaceURI"/>.</summary> public override string NamespaceURI { get { return _reader.NamespaceURI; } } /// <summary>See <see cref="XmlReader.NameTable"/>.</summary> public override XmlNameTable NameTable { get{ return _reader.NameTable; } } /// <summary>See <see cref="XmlReader.NodeType"/>.</summary> public override XmlNodeType NodeType { get { return _reader.NodeType; } } /// <summary>See <see cref="XmlReader.Prefix"/>.</summary> public override string Prefix { get { return _reader.Prefix; } } /// <summary>See <see cref="XmlReader.QuoteChar"/>.</summary> public override char QuoteChar { get { return _reader.QuoteChar; } } /// <summary>See <see cref="XmlReader.Close"/>.</summary> public override void Close() { if (_reader != null) _reader.Close(); } /// <summary>See <see cref="XmlReader.Depth"/>.</summary> public override int Depth { get { return _reader.Depth; } } /// <summary>See <see cref="XmlReader.EOF"/>.</summary> public override bool EOF { get { return _reader.EOF; } } /// <summary>See <see cref="XmlReader.GetAttribute"/>.</summary> public override string GetAttribute(int i) { return _reader.GetAttribute(i); } /// <summary>See <see cref="XmlReader.GetAttribute"/>.</summary> public override string GetAttribute(string name) { return _reader.GetAttribute(name); } /// <summary>See <see cref="XmlReader.GetAttribute"/>.</summary> public override string GetAttribute(string name, string namespaceURI) { return _reader.GetAttribute(name, namespaceURI); } /// <summary>See <see cref="XmlReader.IsEmptyElement"/>.</summary> public override bool IsEmptyElement { get { return _reader.IsEmptyElement; } } /// <summary>See <see cref="XmlReader.LookupNamespace"/>.</summary> public override String LookupNamespace(String prefix) { return _reader.LookupNamespace(prefix); } /// <summary>See <see cref="XmlReader.MoveToAttribute"/>.</summary> public override void MoveToAttribute(int i) { _reader.MoveToAttribute(i); } /// <summary>See <see cref="XmlReader.MoveToAttribute"/>.</summary> public override bool MoveToAttribute(string name) { return _reader.MoveToAttribute(name); } /// <summary>See <see cref="XmlReader.MoveToAttribute"/>.</summary> public override bool MoveToAttribute(string name, string ns) { return _reader.MoveToAttribute(name, ns); } /// <summary>See <see cref="XmlReader.MoveToElement"/>.</summary> public override bool MoveToElement() { return _reader.MoveToElement(); } /// <summary>See <see cref="XmlReader.MoveToFirstAttribute"/>.</summary> public override bool MoveToFirstAttribute() { return _reader.MoveToFirstAttribute(); } /// <summary>See <see cref="XmlReader.MoveToNextAttribute"/>.</summary> public override bool MoveToNextAttribute() { return _reader.MoveToNextAttribute(); } /// <summary>See <see cref="XmlReader.ReadAttributeValue"/>.</summary> public override bool ReadAttributeValue() { return _reader.ReadAttributeValue(); } /// <summary>See <see cref="XmlReader.ReadState"/>.</summary> public override ReadState ReadState { get { return _reader.ReadState; } } /// <summary>See <see cref="XmlReader.this"/>.</summary> public override String this [int i] { get { return _reader[i]; } } /// <summary>See <see cref="XmlReader.this"/>.</summary> public override string this [string name] { get { return _reader[name]; } } /// <summary>See <see cref="XmlReader.this"/>.</summary> public override string this [string name, string namespaceURI] { get { return _reader[name, namespaceURI]; } } /// <summary>See <see cref="XmlReader.ResolveEntity"/>.</summary> public override void ResolveEntity() { _reader.ResolveEntity(); } /// <summary>See <see cref="XmlReader.XmlLang"/>.</summary> public override string XmlLang { get { return _reader.XmlLang; } } /// <summary>See <see cref="XmlReader.XmlSpace"/>.</summary> public override XmlSpace XmlSpace { get { return _reader.XmlSpace; } } /// <summary>See <see cref="XmlReader.Value"/>.</summary> public override string Value { get { return _reader.Value; } } /// <summary>See <see cref="XmlReader.ReadInnerXml"/>.</summary> public override string ReadInnerXml() { return _reader.ReadInnerXml(); } /// <summary>See <see cref="XmlReader.ReadOuterXml"/>.</summary> public override string ReadOuterXml() { return _reader.ReadOuterXml(); } /// <summary>See <see cref="XmlReader.ReadString"/>.</summary> public override string ReadString() { return _reader.ReadString(); } /// <summary>See <see cref="XmlReader.Read"/>.</summary> public override bool Read() { bool baseRead = _reader.Read(); if (baseRead) return true; else if (_pointedNodes != null) { if (_pointedNodes.MoveNext()) { _reader = _pointedNodes.Current.ReadSubtree(); return _reader.Read(); } } return false; } #endregion #region IHasXPathNavigator Members /// <summary> /// Returns the XPathNavigator for the current context or position. /// </summary> /// <returns></returns> public XPathNavigator GetNavigator() { return _pointedNodes.Current.Clone(); } #endregion } } --- NEW FILE: XPointerException.cs --- #region using using System; #endregion namespace Mvp.Xml.XPointer { /// <summary> /// Generic XPointer exception. /// </summary> public abstract class XPointerException : Exception { /// <summary> /// Initializes a new instance of the <see cref="ApplicationException"/> /// class with a specified error message. /// </summary> /// <param name="message">Error message</param> public XPointerException(string message) : base(message) {} /// <summary> /// Initializes a new instance of the <see cref="ApplicationException"/> /// class with a specified error message and a reference to the /// inner exception that is the cause of this exception. /// </summary> /// <param name="message">Error message</param> /// <param name="innerException">Inner exception</param> public XPointerException(string message, Exception innerException) : base(message, innerException) {} } /// <summary> /// XPointer Framework syntax error. /// </summary> public class XPointerSyntaxException : XPointerException { /// <summary> /// Initializes a new instance of the <see cref="XPointerSyntaxException"/> /// class with a specified error message. /// </summary> /// <param name="message">Error message</param> public XPointerSyntaxException(string message) : base(message) {} /// <summary> /// Initializes a new instance of the <see cref="XPointerSyntaxException"/> /// class with a specified error message and a reference to the /// inner exception that is the cause of this exception. /// </summary> /// <param name="message">Error message</param> /// <param name="innerException">Inner exception</param> public XPointerSyntaxException(string message, Exception innerException) : base(message, innerException) {} } /// <summary> /// XPointer doesn't identify any subresources - it's an error as per /// XPointer Framework. /// </summary> public class NoSubresourcesIdentifiedException : XPointerException { /// <summary> /// Initializes a new instance of the <see cref="NoSubresourcesIdentifiedException"/> /// class with a specified error message. /// </summary> /// <param name="message">Error message</param> public NoSubresourcesIdentifiedException(string message) : base(message) {} /// <summary> /// Initializes a new instance of the <see cref="NoSubresourcesIdentifiedException"/> /// class with a specified error message and a reference to the /// inner exception that is the cause of this exception. /// </summary> /// <param name="message">Error message</param> /// <param name="innerException">Inner exception</param> public NoSubresourcesIdentifiedException(string message, Exception innerException) : base(message, innerException) {} } } --- NEW FILE: XPointer.csproj --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SR.cs --- #region using using System; using System.Resources; using System.Threading; #endregion namespace Mvp.Xml.XPointer { /// <summary>Contains resources for the application.</summary> internal sealed class SR { private static ResourceManager resourceManager = new ResourceManager(typeof(SR).FullName, typeof(SR).Module.Assembly ); private SR() {} /// <summary> /// Gets the specified resource for the <see cref='Thread.CurrentUICulture'/>. /// </summary> /// <param name='key'>The key of the resource to retrieve.</param> /// <returns>The object resource.</returns> public static object GetObject(string key) { return resourceManager.GetObject(key); } /// <summary> /// Gets the specified resource for the <see cref='Thread.CurrentUICulture'/>. /// </summary> /// <param name='key'>The key of the resource to retrieve.</param> /// <returns>The string resource.</returns> public static string GetString(string key) { return resourceManager.GetString(key); } /// <summary> /// Gets the specified resource for the <see cref='Thread.CurrentUICulture'/> and /// formats it with the arguments received. /// </summary> /// <param name='key'>The key of the resource to retrieve.</param> /// <param name='args'>The arguments to format the resource with.</param> /// <returns>The string resource.</returns> internal static string GetString (string key, params object[] args) { return String.Format(GetString(key), args); } /// <summary></summary> public static string InvalidTokenInElementSchemeWhileNumberExpected { get { return SR.GetString("InvalidTokenInElementSchemeWhileNumberExpected"); } } /// <summary></summary> public static string ZeroIndexInElementSchemechildSequence { get { return SR.GetString("ZeroIndexInElementSchemechildSequence"); } } /// <summary></summary> public static string InvalidTokenInElementSchemeWhileClosingRoundBracketExpected { get { return SR.GetString("InvalidTokenInElementSchemeWhileClosingRoundBracketExpected"); } } /// <summary></summary> public static string EmptyElementSchemeXPointer { get { return SR.GetString("EmptyElementSchemeXPointer"); } } /// <summary></summary> public static string InvalidTokenInXmlnsSchemeWhileNCNameExpected { get { return SR.GetString("InvalidTokenInXmlnsSchemeWhileNCNameExpected"); } } /// <summary></summary> pu... [truncated message content] |
From: Oleg T. <he...@us...> - 2005-10-16 15:17:15
|
Update of /cvsroot/mvp-xml/XPointer/v2/src/Common/XPath In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18461/v2/src/Common/XPath Added Files: dummy.txt Log Message: --- NEW FILE: dummy.txt --- Dummy file to prevent pruning of the directory. |
From: Oleg T. <he...@us...> - 2005-10-16 15:16:23
|
Update of /cvsroot/mvp-xml/XPointer/v2/src/Common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18341/Common Log Message: Directory /cvsroot/mvp-xml/XPointer/v2/src/Common added to the repository |
From: Oleg T. <he...@us...> - 2005-10-16 15:16:23
|
Update of /cvsroot/mvp-xml/XPointer/v2/src/Common/XPath In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18367/XPath Log Message: Directory /cvsroot/mvp-xml/XPointer/v2/src/Common/XPath added to the repository |
From: Oleg T. <he...@us...> - 2005-10-16 15:16:06
|
Update of /cvsroot/mvp-xml/XPointer/v2/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18308/src Log Message: Directory /cvsroot/mvp-xml/XPointer/v2/src added to the repository |
From: Oleg T. <he...@us...> - 2005-10-16 15:15:33
|
Update of /cvsroot/mvp-xml/XPointer/v2/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18199/test Log Message: Directory /cvsroot/mvp-xml/XPointer/v2/test added to the repository |
From: Oleg T. <he...@us...> - 2005-10-16 15:14:43
|
Update of /cvsroot/mvp-xml/XPointer/v2/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18037/doc Log Message: Directory /cvsroot/mvp-xml/XPointer/v2/doc added to the repository |
From: Oleg T. <he...@us...> - 2005-10-16 15:11:24
|
Update of /cvsroot/mvp-xml/XPointer/v2/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17454/lib Log Message: Directory /cvsroot/mvp-xml/XPointer/v2/lib added to the repository |
From: Oleg T. <he...@us...> - 2005-10-15 22:11:26
|
Update of /cvsroot/mvp-xml/EXSLT/v1/src/Exslt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28217/v2/src/Exslt Modified Files: ExsltContext.cs ExsltMath.cs ExsltNamespaces.cs ExsltNodeList.cs ExsltTransform.cs Log Message: Index: ExsltNamespaces.cs =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/Exslt/ExsltNamespaces.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ExsltNamespaces.cs 19 Jul 2005 19:46:54 -0000 1.1 +++ ExsltNamespaces.cs 15 Oct 2005 22:11:16 -0000 1.2 @@ -2,8 +2,7 @@ /// <summary> /// Exslt (and other) namespaces constants. /// </summary> - public class ExsltNamespaces { - public const string Common = "http://exslt.org/common"; + public class ExsltNamespaces { public const string DatesAndTimes = "http://exslt.org/dates-and-times"; public const string Math = "http://exslt.org/math"; public const string Random = "http://exslt.org/random"; Index: ExsltContext.cs =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/Exslt/ExsltContext.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ExsltContext.cs 15 Oct 2005 21:24:17 -0000 1.2 +++ ExsltContext.cs 15 Oct 2005 22:11:16 -0000 1.3 @@ -102,68 +102,63 @@ } #endregion - - private void AddExtensionNamespaces() { - //remove all our extension objects in case the ExsltContext is being reused - RemoveNamespace("exsl", ExsltNamespaces.Common); - RemoveNamespace("math", ExsltNamespaces.Math); - RemoveNamespace("date", ExsltNamespaces.DatesAndTimes); - RemoveNamespace("regexp", ExsltNamespaces.RegularExpressions); + + #region Private methods + private void AddExtensionNamespaces() + { + //remove all our extension objects in case the ExsltContext is being reused + RemoveNamespace("math", ExsltNamespaces.Math); + RemoveNamespace("date", ExsltNamespaces.DatesAndTimes); + RemoveNamespace("regexp", ExsltNamespaces.RegularExpressions); RemoveNamespace("str", ExsltNamespaces.Strings); - RemoveNamespace("set", ExsltNamespaces.Sets); - RemoveNamespace("random", ExsltNamespaces.Random); + RemoveNamespace("set", ExsltNamespaces.Sets); + RemoveNamespace("random", ExsltNamespaces.Random); RemoveNamespace("date2", ExsltNamespaces.GDNDatesAndTimes); RemoveNamespace("math2", ExsltNamespaces.GDNMath); RemoveNamespace("regexp2", ExsltNamespaces.GDNRegularExpressions); RemoveNamespace("set2", ExsltNamespaces.GDNSets); RemoveNamespace("str2", ExsltNamespaces.GDNStrings); RemoveNamespace("dyn2", ExsltNamespaces.GDNDynamic); - - //add extension objects as specified by SupportedFunctions - if((this.SupportedFunctions & ExsltFunctionNamespace.Common) > 0) - AddNamespace("exsl", ExsltNamespaces.Common); - if((this.SupportedFunctions & ExsltFunctionNamespace.Math) > 0) + //add extension objects as specified by SupportedFunctions + if ((this.SupportedFunctions & ExsltFunctionNamespace.Math) > 0) AddNamespace("math", ExsltNamespaces.Math); - if((this.SupportedFunctions & ExsltFunctionNamespace.DatesAndTimes) > 0) + if ((this.SupportedFunctions & ExsltFunctionNamespace.DatesAndTimes) > 0) AddNamespace("date", ExsltNamespaces.DatesAndTimes); - if((this.SupportedFunctions & ExsltFunctionNamespace.RegularExpressions) > 0) + if ((this.SupportedFunctions & ExsltFunctionNamespace.RegularExpressions) > 0) AddNamespace("regexp", ExsltNamespaces.RegularExpressions); - if((this.SupportedFunctions & ExsltFunctionNamespace.Strings) > 0) + if ((this.SupportedFunctions & ExsltFunctionNamespace.Strings) > 0) AddNamespace("str", ExsltNamespaces.Strings); - if((this.SupportedFunctions & ExsltFunctionNamespace.Sets) > 0) + if ((this.SupportedFunctions & ExsltFunctionNamespace.Sets) > 0) AddNamespace("set", ExsltNamespaces.Sets); - if((this.SupportedFunctions & ExsltFunctionNamespace.Random) > 0) + if ((this.SupportedFunctions & ExsltFunctionNamespace.Random) > 0) AddNamespace("random", ExsltNamespaces.Random); - - if((this.SupportedFunctions & ExsltFunctionNamespace.GDNDatesAndTimes) > 0) + + if ((this.SupportedFunctions & ExsltFunctionNamespace.GDNDatesAndTimes) > 0) AddNamespace("date2", ExsltNamespaces.GDNDatesAndTimes); - - if((this.SupportedFunctions & ExsltFunctionNamespace.GDNMath) > 0) + + if ((this.SupportedFunctions & ExsltFunctionNamespace.GDNMath) > 0) AddNamespace("math2", ExsltNamespaces.GDNMath); - - if((this.SupportedFunctions & ExsltFunctionNamespace.GDNRegularExpressions) > 0) + + if ((this.SupportedFunctions & ExsltFunctionNamespace.GDNRegularExpressions) > 0) AddNamespace("regexp2", ExsltNamespaces.GDNRegularExpressions); - - if((this.SupportedFunctions & ExsltFunctionNamespace.GDNSets) > 0) + + if ((this.SupportedFunctions & ExsltFunctionNamespace.GDNSets) > 0) AddNamespace("set2", ExsltNamespaces.GDNSets); - - if((this.SupportedFunctions & ExsltFunctionNamespace.GDNStrings) > 0) - AddNamespace("str2", ExsltNamespaces.GDNStrings); - if((this.SupportedFunctions & ExsltFunctionNamespace.GDNDynamic) > 0) - AddNamespace("dyn2", ExsltNamespaces.GDNDynamic); - } - - public override int CompareDocument(string baseUri, string nextbaseUri) { - return 0; - } - + if ((this.SupportedFunctions & ExsltFunctionNamespace.GDNStrings) > 0) + AddNamespace("str2", ExsltNamespaces.GDNStrings); + + if ((this.SupportedFunctions & ExsltFunctionNamespace.GDNDynamic) > 0) + AddNamespace("dyn2", ExsltNamespaces.GDNDynamic); + } + #endregion + #region Public Properties /// <summary> /// Bitwise enumeration used to specify which EXSLT functions should be accessible to @@ -177,69 +172,78 @@ get { return _supportedFunctions; } } #endregion - - - public override bool PreserveWhitespace(XPathNavigator node) { - return true; - } - - public override bool Whitespace { - get { return true; } - } - - /// <summary> - /// Resolves variables. - /// </summary> - /// <param name="prefix">The variable's prefix</param> - /// <param name="name">The variable's name</param> - /// <returns></returns> - public override IXsltContextVariable ResolveVariable(string prefix, string name) { - return null; - } - - /// <summary> - /// Resolves custom function in XPath expression. - /// </summary> - /// <param name="prefix">The prefix of the function as it appears in the XPath expression.</param> - /// <param name="name">The name of the function.</param> - /// <param name="argTypes">An array of argument types for the function being resolved. - /// This allows you to select between methods with the same name (for example, overloaded - /// methods). </param> + + #region XsltContext Overrides + public override int CompareDocument(string baseUri, string nextbaseUri) + { + return 0; + } + + public override bool PreserveWhitespace(XPathNavigator node) + { + return true; + } + + public override bool Whitespace + { + get { return true; } + } + + /// <summary> + /// Resolves variables. + /// </summary> + /// <param name="prefix">The variable's prefix</param> + /// <param name="name">The variable's name</param> + /// <returns></returns> + public override IXsltContextVariable ResolveVariable(string prefix, string name) + { + return null; + } + + /// <summary> + /// Resolves custom function in XPath expression. + /// </summary> + /// <param name="prefix">The prefix of the function as it appears in the XPath expression.</param> + /// <param name="name">The name of the function.</param> + /// <param name="argTypes">An array of argument types for the function being resolved. + /// This allows you to select between methods with the same name (for example, overloaded + /// methods). </param> /// <returns>An IXsltContextFunction representing the function.</returns> - public override IXsltContextFunction ResolveFunction(string prefix, string name, - XPathResultType[] argTypes) { - switch (LookupNamespace(_nt.Get(prefix))) { - case ExsltNamespaces.Common: - return GetExtensionFunctionImplementation(exsltCommon, name, argTypes); - case ExsltNamespaces.DatesAndTimes: - return GetExtensionFunctionImplementation(exsltDatesAndTimes, name, argTypes); - case ExsltNamespaces.Math: - return GetExtensionFunctionImplementation(exsltMath, name, argTypes); - case ExsltNamespaces.RegularExpressions: - return GetExtensionFunctionImplementation(exsltRegularExpressions, name, argTypes); - case ExsltNamespaces.Sets: - return GetExtensionFunctionImplementation(exsltSets, name, argTypes); - case ExsltNamespaces.Strings: - return GetExtensionFunctionImplementation(exsltStrings, name, argTypes); - case ExsltNamespaces.Random: - return GetExtensionFunctionImplementation(exsltRandom, name, argTypes); + public override IXsltContextFunction ResolveFunction(string prefix, string name, + XPathResultType[] argTypes) + { + switch (LookupNamespace(_nt.Get(prefix))) + { + case ExsltNamespaces.DatesAndTimes: + return GetExtensionFunctionImplementation(exsltDatesAndTimes, name, argTypes); + case ExsltNamespaces.Math: + return GetExtensionFunctionImplementation(exsltMath, name, argTypes); + case ExsltNamespaces.RegularExpressions: + return GetExtensionFunctionImplementation(exsltRegularExpressions, name, argTypes); + case ExsltNamespaces.Sets: + return GetExtensionFunctionImplementation(exsltSets, name, argTypes); + case ExsltNamespaces.Strings: + return GetExtensionFunctionImplementation(exsltStrings, name, argTypes); + case ExsltNamespaces.Random: + return GetExtensionFunctionImplementation(exsltRandom, name, argTypes); case ExsltNamespaces.GDNDatesAndTimes: - return GetExtensionFunctionImplementation(gdnDatesAndTimes, name, argTypes); - case ExsltNamespaces.GDNMath: - return GetExtensionFunctionImplementation(gdnMath, name, argTypes); - case ExsltNamespaces.GDNRegularExpressions: - return GetExtensionFunctionImplementation(gdnRegularExpressions, name, argTypes); - case ExsltNamespaces.GDNSets: - return GetExtensionFunctionImplementation(gdnSets, name, argTypes); - case ExsltNamespaces.GDNStrings: - return GetExtensionFunctionImplementation(gdnStrings, name, argTypes); - case ExsltNamespaces.GDNDynamic: - return GetExtensionFunctionImplementation(gdnDynamic, name, argTypes); - default: - throw new XPathException(string.Format("Unrecognized extension function namespace: prefix='{0}', namespace URI='{1}'", - prefix, LookupNamespace(_nt.Get(prefix))), null); - } - } + return GetExtensionFunctionImplementation(gdnDatesAndTimes, name, argTypes); + case ExsltNamespaces.GDNMath: + return GetExtensionFunctionImplementation(gdnMath, name, argTypes); + case ExsltNamespaces.GDNRegularExpressions: + return GetExtensionFunctionImplementation(gdnRegularExpressions, name, argTypes); + case ExsltNamespaces.GDNSets: + return GetExtensionFunctionImplementation(gdnSets, name, argTypes); + case ExsltNamespaces.GDNStrings: + return GetExtensionFunctionImplementation(gdnStrings, name, argTypes); + case ExsltNamespaces.GDNDynamic: + return GetExtensionFunctionImplementation(gdnDynamic, name, argTypes); + default: + throw new XPathException(string.Format("Unrecognized extension function namespace: prefix='{0}', namespace URI='{1}'", + prefix, LookupNamespace(_nt.Get(prefix))), null); + } + } + #endregion /// <summary> /// Finds appropriate implementation for an extension function - public Index: ExsltMath.cs =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/Exslt/ExsltMath.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ExsltMath.cs 19 Jul 2005 19:46:54 -0000 1.1 +++ ExsltMath.cs 15 Oct 2005 22:11:16 -0000 1.2 @@ -3,6 +3,7 @@ using System; using System.Xml; using System.Xml.XPath; +using System.Collections.Generic; #endregion @@ -129,11 +130,11 @@ /// <returns>All the nodes that contain the min value in the nodeset</returns> public XPathNodeIterator lowest(XPathNodeIterator iterator){ - ExsltNodeList newList = new ExsltNodeList(); + IList<XPathNavigator> newList = new List<XPathNavigator>(); double min, t; if(iterator.Count == 0){ - return ExsltCommon.ExsltNodeListToXPathNodeIterator(newList); + return newList; } Index: ExsltNodeList.cs =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/Exslt/ExsltNodeList.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ExsltNodeList.cs 19 Jul 2005 19:46:55 -0000 1.1 +++ ExsltNodeList.cs 15 Oct 2005 22:11:16 -0000 1.2 @@ -1,7 +1,7 @@ #region using using System; -using System.Collections; +using System.Collections.Generic; using System.Xml.XPath; #endregion @@ -19,7 +19,7 @@ /// <summary> /// The inner arraylist used by this class. /// </summary> - internal ArrayList innerList = new ArrayList(); + internal IList<XPathNavigator> innerList = new List<XPathNavigator>(); #endregion @@ -52,7 +52,7 @@ /// in the iterator are placed in the list. /// </summary> /// <param name="iterator">The iterator to load the nodelist from</param> - public ExsltNodeList(XPathNodeIterator iterator): this(iterator, false){;} + public ExsltNodeList(XPathNodeIterator iterator): this(iterator, false) {} @@ -91,18 +91,17 @@ /// Returns an enumerator for the entire list. /// </summary> /// <returns>An enumerator for the entire list</returns> - public IEnumerator GetEnumerator(){ + public IEnumerator<XPathNavigator> GetEnumerator(){ return this.innerList.GetEnumerator(); } /// <summary> /// Adds an item to the list /// </summary> - /// <param name="value">The item to add</param> - /// <returns>The position into which the new element was inserted</returns> - public int Add( XPathNavigator nav){ + /// <param name="value">The item to add</param> + public void Add( XPathNavigator nav){ - return this.innerList.Add(nav); + this.innerList.Add(nav); } @@ -153,7 +152,7 @@ /// <returns>The index of value if found in the list; otherwise, -1.</returns> public int IndexOf( object value ){ - return this.innerList.IndexOf(value); + return this.innerList.IndexOf(value as XPathNavigator); } /// <summary> Index: ExsltTransform.cs =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/Exslt/ExsltTransform.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ExsltTransform.cs 15 Oct 2005 21:24:17 -0000 1.3 +++ ExsltTransform.cs 15 Oct 2005 22:11:16 -0000 1.4 @@ -73,7 +73,7 @@ /// <summary> /// The XslTransform object wrapped by this class. /// </summary> - private XslTransform xslTransform; + private XslCompiledTransform xslTransform; /// <summary> /// Bitwise enumeration used to specify which EXSLT functions should be accessible to @@ -189,7 +189,7 @@ /// Constructor initializes class. /// </summary> public ExsltTransform(){ - this.xslTransform = new XslTransform(); + this.xslTransform = new XslCompiledTransform(); } #endregion |
From: Oleg T. <he...@us...> - 2005-10-15 21:29:17
|
Update of /cvsroot/mvp-xml/EXSLT/v2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19171/v2 Added Files: EXSLT.NET.sln Log Message: --- NEW FILE: EXSLT.NET.sln --- Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MethodRenamer", "src\MethodRenamer\MethodRenamer.csproj", "{A22418E5-DCE6-4D12-A016-151EA614A787}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExsltTest", "test\ExsltTest\ExsltTest.csproj", "{AC8B9015-E508-4E40-8E6D-C4FCF52CE4B0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExsltXPathTest", "test\ExsltXPathTest\ExsltXPathTest.csproj", "{705AA213-1D02-4CD2-9ED5-A7D9668C714D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exslt", "src\Exslt\Exslt.csproj", "{BA694D9F-6B1E-4038-AC81-BF1640C07D90}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {A22418E5-DCE6-4D12-A016-151EA614A787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A22418E5-DCE6-4D12-A016-151EA614A787}.Debug|Any CPU.Build.0 = Debug|Any CPU {A22418E5-DCE6-4D12-A016-151EA614A787}.Release|Any CPU.ActiveCfg = Release|Any CPU {A22418E5-DCE6-4D12-A016-151EA614A787}.Release|Any CPU.Build.0 = Release|Any CPU {AC8B9015-E508-4E40-8E6D-C4FCF52CE4B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC8B9015-E508-4E40-8E6D-C4FCF52CE4B0}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC8B9015-E508-4E40-8E6D-C4FCF52CE4B0}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC8B9015-E508-4E40-8E6D-C4FCF52CE4B0}.Release|Any CPU.Build.0 = Release|Any CPU {705AA213-1D02-4CD2-9ED5-A7D9668C714D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {705AA213-1D02-4CD2-9ED5-A7D9668C714D}.Debug|Any CPU.Build.0 = Debug|Any CPU {705AA213-1D02-4CD2-9ED5-A7D9668C714D}.Release|Any CPU.ActiveCfg = Release|Any CPU {705AA213-1D02-4CD2-9ED5-A7D9668C714D}.Release|Any CPU.Build.0 = Release|Any CPU {BA694D9F-6B1E-4038-AC81-BF1640C07D90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BA694D9F-6B1E-4038-AC81-BF1640C07D90}.Debug|Any CPU.Build.0 = Debug|Any CPU {BA694D9F-6B1E-4038-AC81-BF1640C07D90}.Release|Any CPU.ActiveCfg = Release|Any CPU {BA694D9F-6B1E-4038-AC81-BF1640C07D90}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal |
From: Oleg T. <he...@us...> - 2005-10-15 21:29:17
|
Update of /cvsroot/mvp-xml/EXSLT/v2/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19171/v2/src Added Files: changelog.txt Log Message: --- NEW FILE: changelog.txt --- --------------------------------------------------------- July 19, 2005 Initial setup. Will contain external libraries referenced by the project. |
From: Oleg T. <he...@us...> - 2005-10-15 21:27:51
|
Update of /cvsroot/mvp-xml/EXSLT/v2/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19003/src Log Message: Directory /cvsroot/mvp-xml/EXSLT/v2/src added to the repository |
From: Oleg T. <he...@us...> - 2005-10-15 21:27:40
|
Update of /cvsroot/mvp-xml/EXSLT/v2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18967/v2 Log Message: Directory /cvsroot/mvp-xml/EXSLT/v2 added to the repository |
From: Oleg T. <he...@us...> - 2005-10-15 21:24:26
|
Update of /cvsroot/mvp-xml/EXSLT/v1/src/Exslt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18560 Modified Files: AssemblyInfo.cs Exslt.csproj ExsltContext.cs ExsltSets.cs ExsltTransform.cs Log Message: Index: ExsltTransform.cs =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/Exslt/ExsltTransform.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ExsltTransform.cs 20 Jul 2005 20:15:47 -0000 1.2 +++ ExsltTransform.cs 15 Oct 2005 21:24:17 -0000 1.3 @@ -79,12 +79,7 @@ /// Bitwise enumeration used to specify which EXSLT functions should be accessible to /// the ExsltTransform object. The default value is ExsltFunctionNamespace.All /// </summary> - private ExsltFunctionNamespace _supportedFunctions = ExsltFunctionNamespace.All; - - /// <summary> - /// Extension object which implements the functions in the http://exslt.org/common namespace - /// </summary> - private ExsltCommon exsltCommon = new ExsltCommon(); + private ExsltFunctionNamespace _supportedFunctions = ExsltFunctionNamespace.All; /// <summary> /// Extension object which implements the functions in the http://exslt.org/math namespace Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/Exslt/AssemblyInfo.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- AssemblyInfo.cs 19 Jul 2005 19:46:54 -0000 1.1 +++ AssemblyInfo.cs 15 Oct 2005 21:24:17 -0000 1.2 @@ -32,7 +32,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.3.*")] +[assembly: AssemblyVersion("2.0.*")] // // In order to sign your assembly you must specify a key to use. Refer to the Index: Exslt.csproj =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/Exslt/Exslt.csproj,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Exslt.csproj 20 Jul 2005 20:15:38 -0000 1.2 +++ Exslt.csproj 15 Oct 2005 21:24:17 -0000 1.3 @@ -1,214 +1,163 @@ -<VisualStudioProject> - <CSHARP - ProjectType = "Local" - ProductVersion = "7.10.3077" - SchemaVersion = "2.0" - ProjectGuid = "{BA694D9F-6B1E-4038-AC81-BF1640C07D90}" - > - <Build> - <Settings - ApplicationIcon = "" - AssemblyKeyContainerName = "" - AssemblyName = "Mvp.Xml.Exslt" - AssemblyOriginatorKeyFile = "" - DefaultClientScript = "JScript" - DefaultHTMLPageLayout = "Grid" - DefaultTargetSchema = "IE50" - DelaySign = "false" - OutputType = "Library" - PreBuildEvent = "" - PostBuildEvent = '@echo ########### Setting environment variables
call "$(DevEnvDir)..\Tools\vsvars32.bat"
nmake' - RootNamespace = "Mvp.Xml.Exslt" - RunPostBuildEvent = "OnBuildSuccess" - StartupObject = "" - > - <Config - Name = "Debug" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "DEBUG;TRACE;NET11" - DocumentationFile = "" - DebugSymbols = "true" - FileAlignment = "4096" - IncrementalBuild = "true" - NoStdLib = "false" - NoWarn = "" - Optimize = "false" - OutputPath = ".\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "false" - WarningLevel = "4" - /> - <Config - Name = "Release" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "TRACE;NET11" - DocumentationFile = "" - DebugSymbols = "false" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "true" - OutputPath = ".\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "false" - WarningLevel = "4" - /> - </Settings> - <References> - <Reference - Name = "System" - AssemblyName = "System" - HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.dll" - /> - <Reference - Name = "System.Data" - AssemblyName = "System.Data" - HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Data.dll" - /> - <Reference - Name = "System.XML" - AssemblyName = "System.Xml" - HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.XML.dll" - /> - <Reference - Name = "System.Drawing" - AssemblyName = "System.Drawing" - HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll" - /> - <Reference - Name = "System.Windows.Forms" - AssemblyName = "System.Windows.Forms" - HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll" - /> - <Reference - Name = "System.Web" - AssemblyName = "System.Web" - HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Web.dll" - /> - </References> - </Build> - <Files> - <Include> - <File - RelPath = "AssemblyInfo.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltCommon.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltContext.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltContextFunction.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltDatesAndTimes.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltMath.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltNamespaces.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltNodeList.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltRandom.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltRegularExpressions.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltSets.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltStrings.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltTransform.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "GDNDatesAndTimes.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "GDNDynamic.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "GDNMath.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "GDNRegularExpressions.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "GDNSets.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "GDNStrings.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "Makefile" - BuildAction = "Content" - /> - <File - RelPath = "MultiOutput\MultiXmlTextWriter.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "MultiOutput\OutputState.cs" - SubType = "Code" - BuildAction = "Compile" - /> - </Include> - </Files> - </CSHARP> -</VisualStudioProject> - +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>8.0.50215</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{BA694D9F-6B1E-4038-AC81-BF1640C07D90}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ApplicationIcon> + </ApplicationIcon> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>Mvp.Xml.Exslt</AssemblyName> + <AssemblyOriginatorKeyFile> + </AssemblyOriginatorKeyFile> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <OutputType>Library</OutputType> + <RootNamespace>Mvp.Xml.Exslt</RootNamespace> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <StartupObject> + </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>.\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE;NET11</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>false</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>.\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE;NET11</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>false</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>true</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.Data"> + <Name>System.Data</Name> + </Reference> + <Reference Include="System.Drawing"> + <Name>System.Drawing</Name> + </Reference> + <Reference Include="System.Web"> + <Name>System.Web</Name> + </Reference> + <Reference Include="System.Windows.Forms"> + <Name>System.Windows.Forms</Name> + </Reference> + <Reference Include="System.Xml"> + <Name>System.XML</Name> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ExsltContext.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ExsltContextFunction.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ExsltDatesAndTimes.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ExsltMath.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ExsltNamespaces.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ExsltNodeList.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ExsltRandom.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ExsltRegularExpressions.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ExsltSets.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ExsltStrings.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ExsltTransform.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="GDNDatesAndTimes.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="GDNDynamic.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="GDNMath.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="GDNRegularExpressions.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="GDNSets.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="GDNStrings.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="MultiOutput\MultiXmlTextWriter.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="MultiOutput\OutputState.cs"> + <SubType>Code</SubType> + </Compile> + <Content Include="Makefile" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent>@echo ########### Setting environment variables +call "$(DevEnvDir)..\Tools\vsvars32.bat" +nmake</PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Index: ExsltContext.cs =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/Exslt/ExsltContext.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ExsltContext.cs 19 Jul 2005 19:46:54 -0000 1.1 +++ ExsltContext.cs 15 Oct 2005 21:24:17 -0000 1.2 @@ -24,12 +24,7 @@ /// Bitwise enumeration used to specify which EXSLT functions should be accessible to /// in the ExsltContext object. The default value is ExsltFunctionNamespace.All /// </summary> - private ExsltFunctionNamespace _supportedFunctions = ExsltFunctionNamespace.All; - - /// <summary> - /// Extension object which implements the functions in the http://exslt.org/common namespace - /// </summary> - private ExsltCommon exsltCommon = new ExsltCommon(); + private ExsltFunctionNamespace _supportedFunctions = ExsltFunctionNamespace.All; /// <summary> /// Extension object which implements the functions in the http://exslt.org/math namespace Index: ExsltSets.cs =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/Exslt/ExsltSets.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ExsltSets.cs 20 Jul 2005 20:15:47 -0000 1.2 +++ ExsltSets.cs 15 Oct 2005 21:24:17 -0000 1.3 @@ -47,7 +47,7 @@ } } - return ExsltCommon.ExsltNodeListToXPathNodeIterator(nodelist1); + return nodelist1; } /// <summary> /// Implements an optimized algorithm for the following function |
From: Oleg T. <he...@us...> - 2005-10-15 21:18:55
|
Update of /cvsroot/mvp-xml/EXSLT/v1/src/MethodRenamer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17743 Modified Files: MethodRenamer.cs MethodRenamer.csproj MethodRenamer.exe Added Files: MethodRenamer.vshost.exe.config Log Message: Index: MethodRenamer.cs =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/MethodRenamer/MethodRenamer.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- MethodRenamer.cs 19 Jul 2005 19:46:58 -0000 1.1 +++ MethodRenamer.cs 15 Oct 2005 21:18:47 -0000 1.2 @@ -5,44 +5,51 @@ using System.Text; using System.Configuration; -namespace Mvp.Xml.Exslt.MethodRenamer { - /// <summary> - /// An utility to rename methods in MSIL code. - /// </summary> - public class MethodRenamer { - [STAThread] - static void Main(string[] args) { - IDictionary dictionary = (IDictionary)ConfigurationSettings.GetConfig("names"); - //Reads input IL code - StreamReader reader = new StreamReader(args[0]); - //Writes output IL code - StreamWriter writer = new StreamWriter(args[1]); - string line; - //Go read line by line - while ((line = reader.ReadLine())!=null) { - //Method definition? - if (line.Trim().StartsWith(".method")) { - writer.WriteLine(line); - line = reader.ReadLine(); - if (line.IndexOf("(")!=-1) { - string methodName = line.Trim().Substring(0, line.Trim().IndexOf("(")); - if (dictionary.Contains(methodName)) { - writer.WriteLine(line.Replace(methodName+"(", - "'"+(string)dictionary[methodName]+"'(")); - Console.WriteLine("Found '" + methodName + "' method, renamed to '" + - dictionary[methodName] + "'"); - } - else - writer.WriteLine(line); - } - else - writer.WriteLine(line); - } - else - writer.WriteLine(line); +namespace Mvp.Xml.Exslt.MethodRenamer +{ + /// <summary> + /// An utility to rename methods in MSIL code. + /// </summary> + public class MethodRenamer + { + [STAThread] + static void Main(string[] args) + { + IDictionary dictionary = (IDictionary)ConfigurationManager.GetSection("names"); + //Reads input IL code + StreamReader reader = new StreamReader(args[0]); + //Writes output IL code + StreamWriter writer = new StreamWriter(args[1]); + string line; + //Go read line by line + while ((line = reader.ReadLine()) != null) + { + //Method definition? + if (line.Trim().StartsWith(".method")) + { + writer.WriteLine(line); + line = reader.ReadLine(); + if (line.IndexOf("(") != -1) + { + string methodName = line.Trim().Substring(0, line.Trim().IndexOf("(")); + if (dictionary.Contains(methodName)) + { + writer.WriteLine(line.Replace(methodName + "(", + "'" + (string)dictionary[methodName] + "'(")); + Console.WriteLine("Found '" + methodName + "' method, renamed to '" + + dictionary[methodName] + "'"); } - reader.Close(); - writer.Close(); + else + writer.WriteLine(line); + } + else + writer.WriteLine(line); } + else + writer.WriteLine(line); + } + reader.Close(); + writer.Close(); } + } } \ No newline at end of file Index: MethodRenamer.exe =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/MethodRenamer/MethodRenamer.exe,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsOphTpz and /tmp/cvsfEtwls differ --- NEW FILE: MethodRenamer.vshost.exe.config --- (This appears to be a binary file; contents omitted.) Index: MethodRenamer.csproj =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/src/MethodRenamer/MethodRenamer.csproj,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- MethodRenamer.csproj 19 Jul 2005 19:46:58 -0000 1.1 +++ MethodRenamer.csproj 15 Oct 2005 21:18:47 -0000 1.2 @@ -1,99 +1,90 @@ -<VisualStudioProject> - <CSHARP - ProjectType = "Local" - ProductVersion = "7.10.3077" - SchemaVersion = "2.0" - ProjectGuid = "{A22418E5-DCE6-4D12-A016-151EA614A787}" - > - <Build> - <Settings - ApplicationIcon = "" - AssemblyKeyContainerName = "" - AssemblyName = "MethodRenamer" - AssemblyOriginatorKeyFile = "" - DefaultClientScript = "JScript" - DefaultHTMLPageLayout = "Grid" - DefaultTargetSchema = "IE50" - DelaySign = "false" - OutputType = "Exe" - PreBuildEvent = "" - PostBuildEvent = "" - RootNamespace = "GotDotNet.Exslt.MethodRenamer" - RunPostBuildEvent = "OnBuildSuccess" - StartupObject = "Mvp.Xml.Exslt.MethodRenamer.MethodRenamer" - > - <Config - Name = "Debug" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "DEBUG;TRACE" - DocumentationFile = "" - DebugSymbols = "true" - FileAlignment = "4096" - IncrementalBuild = "true" - NoStdLib = "false" - NoWarn = "" - Optimize = "false" - OutputPath = ".\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "false" - WarningLevel = "4" - /> - <Config - Name = "Release" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "TRACE" - DocumentationFile = "" - DebugSymbols = "false" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "true" - OutputPath = ".\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "false" - WarningLevel = "4" - /> - </Settings> - <References> - <Reference - Name = "System" - AssemblyName = "System" - HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll" - /> - <Reference - Name = "System.Data" - AssemblyName = "System.Data" - HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll" - /> - <Reference - Name = "System.XML" - AssemblyName = "System.Xml" - HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll" - /> - </References> - </Build> - <Files> - <Include> - <File - RelPath = "App.config" - BuildAction = "None" - /> - <File - RelPath = "MethodRenamer.cs" - SubType = "Code" - BuildAction = "Compile" - /> - </Include> - </Files> - </CSHARP> -</VisualStudioProject> - +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>8.0.50215</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{A22418E5-DCE6-4D12-A016-151EA614A787}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ApplicationIcon> + </ApplicationIcon> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>MethodRenamer</AssemblyName> + <AssemblyOriginatorKeyFile> + </AssemblyOriginatorKeyFile> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <OutputType>Exe</OutputType> + <RootNamespace>GotDotNet.Exslt.MethodRenamer</RootNamespace> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <StartupObject>Mvp.Xml.Exslt.MethodRenamer.MethodRenamer</StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>.\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>false</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>.\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>false</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>true</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.configuration" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + <Compile Include="MethodRenamer.cs"> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file |
From: Oleg T. <he...@us...> - 2005-10-15 21:14:02
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17246/ExsltTest Modified Files: ExsltTest.csproj Log Message: Index: ExsltTest.csproj =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/test/ExsltTest/ExsltTest.csproj,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ExsltTest.csproj 20 Jul 2005 21:07:50 -0000 1.2 +++ ExsltTest.csproj 15 Oct 2005 21:13:53 -0000 1.3 @@ -1,881 +1,324 @@ -<VisualStudioProject> - <CSHARP - ProjectType = "Local" - ProductVersion = "7.10.3077" - SchemaVersion = "2.0" - ProjectGuid = "{AC8B9015-E508-4E40-8E6D-C4FCF52CE4B0}" - > - <Build> - <Settings - ApplicationIcon = "" - AssemblyKeyContainerName = "" [...1175 lines suppressed...] + <Content Include="tests\GotDotNet\RegularExpressions\tokenize.xslt" /> + <Content Include="tests\GotDotNet\Sets\source.xml" /> + <Content Include="tests\GotDotNet\Sets\subset.xslt" /> + <Content Include="tests\GotDotNet\Strings\lowercase.xslt" /> + <Content Include="tests\GotDotNet\Strings\source.xml" /> + <Content Include="tests\GotDotNet\Strings\uppercase.xslt" /> + <Content Include="tests\invoice.xml" /> + <Content Include="tests\invoice-processor.xsl" /> + <Content Include="tests\regexp-match-test.xslt" /> + <Content Include="tests\test.xml" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file |
From: Oleg T. <he...@us...> - 2005-10-15 21:11:53
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test/ExsltXPathTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16894/ExsltXPathTest Modified Files: ExsltXPathTest.csproj Log Message: Index: ExsltXPathTest.csproj =================================================================== RCS file: /cvsroot/mvp-xml/EXSLT/v1/test/ExsltXPathTest/ExsltXPathTest.csproj,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ExsltXPathTest.csproj 20 Jul 2005 21:28:24 -0000 1.2 +++ ExsltXPathTest.csproj 15 Oct 2005 21:11:45 -0000 1.3 @@ -1,113 +1,103 @@ -<VisualStudioProject> - <CSHARP - ProjectType = "Local" - ProductVersion = "7.10.3077" - SchemaVersion = "2.0" - ProjectGuid = "{705AA213-1D02-4CD2-9ED5-A7D9668C714D}" - > - <Build> - <Settings - ApplicationIcon = "" - AssemblyKeyContainerName = "" - AssemblyName = "ExsltXPathTest" - AssemblyOriginatorKeyFile = "" - DefaultClientScript = "JScript" - DefaultHTMLPageLayout = "Grid" - DefaultTargetSchema = "IE50" - DelaySign = "false" - OutputType = "Exe" - PreBuildEvent = "" - PostBuildEvent = "" - RootNamespace = "ExsltXPathTest" - RunPostBuildEvent = "OnBuildSuccess" - StartupObject = "ExsltXPathTest.ExsltXPathTest" - > - <Config - Name = "Debug" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "DEBUG;TRACE" - DocumentationFile = "" - DebugSymbols = "true" - FileAlignment = "4096" - IncrementalBuild = "true" - NoStdLib = "false" - NoWarn = "" - Optimize = "false" - OutputPath = ".\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "false" - WarningLevel = "4" - /> - <Config - Name = "Release" - AllowUnsafeBlocks = "false" - BaseAddress = "285212672" - CheckForOverflowUnderflow = "false" - ConfigurationOverrideFile = "" - DefineConstants = "TRACE" - DocumentationFile = "" - DebugSymbols = "false" - FileAlignment = "4096" - IncrementalBuild = "false" - NoStdLib = "false" - NoWarn = "" - Optimize = "true" - OutputPath = ".\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "false" - WarningLevel = "4" - /> - </Settings> - <References> - <Reference - Name = "System" - AssemblyName = "System" - HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll" - /> - <Reference - Name = "System.Data" - AssemblyName = "System.Data" - HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll" - /> - <Reference - Name = "System.XML" - AssemblyName = "System.Xml" - HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll" - /> - <Reference - Name = "Mvp.Xml.Exslt" - AssemblyName = "Mvp.Xml.Exslt" - HintPath = "..\..\src\Exslt\Mvp.Xml.Exslt.dll" - /> - </References> - </Build> - <Files> - <Include> - <File - RelPath = "AssemblyInfo.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "ExsltXPathTest.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "tests\books.xml" - BuildAction = "Content" - /> - <File - RelPath = "tests\foo.xml" - BuildAction = "Content" - /> - </Include> - </Files> - </CSHARP> -</VisualStudioProject> - +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>8.0.50215</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{705AA213-1D02-4CD2-9ED5-A7D9668C714D}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ApplicationIcon> + </ApplicationIcon> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>ExsltXPathTest</AssemblyName> + <AssemblyOriginatorKeyFile> + </AssemblyOriginatorKeyFile> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <OutputType>Exe</OutputType> + <RootNamespace>ExsltXPathTest</RootNamespace> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <StartupObject>ExsltXPathTest.ExsltXPathTest</StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>.\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>false</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>.\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>false</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>true</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Mvp.Xml.Exslt"> + <Name>Mvp.Xml.Exslt</Name> + <HintPath>..\..\src\Exslt\Mvp.Xml.Exslt.dll</HintPath> + </Reference> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.Data"> + <Name>System.Data</Name> + </Reference> + <Reference Include="System.Xml"> + <Name>System.XML</Name> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ExsltXPathTest.cs"> + <SubType>Code</SubType> + </Compile> + <Content Include="tests\books.xml" /> + <Content Include="tests\foo.xml" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file |
From: Oleg T. <he...@us...> - 2005-10-15 21:09:26
|
Update of /cvsroot/mvp-xml/EXSLT/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16493 Added Files: changelog.txt Log Message: --- NEW FILE: changelog.txt --- --------------------------------------------------------- October 15, 2005 Initial setup. Will contain tests for the project. |
From: Oleg T. <he...@us...> - 2005-08-25 20:30:21
|
Update of /cvsroot/mvp-xml/XInclude/v1/test/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30441/v1/test/tests Added Files: loop.xml Log Message: --- NEW FILE: loop.xml --- (This appears to be a binary file; contents omitted.) |
From: Oleg T. <he...@us...> - 2005-08-25 20:30:21
|
Update of /cvsroot/mvp-xml/XInclude/v1/test/results In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30441/v1/test/results Added Files: loop.xml Log Message: --- NEW FILE: loop.xml --- <?xml version="1.0" encoding="utf-8" ?> <test> <fault/> </test> |
From: Oleg T. <he...@us...> - 2005-08-25 20:30:21
|
Update of /cvsroot/mvp-xml/XInclude/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30441/v1/test Modified Files: XIncludeReaderTests.cs XIncludeTest.csproj Log Message: Index: XIncludeTest.csproj =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeTest.csproj,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- XIncludeTest.csproj 4 Jan 2005 10:46:30 -0000 1.19 +++ XIncludeTest.csproj 25 Aug 2005 20:30:09 -0000 1.20 @@ -171,6 +171,10 @@ BuildAction = "Content" /> <File + RelPath = "results\loop.xml" + BuildAction = "Content" + /> + <File RelPath = "results\nonxmlchar.xml" BuildAction = "Content" /> @@ -247,6 +251,10 @@ BuildAction = "Content" /> <File + RelPath = "tests\loop.xml" + BuildAction = "Content" + /> + <File RelPath = "tests\nohref.xml" BuildAction = "Content" /> Index: XIncludeReaderTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeReaderTests.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- XIncludeReaderTests.cs 22 Nov 2004 14:03:48 -0000 1.18 +++ XIncludeReaderTests.cs 25 Aug 2005 20:30:09 -0000 1.19 @@ -373,6 +373,15 @@ RunAndCompare("../../tests/caching.xml", "../../results/caching.xml"); } + /// <summary> + /// Infinite loop (bug 1187498) + /// </summary> + [Test] + public void LoopTest() + { + RunAndCompare("../../tests/loop.xml", "../../results/loop.xml"); + } + } public class TestResolver : XmlUrlResolver |
From: Oleg T. <he...@us...> - 2005-08-25 19:48:58
|
Update of /cvsroot/mvp-xml/Global/v1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19592/v1 Modified Files: Global.csproj Removed Files: Global.csproj.user Log Message: Index: Global.csproj =================================================================== RCS file: /cvsroot/mvp-xml/Global/v1/Global.csproj,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Global.csproj 20 Jul 2005 20:59:42 -0000 1.5 +++ Global.csproj 25 Aug 2005 19:48:48 -0000 1.6 @@ -17,7 +17,7 @@ DelaySign = "false" OutputType = "Library" PreBuildEvent = "" - PostBuildEvent = '@echo ########### Setting environment variables
call "$(DevEnvDir)..\Tools\vsvars32.bat"

@echo ########### Disassembing...
ildasm $(TargetFileName) /out=Mvp.Xml.il /nobar
@echo ########### Renaming EXSLT methods... 
$(ProjectDir)MethodRenamer.exe Mvp.Xml.il Mvp.Xml.Fixed.il
@echo ########### Assembling library back...
ilasm Mvp.Xml.Fixed.il /RESOURCE=Mvp.Xml.res /DLL /OUTPUT=$(TargetFileName) /KEY=../../mvp-xml.snk

@echo ########### Cleaning...
del Mvp.Xml.res
del Mvp.Xml.il
del Mvp.Xml.Fixed.il
del *.resources

' + PostBuildEvent = '@echo ########### Setting environment variables
call "$(DevEnvDir)..\Tools\vsvars32.bat"

@echo ########### Disassembing...
ildasm $(TargetFileName) /out=Mvp.Xml.il /nobar
@echo ########### Renaming EXSLT methods... 
"$(ProjectDir)MethodRenamer.exe" Mvp.Xml.il Mvp.Xml.Fixed.il
@echo ########### Assembling library back...
ilasm Mvp.Xml.Fixed.il /RESOURCE=Mvp.Xml.res /DLL /OUTPUT=$(TargetFileName) /KEY=../../mvp-xml.snk

@echo ########### Cleaning...
del Mvp.Xml.res
del Mvp.Xml.il
del Mvp.Xml.Fixed.il
del *.resources

' RootNamespace = "Mvp.Xml" RunPostBuildEvent = "OnBuildSuccess" StartupObject = "" @@ -91,7 +91,7 @@ /> <Reference Name = "system.web" - AssemblyName = "system.web" + AssemblyName = "System.Web" HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\system.web.dll" /> </References> --- Global.csproj.user DELETED --- |