You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(174) |
Nov
(85) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(56) |
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(1) |
Jul
(132) |
Aug
(5) |
Sep
|
Oct
(314) |
Nov
(133) |
Dec
(18) |
2006 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Oleg T. <he...@us...> - 2004-10-14 07:26:23
|
Update of /cvsroot/mvp-xml/XInclude/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11217/v1/src Modified Files: XInclude.csproj Added Files: SR.cs SR.resx Log Message: String resources collection. Index: XInclude.csproj =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/src/XInclude.csproj,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- XInclude.csproj 13 Oct 2004 17:46:59 -0000 1.4 +++ XInclude.csproj 14 Oct 2004 07:26:13 -0000 1.5 @@ -89,6 +89,16 @@ BuildAction = "Compile" /> <File + RelPath = "SR.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "SR.resx" + DependentUpon = "SR.cs" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "TextIncludingReader.cs" SubType = "Code" BuildAction = "Compile" --- NEW FILE: SR.cs --- #region using using System; using System.Resources; using System.Threading; #endregion namespace Mvp.Xml.XInclude { /// <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"); // } // } } } --- 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> --> </root> |
From: Oleg T. <he...@us...> - 2004-10-13 17:47:11
|
Update of /cvsroot/mvp-xml/XInclude/v1/test/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6609/v1/test/tests Added Files: binary.bin disclaimer.xml document.xml fallbacknotchildinclude.xml filenotfound.xml includechildofinclude.xml includesitself.xml nohref.xml nonxmlchar.xml result.xml twofallbacks.xml unknownparseattr.xml Log Message: Added some basic tests. --- NEW FILE: includechildofinclude.xml --- <?xml version="1.0"?> <document xmlns:xi="http://www.w3.org/2003/XInclude"> <p>120 Mz is adequate for an average home user.</p> <xi:include href="disclaimer2.xml" parse="xml"> <foo><xi:include href="disclaimer.xml"/></foo> <xi:include href="disclaimer.xml"/> <xi:fallback> <xi:include href="disclaimer.xml"/> </xi:fallback> <foo></foo> </xi:include> foo </document> --- NEW FILE: disclaimer.xml --- <?xml version='1.0'?> <!-- comment --> <?pi foo ?> <disclaimer> <p>The opinions represented herein represent those of the individual and should not be interpreted as official policy endorsed by this organization.</p> </disclaimer> --- NEW FILE: result.xml --- <?xml version="1.0" encoding="utf-8"?> <document xmlns:xi="http://www.w3.org/2003/XInclude"> <p>120 Mz is adequate for an average home user.</p> <!-- comment --> <?pi foo ?> <disclaimer xml:base="disclaimer.xml"> <p>The opinions represented herein represent those of the individual and should not be interpreted as official policy endorsed by this organization.</p> </disclaimer> foo </document> --- NEW FILE: fallbacknotchildinclude.xml --- <?xml version="1.0"?> <document xmlns:xi="http://www.w3.org/2003/XInclude"> <p>120 Mz is adequate for an average home user.</p> <xi:fallback>N/A</xi:fallback> <xi:include href="disclaimer.xml" parse="xml"><foo></foo></xi:include> foo </document> --- NEW FILE: nohref.xml --- <?xml version="1.0"?> <document xmlns:xi="http://www.w3.org/2003/XInclude"> <p>120 Mz is adequate for an average home user.</p> <xi:include parse="xml"><foo></foo></xi:include> foo </document> --- NEW FILE: document.xml --- <?xml version="1.0"?> <document xmlns:xi="http://www.w3.org/2003/XInclude"> <p>120 Mz is adequate for an average home user.</p> <xi:include href="disclaimer.xml" parse="xml"><foo></foo></xi:include> foo </document> --- NEW FILE: nonxmlchar.xml --- <?xml version="1.0"?> <document xmlns:xi="http://www.w3.org/2003/XInclude"> <p>120 Mz is adequate for an average home user.</p> <xi:include href="binary.bin" parse="text"/> foo </document> --- NEW FILE: binary.bin --- (This appears to be a binary file; contents omitted.) --- NEW FILE: filenotfound.xml --- <?xml version="1.0"?> <document xmlns:xi="http://www.w3.org/2003/XInclude"> <p>120 Mz is adequate for an average home user.</p> <xi:include href="thereisnosuchfile.xml"><foo></foo></xi:include> foo </document> --- NEW FILE: twofallbacks.xml --- <?xml version="1.0"?> <document xmlns:xi="http://www.w3.org/2003/XInclude"> <p>120 Mz is adequate for an average home user.</p> <xi:include href="disclaimer2.xml" parse="xml"> <foo><xi:include href="disclaimer.xml"/></foo> <xi:fallback> <xi:include href="disclaimer.xml"/> </xi:fallback> <xi:fallback> <xi:include href="disclaimer.xml"/> </xi:fallback> <foo></foo> </xi:include> foo </document> --- NEW FILE: unknownparseattr.xml --- <?xml version="1.0"?> <document xmlns:xi="http://www.w3.org/2003/XInclude"> <p>120 Mz is adequate for an average home user.</p> <xi:include href="disclaimer.xml" parse="foo"><foo></foo></xi:include> foo </document> --- NEW FILE: includesitself.xml --- <?xml version="1.0"?> <document xmlns:xi="http://www.w3.org/2003/XInclude"> <p>120 Mz is adequate for an average home user.</p> <xi:include href="includesitself.xml" parse="text"><foo></foo></xi:include> foo </document> |
From: Oleg T. <he...@us...> - 2004-10-13 17:47:09
|
Update of /cvsroot/mvp-xml/XInclude/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6609/v1/src Modified Files: XInclude.csproj XIncludingReader.cs Log Message: Added some basic tests. Index: XInclude.csproj =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/src/XInclude.csproj,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- XInclude.csproj 29 Sep 2004 21:26:28 -0000 1.3 +++ XInclude.csproj 13 Oct 2004 17:46:59 -0000 1.4 @@ -249,6 +249,12 @@ BuildAction = "Compile" /> <File + RelPath = "XPointer\IDAssuredValidatingReader.cs" + Link = "..\..\..\XPointer\v1\src\IDAssuredValidatingReader.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "XPointer\LexUtils.cs" Link = "..\..\..\XPointer\v1\src\LexUtils.cs" SubType = "Code" @@ -279,6 +285,18 @@ BuildAction = "Compile" /> <File + RelPath = "XPointer\SR.cs" + Link = "..\..\..\XPointer\v1\src\SR.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "XPointer\SR.resx" + Link = "..\..\..\XPointer\v1\src\SR.resx" + DependentUpon = "SR.cs" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "XPointer\XmlnsSchemaPointerPart.cs" Link = "..\..\..\XPointer\v1\src\XmlnsSchemaPointerPart.cs" SubType = "Code" Index: XIncludingReader.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/src/XIncludingReader.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- XIncludingReader.cs 6 Oct 2004 17:25:45 -0000 1.5 +++ XIncludingReader.cs 13 Oct 2004 17:46:59 -0000 1.6 @@ -854,7 +854,7 @@ //Push current reader to the stack _readers.Push(_reader); if (xpointer != null) - _reader = new XPointerReader(r, _nameTable, xpointer); + _reader = new XPointerReader(r, xpointer); else _reader = r; bool res = Read(); |
From: Oleg T. <he...@us...> - 2004-10-13 17:47:09
|
Update of /cvsroot/mvp-xml/XInclude/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6609/v1/test Modified Files: XIncludeTest.csproj Added Files: XIncludeReaderTests.cs XIncludeSyntaxTests.cs Log Message: Added some basic tests. Index: XIncludeTest.csproj =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/test/XIncludeTest.csproj,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- XIncludeTest.csproj 29 Sep 2004 07:46:16 -0000 1.1 +++ XIncludeTest.csproj 13 Oct 2004 17:46:59 -0000 1.2 @@ -9,7 +9,7 @@ <Settings ApplicationIcon = "" AssemblyKeyContainerName = "" - AssemblyName = "XIncludeTest" + AssemblyName = "Mvp.Xml.XInclude.Test" AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" @@ -18,7 +18,7 @@ OutputType = "Library" PreBuildEvent = "" PostBuildEvent = "" - RootNamespace = "XIncludeTest" + RootNamespace = "Mvp.Xml.XInclude.Test" RunPostBuildEvent = "OnBuildSuccess" StartupObject = "" > @@ -79,11 +79,80 @@ AssemblyName = "System.Xml" HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> + <Reference + Name = "nunit.framework" + AssemblyName = "nunit.framework" + HintPath = "..\..\..\..\..\Program Files\NUnit 2.2\bin\nunit.framework.dll" + AssemblyFolderKey = "hklm\dn\nunit.framework" + /> + <Reference + Name = "XInclude" + Project = "{3750FAB1-FD0E-425A-9DAA-87543A556319}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> </References> </Build> <Files> <Include> <File + RelPath = "XIncludeReaderTests.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "XIncludeSyntaxTests.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "tests\binary.bin" + BuildAction = "None" + /> + <File + RelPath = "tests\disclaimer.xml" + BuildAction = "Content" + /> + <File + RelPath = "tests\document.xml" + BuildAction = "Content" + /> + <File + RelPath = "tests\fallbacknotchildinclude.xml" + BuildAction = "Content" + /> + <File + RelPath = "tests\filenotfound.xml" + BuildAction = "Content" + /> + <File + RelPath = "tests\includechildofinclude.xml" + BuildAction = "Content" + /> + <File + RelPath = "tests\includesitself.xml" + BuildAction = "Content" + /> + <File + RelPath = "tests\nohref.xml" + BuildAction = "Content" + /> + <File + RelPath = "tests\nonxmlchar.xml" + BuildAction = "Content" + /> + <File + RelPath = "tests\result.xml" + BuildAction = "Content" + /> + <File + RelPath = "tests\twofallbacks.xml" + BuildAction = "Content" + /> + <File + RelPath = "tests\unknownparseattr.xml" + BuildAction = "Content" + /> + <File RelPath = "XInclude-Test-Suite\README.cvs" BuildAction = "None" /> --- NEW FILE: XIncludeReaderTests.cs --- using System; using System.Diagnostics; using System.Xml; using System.IO; using System.Text; using Mvp.Xml.XInclude; using NUnit.Framework; namespace Mvp.Xml.XInclude.Test { /// <summary> /// XIncludeReader general tests. /// </summary> [TestFixture] public class XIncludeReaderTests { public XIncludeReaderTests() { Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); } /// <summary> /// Utility method for running tests. /// </summary> public static void RunAndCompare(string source, string result) { XIncludingReader xir = new XIncludingReader(source); XmlDocument doc = new XmlDocument(); doc.Load(xir); MemoryStream ms = new MemoryStream(); doc.Save(new StreamWriter(ms, Encoding.UTF8)); ms.Position = 0; string actualResult = new StreamReader(ms).ReadToEnd(); StreamReader sr = new StreamReader(result); string expectedResult = sr.ReadToEnd(); sr.Close(); if (actualResult != expectedResult) { Console.WriteLine("Actual Result was {0}", actualResult); Console.WriteLine("Expected Result was {0}", expectedResult); } Assert.IsTrue(actualResult == expectedResult); } /// <summary> /// General test - it should work actually. /// </summary> [Test] public void ItWorksAtLeast() { RunAndCompare("../../tests/document.xml", "../../tests/result.xml"); } /// <summary> /// Non XML character in the included document. /// </summary> [Test] [ExpectedException(typeof(NonXmlCharacterException))] public void NonXMLChar() { RunAndCompare("../../tests/nonxmlchar.xml", "../../tests/result.xml"); } /// <summary> /// File not found and no fallback. /// </summary> [Test] [ExpectedException(typeof(FatalResourceException))] public void FileNotFound() { RunAndCompare("../../tests/filenotfound.xml", "../../tests/result.xml"); } /// <summary> /// Circular inclusion. /// </summary> [Test] [ExpectedException(typeof(CircularInclusionException))] public void IncludesItself() { RunAndCompare("../../tests/includesitself.xml", "../../tests/result.xml"); } } } --- NEW FILE: XIncludeSyntaxTests.cs --- using System; using System.Diagnostics; using Mvp.Xml.XInclude; using NUnit.Framework; namespace Mvp.Xml.XInclude.Test { /// <summary> /// XInclude syntax tests. /// </summary> [TestFixture] public class XIncludeSyntaxTests { public XIncludeSyntaxTests() { Debug.Listeners.Add(new TextWriterTraceListener(Console.Error)); } /// <summary> /// No href and no xpointer attribute. /// </summary> [Test] [ExpectedException(typeof(MissingHrefAndXpointerException))] public void NoHrefAndNoXPointerAttributes() { XIncludingReader xir = new XIncludingReader("../../tests/nohref.xml"); while (xir.Read()); xir.Close(); } /// <summary> /// xi:include child of xi:include. /// </summary> [Test] [ExpectedException(typeof(SyntaxError))] public void IncludeChildOfInclude() { XIncludingReader xir = new XIncludingReader("../../tests/includechildofinclude.xml"); while (xir.Read()); xir.Close(); } /// <summary> /// xi:fallback not child of xi:include. /// </summary> [Test] [ExpectedException(typeof(SyntaxError))] public void FallbackNotChildOfInclude() { XIncludingReader xir = new XIncludingReader("../../tests/fallbacknotchildinclude.xml"); while (xir.Read()); xir.Close(); } /// <summary> /// Unknown value of parse attribute. /// </summary> [Test] [ExpectedException(typeof(UnknownParseAttributeValueException))] public void UnknownParseAttribute() { XIncludingReader xir = new XIncludingReader("../../tests/unknownparseattr.xml"); while (xir.Read()); xir.Close(); } /// <summary> /// Two xi:fallback. /// </summary> [Test] [ExpectedException(typeof(SyntaxError))] public void TwoFallbacks() { XIncludingReader xir = new XIncludingReader("../../tests/twofallbacks.xml"); while (xir.Read()); xir.Close(); } } } |
From: Oleg T. <he...@us...> - 2004-10-13 17:42:39
|
Update of /cvsroot/mvp-xml/XInclude/v1/test/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5223/tests Log Message: Directory /cvsroot/mvp-xml/XInclude/v1/test/tests added to the repository |
From: Oleg T. <he...@us...> - 2004-10-12 17:32:26
|
Update of /cvsroot/mvp-xml/XInclude/v1/src/XPointer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23526/v1/src/XPointer Added Files: dummy.txt Log Message: --- NEW FILE: dummy.txt --- Dummy file to prevent pruning of the directory. |
From: Oleg T. <he...@us...> - 2004-10-12 17:32:26
|
Update of /cvsroot/mvp-xml/XInclude/v1/src/Common/XPath In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23526/v1/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...> - 2004-10-12 17:25:19
|
Update of /cvsroot/mvp-xml/XPointer/v1/src/Common/XPath In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21469/v1/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...> - 2004-10-11 21:27:03
|
Update of /cvsroot/mvp-xml/XPointer/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5334/v1/test Modified Files: changelog.txt Log Message: changelog Index: changelog.txt =================================================================== RCS file: /cvsroot/mvp-xml/XPointer/v1/test/changelog.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- changelog.txt 9 Oct 2004 19:53:49 -0000 1.2 +++ changelog.txt 11 Oct 2004 21:26:44 -0000 1.3 @@ -1,3 +1,9 @@ +--------------------------------------------------------- +October 11, 2004 + +Added test XML/XSD and unit test for schema-determined IDs. + +--------------------------------------------------------- October 9, 2004 Added unit tests. |
From: Oleg T. <he...@us...> - 2004-10-11 21:27:02
|
Update of /cvsroot/mvp-xml/XPointer/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5334/v1/src Modified Files: changelog.txt Log Message: changelog Index: changelog.txt =================================================================== RCS file: /cvsroot/mvp-xml/XPointer/v1/src/changelog.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- changelog.txt 9 Oct 2004 19:52:19 -0000 1.2 +++ changelog.txt 11 Oct 2004 21:26:44 -0000 1.3 @@ -1,3 +1,9 @@ +--------------------------------------------------------- +October 11, 2004 + +Added optional and limited support for schema-determined IDs. + +--------------------------------------------------------- October 9, 2004 Changed namespace to Mvp.Xml.XPointer. |
From: Oleg T. <he...@us...> - 2004-10-11 21:23:04
|
Update of /cvsroot/mvp-xml/XInclude/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3990/v1/test Removed Files: XIncludeTest.csproj.user Log Message: Removed *.suo and *.user. --- XIncludeTest.csproj.user DELETED --- |
From: Oleg T. <he...@us...> - 2004-10-11 21:23:04
|
Update of /cvsroot/mvp-xml/XInclude/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3990/v1/src Removed Files: XInclude.csproj.user Log Message: Removed *.suo and *.user. --- XInclude.csproj.user DELETED --- |
From: Oleg T. <he...@us...> - 2004-10-11 21:22:32
|
Update of /cvsroot/mvp-xml/XInclude/v1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3990/v1 Removed Files: XInclude.suo Log Message: Removed *.suo and *.user. --- XInclude.suo DELETED --- |
From: Oleg T. <he...@us...> - 2004-10-11 21:18:23
|
Update of /cvsroot/mvp-xml/XPointer/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2775/v1/test Removed Files: XPointerTest.csproj.user Log Message: Removed *.suo and *.user. --- XPointerTest.csproj.user DELETED --- |
From: Oleg T. <he...@us...> - 2004-10-11 21:18:22
|
Update of /cvsroot/mvp-xml/XPointer/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2775/v1/src Removed Files: XPointer.csproj.user Log Message: Removed *.suo and *.user. --- XPointer.csproj.user DELETED --- |
From: Oleg T. <he...@us...> - 2004-10-11 21:18:16
|
Update of /cvsroot/mvp-xml/XPointer/v1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2775/v1 Removed Files: XPointer.suo Log Message: Removed *.suo and *.user. --- XPointer.suo DELETED --- |
From: Oleg T. <he...@us...> - 2004-10-11 21:13:35
|
Update of /cvsroot/mvp-xml/Global In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1424 Removed Files: Mvp.Xml.suo Log Message: Removed *.suo and *.user. --- Mvp.Xml.suo DELETED --- |
From: Oleg T. <he...@us...> - 2004-10-11 21:10:30
|
Update of /cvsroot/mvp-xml/Common/v1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv709/v1 Removed Files: Common.suo Log Message: Removed *.suo and *.user. --- Common.suo DELETED --- |
From: Oleg T. <he...@us...> - 2004-10-11 21:10:29
|
Update of /cvsroot/mvp-xml/Common/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv709/v1/test Added Files: .cvsignore Removed Files: CommonTest.csproj.user Log Message: Removed *.suo and *.user. --- NEW FILE: .cvsignore --- bin obj *.user *.suo --- CommonTest.csproj.user DELETED --- |
From: Oleg T. <he...@us...> - 2004-10-11 21:10:27
|
Update of /cvsroot/mvp-xml/Common/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv709/v1/src Added Files: .cvsignore Removed Files: Common.csproj.user Log Message: Removed *.suo and *.user. --- NEW FILE: .cvsignore --- bin obj *.user *.suo --- Common.csproj.user DELETED --- |
From: Oleg T. <he...@us...> - 2004-10-11 21:00:43
|
Update of /cvsroot/mvp-xml/XPointer/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30610/v1/test Added Files: pubNS.xsd pubsNS.xml Log Message: Test documents for testing schema-determined IDs. --- 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: 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...> - 2004-10-11 20:58:32
|
Update of /cvsroot/mvp-xml/XPointer/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30247/v1/test Modified Files: EntryPoint.cs XPointerReaderTests.cs XPointerTest.csproj Log Message: Added tests for schema-determined IDs. Index: XPointerReaderTests.cs =================================================================== RCS file: /cvsroot/mvp-xml/XPointer/v1/test/XPointerReaderTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- XPointerReaderTests.cs 9 Oct 2004 19:53:49 -0000 1.2 +++ XPointerReaderTests.cs 11 Oct 2004 20:58:00 -0000 1.3 @@ -265,7 +265,7 @@ Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } - throw new InvalidOperationException("This means shorthand XPointer didn't work as expected."); + throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> @@ -283,7 +283,7 @@ Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } - throw new InvalidOperationException("This means shorthand XPointer didn't work as expected."); + throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> @@ -301,7 +301,7 @@ Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } - throw new InvalidOperationException("This means shorthand XPointer didn't work as expected."); + throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> @@ -331,7 +331,7 @@ Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } - throw new InvalidOperationException("This means shorthand XPointer didn't work as expected."); + throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> @@ -349,7 +349,7 @@ Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } - throw new InvalidOperationException("This means shorthand XPointer didn't work as expected."); + throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> @@ -368,7 +368,7 @@ Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } - throw new InvalidOperationException("This means shorthand XPointer didn't work as expected."); + throw new InvalidOperationException("This means XPointer didn't work as expected."); } /// <summary> @@ -386,7 +386,25 @@ Assert.AreEqual(xpr.ReadOuterXml(), expected); return; } - throw new InvalidOperationException("This means shorthand XPointer didn't work as expected."); + 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."); } } } Index: XPointerTest.csproj =================================================================== RCS file: /cvsroot/mvp-xml/XPointer/v1/test/XPointerTest.csproj,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- XPointerTest.csproj 9 Oct 2004 19:53:49 -0000 1.2 +++ XPointerTest.csproj 11 Oct 2004 20:58:00 -0000 1.3 @@ -117,6 +117,19 @@ BuildAction = "None" /> <File + RelPath = "pubNS.xsd" + BuildAction = "Content" + /> + <File + RelPath = "pubNS.xsx" + DependentUpon = "pubNS.xsd" + BuildAction = "None" + /> + <File + RelPath = "pubsNS.xml" + BuildAction = "Content" + /> + <File RelPath = "XPointerParserTests.cs" SubType = "Code" BuildAction = "Compile" Index: EntryPoint.cs =================================================================== RCS file: /cvsroot/mvp-xml/XPointer/v1/test/EntryPoint.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- EntryPoint.cs 9 Oct 2004 19:53:49 -0000 1.2 +++ EntryPoint.cs 11 Oct 2004 20:58:00 -0000 1.3 @@ -14,7 +14,7 @@ XPointerReaderTests rt = new XPointerReaderTests(); try { - rt.XPointerSchemeScalarResultTest(); + rt.XSDDefnedIDTest(); } catch (Exception e) { |
From: Oleg T. <he...@us...> - 2004-10-11 20:57:05
|
Update of /cvsroot/mvp-xml/XPointer/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30026/v1/src Modified Files: XPointer.csproj XPointerReader.cs Log Message: Added support for schema-determined IDs. Index: XPointer.csproj =================================================================== RCS file: /cvsroot/mvp-xml/XPointer/v1/src/XPointer.csproj,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- XPointer.csproj 9 Oct 2004 19:52:19 -0000 1.3 +++ XPointer.csproj 11 Oct 2004 20:56:47 -0000 1.4 @@ -98,6 +98,11 @@ BuildAction = "Compile" /> <File + RelPath = "IDAssuredValidatingReader.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "LexUtils.cs" SubType = "Code" BuildAction = "Compile" Index: XPointerReader.cs =================================================================== RCS file: /cvsroot/mvp-xml/XPointer/v1/src/XPointerReader.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- XPointerReader.cs 9 Oct 2004 19:52:19 -0000 1.2 +++ XPointerReader.cs 11 Oct 2004 20:56:47 -0000 1.3 @@ -24,7 +24,7 @@ //Underlying reader private XmlReader _reader; - private XPathNodeIterator _pointedNodes; + private XPathNodeIterator _pointedNodes; /// <summary> /// Initializes the <c>XPointerReader</c>. @@ -44,8 +44,7 @@ //do nothing } - - #endregion + #endregion #region constructors @@ -65,19 +64,52 @@ : this (new XmlTextReader(uri.AbsoluteUri, stream, nt), xpointer) {} /// <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(Uri uri, Stream stream, XmlNameTable nt, string xpointer, + bool supportSchemaDeterminedIDs) + : this (new XmlTextReader(uri.AbsoluteUri, stream, nt), xpointer, supportSchemaDeterminedIDs) {} + + /// <summary> /// Creates <c>XPointerReader</c> instance with given uri, stream and xpointer. /// </summary> public XPointerReader(Uri 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(Uri 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) + public XPointerReader(XmlReader reader, string xpointer, bool supportSchemaDeterminedIDs) { - XmlValidatingReader vr = new XmlValidatingReader(reader); + XmlValidatingReader vr = null; + if (supportSchemaDeterminedIDs) + { + vr = new IdAssuredValidatingReader(reader); + vr.ValidationType = ValidationType.Auto; + } + else + { + vr = new XmlValidatingReader(reader); + vr.ValidationType = ValidationType.None; + } vr.EntityHandling = EntityHandling.ExpandEntities; - vr.ValidationType = ValidationType.None; vr.ValidationEventHandler += new System.Xml.Schema.ValidationEventHandler(ValidationCallback); XPathDocument doc = new XPathDocument(vr, XmlSpace.Preserve); Init(doc, xpointer); |
From: Oleg T. <he...@us...> - 2004-10-11 20:55:57
|
Update of /cvsroot/mvp-xml/XPointer/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29783/v1/src Added Files: IDAssuredValidatingReader.cs Log Message: Auxillary XmlReader to support schema-determined IDs. --- NEW FILE: IDAssuredValidatingReader.cs --- #region using using System.Xml; #endregion /// <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> public class IdAssuredValidatingReader : XmlValidatingReader { #region private members private bool _exposeDummyDoctype; private bool _isInProlog = true; #endregion #region constructors public IdAssuredValidatingReader(XmlReader r) : base (r) {} #endregion #region XmlValidatingReader overrides public override XmlNodeType NodeType { get { return _exposeDummyDoctype ? XmlNodeType.DocumentType : base.NodeType; } } public override bool MoveToNextAttribute() { return _exposeDummyDoctype? false : base.MoveToNextAttribute(); } 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 } |
From: Oleg T. <he...@us...> - 2004-10-10 19:13:26
|
Update of /cvsroot/mvp-xml/XPointer/v1/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26248/v1/test Added Files: .cvsignore Log Message: --- NEW FILE: .cvsignore --- bin obj *.user *.suo |