Project

Profile

Help

Revision 3df04590

Added by O'Neil Delpratt 10 months ago

Added nunit tests

View differences:

src/test/nunit/SaxonNUnit/SaxonNUnit.sln
1

2
Microsoft Visual Studio Solution File, Format Version 12.00
3
# Visual Studio 15
4
VisualStudioVersion = 15.0.26430.13
5
MinimumVisualStudioVersion = 10.0.40219.1
6
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SaxonNUnit", "SaxonNUnit\SaxonNUnit.csproj", "{DD67E034-1E1F-42CF-AA78-207767987EC1}"
7
EndProject
8
Global
9
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
10
		Debug|Any CPU = Debug|Any CPU
11
		Release|Any CPU = Release|Any CPU
12
	EndGlobalSection
13
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
14
		{DD67E034-1E1F-42CF-AA78-207767987EC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15
		{DD67E034-1E1F-42CF-AA78-207767987EC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
16
		{DD67E034-1E1F-42CF-AA78-207767987EC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
17
		{DD67E034-1E1F-42CF-AA78-207767987EC1}.Release|Any CPU.Build.0 = Release|Any CPU
18
	EndGlobalSection
19
	GlobalSection(SolutionProperties) = preSolution
20
		HideSolutionNode = FALSE
21
	EndGlobalSection
22
	GlobalSection(ExtensibilityGlobals) = postSolution
23
		SolutionGuid = {E3F5A287-3775-45EA-A531-A132011F8320}
24
	EndGlobalSection
25
EndGlobal
src/test/nunit/SaxonNUnit/SaxonNUnit/App.config
1
<?xml version="1.0" encoding="utf-8" ?>
2
<configuration>
3
</configuration>
src/test/nunit/SaxonNUnit/SaxonNUnit/ConfigTest.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5

  
6
namespace SaxonNUnit
7
{
8
    class ConfigTest
9
    {
10
        public static String NUNIT_DATA_DIR = "C:\\work\\repositories\\svn\\saxon-dev\\tests\\nunit\\testdata\\";
11
		public static String DATA_DIR =       "C:\\work\\repositories\\svn\\saxon-dev\\tests\\junit\\testdata\\";
12
        public static String DATA_DIR2 = "file:///C:/work/repositories/hg/saxon-development.core/tests/junit/testdata/";
13
        public static String XMARK_DIR = "C:\\work\repositories\\svn\\saxon-dev\\tests\\junit\\testdata\\";
14
        public static String RESOURCES_DIR = NUNIT_DATA_DIR;
15
        public static String XSLT3TS_DIR =   "C:\\work\\repositories\\hg\\xslt30-test\\tests\\";
16
    }
17
}
src/test/nunit/SaxonNUnit/SaxonNUnit/Program.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Reflection;
6

  
7

  
8
namespace Saxon9NUnit
9
{
10
    class Program
11
    {
12
        [STAThread]
13
        static void Main(string[] args)
14
        {
15
			string[] my_args = { "/run:SaxonNUnit.TestXsltTransformer.TestDotNetDOMSource", Assembly.GetExecutingAssembly().Location };
16

  
17
            int returnCode = 0;// new NUnitLite.AutoRun().Execute(my_args);//NUnit.ConsoleRunner.Runner.Main(my_args);
18

  
19
            if (returnCode != 0)
20
                Console.Beep();
21
        }
22
    }
23
}
src/test/nunit/SaxonNUnit/SaxonNUnit/Properties/Resource.Designer.cs
1
//------------------------------------------------------------------------------
2
// <auto-generated>
3
//     This code was generated by a tool.
4
//     Runtime Version:4.0.30319.18444
5
//
6
//     Changes to this file may cause incorrect behavior and will be lost if
7
//     the code is regenerated.
8
// </auto-generated>
9
//------------------------------------------------------------------------------
10

  
11
namespace Saxon9._7NUnit.data {
12
    using System;
13
    
14
    
15
    /// <summary>
16
    ///   A strongly-typed resource class, for looking up localized strings, etc.
17
    /// </summary>
18
    // This class was auto-generated by the StronglyTypedResourceBuilder
19
    // class via a tool like ResGen or Visual Studio.
20
    // To add or remove a member, edit your .ResX file then rerun ResGen
21
    // with the /str option, or rebuild your VS project.
22
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25
    internal class Resource1 {
26
        
27
        private static global::System.Resources.ResourceManager resourceMan;
28
        
29
        private static global::System.Globalization.CultureInfo resourceCulture;
30
        
31
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32
        internal Resource1() {
33
        }
34
        
35
        /// <summary>
36
        ///   Returns the cached ResourceManager instance used by this class.
37
        /// </summary>
38
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39
        internal static global::System.Resources.ResourceManager ResourceManager {
40
            get {
41
                if (object.ReferenceEquals(resourceMan, null)) {
42
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Saxon9._7NUnit.data.Resource", typeof(Resource1).Assembly);
43
                    resourceMan = temp;
44
                }
45
                return resourceMan;
46
            }
47
        }
48
        
49
        /// <summary>
50
        ///   Overrides the current thread"s CurrentUICulture property for all
51
        ///   resource lookups using this strongly typed resource class.
52
        /// </summary>
53
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54
        internal static global::System.Globalization.CultureInfo Culture {
55
            get {
56
                return resourceCulture;
57
            }
58
            set {
59
                resourceCulture = value;
60
            }
61
        }
62
        
63
        /// <summary>
64
        ///   Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;
65
        ///&lt;!DOCTYPE BOOKLIST [
66
        ///&lt;!ENTITY items SYSTEM &quot;items.xml&quot;&gt;
67
        ///&lt;!ENTITY categories SYSTEM &quot;categories.xml&quot;&gt;
68
        ///  
69
        ///]&gt;
70
        ///&lt;BOOKLIST&gt;
71
        ///  &lt;BOOKS&gt;
72
        ///    &amp;items;
73
        ///  &lt;/BOOKS&gt;
74
        ///  &amp;categories;
75
        ///&lt;/BOOKLIST&gt;
76
        ///.
77
        /// </summary>
78
        internal static string book_wrapper {
79
            get {
80
                return ResourceManager.GetString("book_wrapper", resourceCulture);
81
            }
82
        }
83
        
84
        /// <summary>
85
        ///   Looks up a localized string similar to &lt;xsl:stylesheet version=&quot;2.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
86
        ///  &lt;xsl:template match=&quot;/&quot; name=&quot;ca&quot;&gt;
87
        ///    &lt;out &gt;
88
        ///  &lt;/xsl:template&gt;
89
        ///&lt;/xsl:stylesheet&gt;.
90
        /// </summary>
91
        internal static string CA {
92
            get {
93
                return ResourceManager.GetString("CA", resourceCulture);
94
            }
95
        }
96
        
97
        /// <summary>
98
        ///   Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;
99
        ///   &lt;CATEGORIES DESC=&quot;Miscellaneous categories&quot;&gt;
100
        ///      &lt;CATEGORY CODE=&quot;P&quot; DESC=&quot;Paperback&quot;/&gt;
101
        ///      &lt;CATEGORY CODE=&quot;MMP&quot; DESC=&quot;Mass-market Paperback&quot;/&gt;
102
        ///      &lt;CATEGORY CODE=&quot;H&quot; DESC=&quot;Hard Cover&quot;/&gt;
103
        ///   &lt;/CATEGORIES&gt;.
104
        /// </summary>
105
        internal static string categories {
106
            get {
107
                return ResourceManager.GetString("categories", resourceCulture);
108
            }
109
        }
110
        
111
        /// <summary>
112
        ///   Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;
113
        ///      &lt;ITEM CAT=&quot;MMP&quot;&gt;
114
        ///         &lt;TITLE&gt;Pride and Prejudice&lt;/TITLE&gt;
115
        ///         &lt;AUTHOR&gt;Jane Austen&lt;/AUTHOR&gt;
116
        ///         &lt;PUBLISHER&gt;Modern Library&lt;/PUBLISHER&gt;
117
        ///         &lt;PUB-DATE&gt;2002-12-31&lt;/PUB-DATE&gt;
118
        ///         &lt;LANGUAGE&gt;English&lt;/LANGUAGE&gt;
119
        ///         &lt;PRICE&gt;0&lt;/PRICE&gt;
120
        ///         &lt;QUANTITY&gt;187&lt;/QUANTITY&gt;
121
        ///         &lt;ISBN&gt;0679601686&lt;/ISBN&gt;
122
        ///         &lt;PAGES&gt;352&lt;/PAGES&gt;
123
        ///         &lt;DIMENSIONS UNIT=&quot;in&quot;&gt;8.3 5.7 1.1&lt;/DIMENSIONS&gt;
124
        ///         &lt;WEIGHT UNIT=&quot;oz&quot;&gt;6.1&lt;/WEIGHT&gt;
125
        ///      &lt;/ITEM&gt;
126
        ///       [rest of string was truncated]&quot;;.
127
        /// </summary>
128
        internal static string items {
129
            get {
130
                return ResourceManager.GetString("items", resourceCulture);
131
            }
132
        }
133
        
134
        /// <summary>
135
        ///   Looks up a localized string similar to &lt;xsl:stylesheet version=&quot;2.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
136
        ///  &lt;xsl:import href=&quot;CA.xsl&quot;/&gt;
137
        ///
138
        ///  &lt;xsl:template match=&quot;/&quot;&gt;
139
        ///    &lt;!--&lt;xsl:call-template name=&quot;ca&quot;  /&gt; --&gt;
140
        ///    &lt;out&gt;test&lt;/out&gt;
141
        ///  &lt;/xsl:template&gt;
142
        ///&lt;/xsl:stylesheet&gt;.
143
        /// </summary>
144
        internal static string main {
145
            get {
146
                return ResourceManager.GetString("main", resourceCulture);
147
            }
148
        }
149
    }
150
}
src/test/nunit/SaxonNUnit/SaxonNUnit/Properties/Resource.resx
1
<?xml version="1.0" encoding="utf-8"?>
2
<root>
3
  <!-- 
4
    Microsoft ResX Schema 
5
    
6
    Version 2.0
7
    
8
    The primary goals of this format is to allow a simple XML format 
9
    that is mostly human readable. The generation and parsing of the 
10
    various data types are done through the TypeConverter classes 
11
    associated with the data types.
12
    
13
    Example:
14
    
15
    ... ado.net/XML headers & schema ...
16
    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
    <resheader name="version">2.0</resheader>
18
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
    </data>
25
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
        <comment>This is a comment</comment>
28
    </data>
29
                
30
    There are any number of "resheader" rows that contain simple 
31
    name/value pairs.
32
    
33
    Each data row contains a name, and value. The row also contains a 
34
    type or mimetype. Type corresponds to a .NET class that support 
35
    text/value conversion through the TypeConverter architecture. 
36
    Classes that don't support this are serialized and stored with the 
37
    mimetype set.
38
    
39
    The mimetype is used for serialized objects, and tells the 
40
    ResXResourceReader how to depersist the object. This is currently not 
41
    extensible. For a given mimetype the value must be set accordingly:
42
    
43
    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
    that the ResXResourceWriter will generate, however the reader can 
45
    read any of the formats listed below.
46
    
47
    mimetype: application/x-microsoft.net.object.binary.base64
48
    value   : The object must be serialized with 
49
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
            : and then encoded with base64 encoding.
51
    
52
    mimetype: application/x-microsoft.net.object.soap.base64
53
    value   : The object must be serialized with 
54
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
            : and then encoded with base64 encoding.
56

  
57
    mimetype: application/x-microsoft.net.object.bytearray.base64
58
    value   : The object must be serialized into a byte array 
59
            : using a System.ComponentModel.TypeConverter
60
            : and then encoded with base64 encoding.
61
    -->
62
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
    <xsd:element name="root" msdata:IsDataSet="true">
65
      <xsd:complexType>
66
        <xsd:choice maxOccurs="unbounded">
67
          <xsd:element name="metadata">
68
            <xsd:complexType>
69
              <xsd:sequence>
70
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
              </xsd:sequence>
72
              <xsd:attribute name="name" use="required" type="xsd:string" />
73
              <xsd:attribute name="type" type="xsd:string" />
74
              <xsd:attribute name="mimetype" type="xsd:string" />
75
              <xsd:attribute ref="xml:space" />
76
            </xsd:complexType>
77
          </xsd:element>
78
          <xsd:element name="assembly">
79
            <xsd:complexType>
80
              <xsd:attribute name="alias" type="xsd:string" />
81
              <xsd:attribute name="name" type="xsd:string" />
82
            </xsd:complexType>
83
          </xsd:element>
84
          <xsd:element name="data">
85
            <xsd:complexType>
86
              <xsd:sequence>
87
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
              </xsd:sequence>
90
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
              <xsd:attribute ref="xml:space" />
94
            </xsd:complexType>
95
          </xsd:element>
96
          <xsd:element name="resheader">
97
            <xsd:complexType>
98
              <xsd:sequence>
99
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
              </xsd:sequence>
101
              <xsd:attribute name="name" type="xsd:string" use="required" />
102
            </xsd:complexType>
103
          </xsd:element>
104
        </xsd:choice>
105
      </xsd:complexType>
106
    </xsd:element>
107
  </xsd:schema>
108
  <resheader name="resmimetype">
109
    <value>text/microsoft-resx</value>
110
  </resheader>
111
  <resheader name="version">
112
    <value>2.0</value>
113
  </resheader>
114
  <resheader name="reader">
115
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
  </resheader>
117
  <resheader name="writer">
118
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
  </resheader>
120
  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
121
  <data name="book_wrapper" type="System.Resources.ResXFileRef, System.Windows.Forms">
122
    <value>..\Resources\book-wrapper.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1</value>
123
  </data>
124
  <data name="CA" type="System.Resources.ResXFileRef, System.Windows.Forms">
125
    <value>..\Resources\CA.xsl;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
126
  </data>
127
  <data name="categories" type="System.Resources.ResXFileRef, System.Windows.Forms">
128
    <value>..\Resources\categories.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
129
  </data>
130
  <data name="items" type="System.Resources.ResXFileRef, System.Windows.Forms">
131
    <value>..\Resources\items.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
132
  </data>
133
  <data name="main" type="System.Resources.ResXFileRef, System.Windows.Forms">
134
    <value>..\Resources\main.xsl;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
135
  </data>
136
</root>
src/test/nunit/SaxonNUnit/SaxonNUnit/Properties/Resources.2resx
1
<?xml version="1.0" encoding="utf-8"?>
2
<root>
3
  <!-- 
4
    Microsoft ResX Schema 
5
    
6
    Version 2.0
7
    
8
    The primary goals of this format is to allow a simple XML format 
9
    that is mostly human readable. The generation and parsing of the 
10
    various data types are done through the TypeConverter classes 
11
    associated with the data types.
12
    
13
    Example:
14
    
15
    ... ado.net/XML headers & schema ...
16
    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
    <resheader name="version">2.0</resheader>
18
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
    </data>
25
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
        <comment>This is a comment</comment>
28
    </data>
29
                
30
    There are any number of "resheader" rows that contain simple 
31
    name/value pairs.
32
    
33
    Each data row contains a name, and value. The row also contains a 
34
    type or mimetype. Type corresponds to a .NET class that support 
35
    text/value conversion through the TypeConverter architecture. 
36
    Classes that don't support this are serialized and stored with the 
37
    mimetype set.
38
    
39
    The mimetype is used for serialized objects, and tells the 
40
    ResXResourceReader how to depersist the object. This is currently not 
41
    extensible. For a given mimetype the value must be set accordingly:
42
    
43
    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
    that the ResXResourceWriter will generate, however the reader can 
45
    read any of the formats listed below.
46
    
47
    mimetype: application/x-microsoft.net.object.binary.base64
48
    value   : The object must be serialized with 
49
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
            : and then encoded with base64 encoding.
51
    
52
    mimetype: application/x-microsoft.net.object.soap.base64
53
    value   : The object must be serialized with 
54
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
            : and then encoded with base64 encoding.
56

  
57
    mimetype: application/x-microsoft.net.object.bytearray.base64
58
    value   : The object must be serialized into a byte array 
59
            : using a System.ComponentModel.TypeConverter
60
            : and then encoded with base64 encoding.
61
    -->
62
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
    <xsd:element name="root" msdata:IsDataSet="true">
65
      <xsd:complexType>
66
        <xsd:choice maxOccurs="unbounded">
67
          <xsd:element name="metadata">
68
            <xsd:complexType>
69
              <xsd:sequence>
70
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
              </xsd:sequence>
72
              <xsd:attribute name="name" use="required" type="xsd:string" />
73
              <xsd:attribute name="type" type="xsd:string" />
74
              <xsd:attribute name="mimetype" type="xsd:string" />
75
              <xsd:attribute ref="xml:space" />
76
            </xsd:complexType>
77
          </xsd:element>
78
          <xsd:element name="assembly">
79
            <xsd:complexType>
80
              <xsd:attribute name="alias" type="xsd:string" />
81
              <xsd:attribute name="name" type="xsd:string" />
82
            </xsd:complexType>
83
          </xsd:element>
84
          <xsd:element name="data">
85
            <xsd:complexType>
86
              <xsd:sequence>
87
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
              </xsd:sequence>
90
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
              <xsd:attribute ref="xml:space" />
94
            </xsd:complexType>
95
          </xsd:element>
96
          <xsd:element name="resheader">
97
            <xsd:complexType>
98
              <xsd:sequence>
99
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
              </xsd:sequence>
101
              <xsd:attribute name="name" type="xsd:string" use="required" />
102
            </xsd:complexType>
103
          </xsd:element>
104
        </xsd:choice>
105
      </xsd:complexType>
106
    </xsd:element>
107
  </xsd:schema>
108
  <resheader name="resmimetype">
109
    <value>text/microsoft-resx</value>
110
  </resheader>
111
  <resheader name="version">
112
    <value>2.0</value>
113
  </resheader>
114
  <resheader name="reader">
115
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
  </resheader>
117
  <resheader name="writer">
118
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
  </resheader>
120
  <data name="book_wrapper" xml:space="preserve">
121
    <value />
122
  </data>
123
</root>
src/test/nunit/SaxonNUnit/SaxonNUnit/Properties/Resources2.Designer.cs
1
//------------------------------------------------------------------------------
2
// <auto-generated>
3
//     This code was generated by a tool.
4
//     Runtime Version:4.0.30319.42000
5
//
6
//     Changes to this file may cause incorrect behavior and will be lost if
7
//     the code is regenerated.
8
// </auto-generated>
9
//------------------------------------------------------------------------------
10

  
11
namespace Saxon9.NUnit.Properties {
12
    using System;
13
    
14
    
15
    /// <summary>
16
    ///   A strongly-typed resource class, for looking up localized strings, etc.
17
    /// </summary>
18
    // This class was auto-generated by the StronglyTypedResourceBuilder
19
    // class via a tool like ResGen or Visual Studio.
20
    // To add or remove a member, edit your .ResX file then rerun ResGen
21
    // with the /str option, or rebuild your VS project.
22
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25
    internal class Resources {
26
        
27
        private static global::System.Resources.ResourceManager resourceMan;
28
        
29
        private static global::System.Globalization.CultureInfo resourceCulture;
30
        
31
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32
        internal Resources() {
33
        }
34
        
35
        /// <summary>
36
        ///   Returns the cached ResourceManager instance used by this class.
37
        /// </summary>
38
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39
        internal static global::System.Resources.ResourceManager ResourceManager {
40
            get {
41
                if (object.ReferenceEquals(resourceMan, null)) {
42
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Saxon9.NUnit.Properties.Resources", typeof(Resources).Assembly);
43
                    resourceMan = temp;
44
                }
45
                return resourceMan;
46
            }
47
        }
48
        
49
        /// <summary>
50
        ///   Overrides the current thread's CurrentUICulture property for all
51
        ///   resource lookups using this strongly typed resource class.
52
        /// </summary>
53
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54
        internal static global::System.Globalization.CultureInfo Culture {
55
            get {
56
                return resourceCulture;
57
            }
58
            set {
59
                resourceCulture = value;
60
            }
61
        }
62
        
63
        /// <summary>
64
        ///   Looks up a localized string similar to .
65
        /// </summary>
66
        internal static string book_wrapper {
67
            get {
68
                return ResourceManager.GetString("book_wrapper", resourceCulture);
69
            }
70
        }
71
    }
72
}
src/test/nunit/SaxonNUnit/SaxonNUnit/Resource.resx
1
<?xml version='1.0' encoding='utf-8'?>
2
<root>
3
  <!-- 
4
    Microsoft ResX Schema 
5
    
6
    Version 2.0
7
    
8
    The primary goals of this format is to allow a simple XML format 
9
    that is mostly human readable. The generation and parsing of the 
10
    various data types are done through the TypeConverter classes 
11
    associated with the data types.
12
    
13
    Example:
14
    
15
    ... ado.net/XML headers & schema ...
16
    <resheader name='resmimetype'>text/microsoft-resx</resheader>
17
    <resheader name='version'>2.0</resheader>
18
    <resheader name='reader'>System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
    <resheader name='writer'>System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
    <data name='Name1'><value>this is my long string</value><comment>this is a comment</comment></data>
21
    <data name='Color1' type='System.Drawing.Color, System.Drawing'>Blue</data>
22
    <data name='Bitmap1' mimetype='application/x-microsoft.net.object.binary.base64'>
23
        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
    </data>
25
    <data name='Icon1' type='System.Drawing.Icon, System.Drawing' mimetype='application/x-microsoft.net.object.bytearray.base64'>
26
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
        <comment>This is a comment</comment>
28
    </data>
29
                
30
    There are any number of 'resheader' rows that contain simple 
31
    name/value pairs.
32
    
33
    Each data row contains a name, and value. The row also contains a 
34
    type or mimetype. Type corresponds to a .NET class that support 
35
    text/value conversion through the TypeConverter architecture. 
36
    Classes that don't support this are serialized and stored with the 
37
    mimetype set.
38
    
39
    The mimetype is used for serialized objects, and tells the 
40
    ResXResourceReader how to depersist the object. This is currently not 
41
    extensible. For a given mimetype the value must be set accordingly:
42
    
43
    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
    that the ResXResourceWriter will generate, however the reader can 
45
    read any of the formats listed below.
46
    
47
    mimetype: application/x-microsoft.net.object.binary.base64
48
    value   : The object must be serialized with 
49
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
            : and then encoded with base64 encoding.
51
    
52
    mimetype: application/x-microsoft.net.object.soap.base64
53
    value   : The object must be serialized with 
54
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
            : and then encoded with base64 encoding.
56

  
57
    mimetype: application/x-microsoft.net.object.bytearray.base64
58
    value   : The object must be serialized into a byte array 
59
            : using a System.ComponentModel.TypeConverter
60
            : and then encoded with base64 encoding.
61
    -->
62
  <xsd:schema id='root' xmlns='' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:msdata='urn:schemas-microsoft-com:xml-msdata'>
63
    <xsd:import namespace='http://www.w3.org/XML/1998/namespace' />
64
    <xsd:element name='root' msdata:IsDataSet='true'>
65
      <xsd:complexType>
66
        <xsd:choice maxOccurs='unbounded'>
67
          <xsd:element name='metadata'>
68
            <xsd:complexType>
69
              <xsd:sequence>
70
                <xsd:element name='value' type='xsd:string' minOccurs='0' />
71
              </xsd:sequence>
72
              <xsd:attribute name='name' use='required' type='xsd:string' />
73
              <xsd:attribute name='type' type='xsd:string' />
74
              <xsd:attribute name='mimetype' type='xsd:string' />
75
              <xsd:attribute ref='xml:space' />
76
            </xsd:complexType>
77
          </xsd:element>
78
          <xsd:element name='assembly'>
79
            <xsd:complexType>
80
              <xsd:attribute name='alias' type='xsd:string' />
81
              <xsd:attribute name='name' type='xsd:string' />
82
            </xsd:complexType>
83
          </xsd:element>
84
          <xsd:element name='data'>
85
            <xsd:complexType>
86
              <xsd:sequence>
87
                <xsd:element name='value' type='xsd:string' minOccurs='0' msdata:Ordinal='1' />
88
                <xsd:element name='comment' type='xsd:string' minOccurs='0' msdata:Ordinal='2' />
89
              </xsd:sequence>
90
              <xsd:attribute name='name' type='xsd:string' use='required' msdata:Ordinal='1' />
91
              <xsd:attribute name='type' type='xsd:string' msdata:Ordinal='3' />
92
              <xsd:attribute name='mimetype' type='xsd:string' msdata:Ordinal='4' />
93
              <xsd:attribute ref='xml:space' />
94
            </xsd:complexType>
95
          </xsd:element>
96
          <xsd:element name='resheader'>
97
            <xsd:complexType>
98
              <xsd:sequence>
99
                <xsd:element name='value' type='xsd:string' minOccurs='0' msdata:Ordinal='1' />
100
              </xsd:sequence>
101
              <xsd:attribute name='name' type='xsd:string' use='required' />
102
            </xsd:complexType>
103
          </xsd:element>
104
        </xsd:choice>
105
      </xsd:complexType>
106
    </xsd:element>
107
  </xsd:schema>
108
  <resheader name='resmimetype'>
109
    <value>text/microsoft-resx</value>
110
  </resheader>
111
  <resheader name='version'>
112
    <value>2.0</value>
113
  </resheader>
114
  <resheader name='reader'>
115
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
  </resheader>
117
  <resheader name='writer'>
118
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
  </resheader>
120
  <assembly alias='System.Windows.Forms' name='System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' />
121
  <data name='book_wrapper' type='System.Resources.ResXFileRef, System.Windows.Forms'>
122
    <value>Resources\book-wrapper.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1</value>
123
  </data>
124
  <data name='CA' type='System.Resources.ResXFileRef, System.Windows.Forms'>
125
    <value>Resources\CA.xsl;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
126
  </data>
127
  <data name='categories' type='System.Resources.ResXFileRef, System.Windows.Forms'>
128
    <value>Resources\categories.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
129
  </data>
130
  <data name='items' type='System.Resources.ResXFileRef, System.Windows.Forms'>
131
    <value>Resources\items.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
132
  </data>
133
  <data name='main' type='System.Resources.ResXFileRef, System.Windows.Forms'>
134
    <value>Resources\main.xsl;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
135
  </data>
136
</root>
src/test/nunit/SaxonNUnit/SaxonNUnit/Resources/CA.xsl
1
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
2
  <xsl:template match="/" name="ca">
3
    <out >
4
  </xsl:template>
5
</xsl:stylesheet>
src/test/nunit/SaxonNUnit/SaxonNUnit/Resources/book-wrapper.xml
1
<?xml version='1.0' encoding='iso-8859-1'?>
2
<!DOCTYPE BOOKLIST [
3
<!ENTITY items SYSTEM 'items.xml'>
4
<!ENTITY categories SYSTEM 'categories.xml'>
5
  
6
]>
7
<BOOKLIST>
8
  <BOOKS>
9
    &items;
10
  </BOOKS>
11
  &categories;
12
</BOOKLIST>
src/test/nunit/SaxonNUnit/SaxonNUnit/Resources/categories.xml
1
<?xml version="1.0" encoding="iso-8859-1"?>
2
   <CATEGORIES DESC="Miscellaneous categories">
3
      <CATEGORY CODE="P" DESC="Paperback"/>
4
      <CATEGORY CODE="MMP" DESC="Mass-market Paperback"/>
5
      <CATEGORY CODE="H" DESC="Hard Cover"/>
6
   </CATEGORIES>
src/test/nunit/SaxonNUnit/SaxonNUnit/Resources/items.xml
1
<?xml version="1.0" encoding="iso-8859-1"?>
2
      <ITEM CAT="MMP">
3
         <TITLE>Pride and Prejudice</TITLE>
4
         <AUTHOR>Jane Austen</AUTHOR>
5
         <PUBLISHER>Modern Library</PUBLISHER>
6
         <PUB-DATE>2002-12-31</PUB-DATE>
7
         <LANGUAGE>English</LANGUAGE>
8
         <PRICE>0</PRICE>
9
         <QUANTITY>187</QUANTITY>
10
         <ISBN>0679601686</ISBN>
11
         <PAGES>352</PAGES>
12
         <DIMENSIONS UNIT="in">8.3 5.7 1.1</DIMENSIONS>
13
         <WEIGHT UNIT="oz">6.1</WEIGHT>
14
      </ITEM>
15
      <ITEM CAT="P">
16
         <TITLE>Wuthering Heights</TITLE>
17
         <AUTHOR>Charlotte Bront?</AUTHOR>
18
         <PUBLISHER>Penguin Classics</PUBLISHER>
19
         <PUB-DATE>2002-12-31</PUB-DATE>
20
         <LANGUAGE>English</LANGUAGE>
21
         <PRICE>0</PRICE>
22
         <QUANTITY>113</QUANTITY>
23
         <ISBN>0141439556</ISBN>
24
         <PAGES>430</PAGES>
25
         <DIMENSIONS UNIT="in">1.0 5.2 7.8</DIMENSIONS>
26
         <WEIGHT UNIT="oz">11.2</WEIGHT>
27
      </ITEM>
28
      <ITEM CAT="P">
29
         <TITLE>Tess of the d'Urbervilles</TITLE>
30
         <AUTHOR>Thomas Hardy</AUTHOR>
31
         <PUBLISHER>Bantam Classics</PUBLISHER>
32
         <PUB-DATE>1984-05-01</PUB-DATE>
33
         <LANGUAGE>English</LANGUAGE>
34
         <PRICE>0</PRICE>
35
         <QUANTITY>85</QUANTITY>
36
         <ISBN>0553211684</ISBN>
37
         <PAGES>480</PAGES>
38
         <DIMENSIONS UNIT="in">6.8 4.2 0.8</DIMENSIONS>
39
         <WEIGHT UNIT="oz">7.7</WEIGHT>
40
      </ITEM>
41
      <ITEM CAT="P">
42
         <TITLE>Jude the Obscure</TITLE>
43
         <AUTHOR>Thomas Hardy</AUTHOR>
44
         <PUBLISHER>Penguin Classics</PUBLISHER>
45
         <PUB-DATE>1998-09-01</PUB-DATE>
46
         <LANGUAGE>English</LANGUAGE>
47
         <PRICE>0</PRICE>
48
         <QUANTITY>129</QUANTITY>
49
         <ISBN>0140435387</ISBN>
50
         <PAGES>528</PAGES>
51
         <DIMENSIONS UNIT="in">7.8 5.2 0.9</DIMENSIONS>
52
         <WEIGHT UNIT="oz">10.9</WEIGHT>
53
      </ITEM>
54
      <ITEM CAT="H">
55
         <TITLE>The Big Over Easy</TITLE>
56
         <AUTHOR>Jasper Fforde</AUTHOR>
57
         <PUBLISHER>Hodder &amp; Stoughton</PUBLISHER>
58
         <PUB-DATE>2005-07-11</PUB-DATE>
59
         <LANGUAGE>English</LANGUAGE>
60
         <PRICE>0</PRICE>
61
         <QUANTITY>129</QUANTITY>
62
         <ISBN>0340835672</ISBN>
63
         <PAGES>346</PAGES>
64
         <DIMENSIONS UNIT="cm">22.5 18.0 3.5</DIMENSIONS>
65
         <WEIGHT UNIT="g">390</WEIGHT>
66
      </ITEM>
67
      <ITEM CAT="P">
68
         <TITLE>The Eyre Affair</TITLE>
69
         <AUTHOR>Jasper Fforde</AUTHOR>
70
         <PUBLISHER>Penguin</PUBLISHER>
71
         <PUB-DATE>2003-02-25</PUB-DATE>
72
         <LANGUAGE>English</LANGUAGE>
73
         <PRICE>0</PRICE>
74
         <QUANTITY>129</QUANTITY>
75
         <ISBN>0142001805</ISBN>
76
         <PAGES>384</PAGES>
77
         <DIMENSIONS UNIT="in">7.8 5.0 0.9</DIMENSIONS>
78
         <WEIGHT UNIT="oz">9.0</WEIGHT>
79
      </ITEM>
src/test/nunit/SaxonNUnit/SaxonNUnit/Resources/main.xsl
1
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
2
  <xsl:import href="CA.xsl"/>
3

  
4
  <xsl:template match="/">
5
    <!--<xsl:call-template name="ca"  /> -->
6
    <out>test</out>
7
  </xsl:template>
8
</xsl:stylesheet>
src/test/nunit/SaxonNUnit/SaxonNUnit/SaxonNUnit.csproj
1
<?xml version="1.0" encoding="utf-8"?>
2
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
  <Import Project="..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props')" />
4
  <Import Project="..\packages\NUnit.3.10.1\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.10.1\build\NUnit.props')" />
5
  <PropertyGroup>
6
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8
    <ProjectGuid>{DD67E034-1E1F-42CF-AA78-207767987EC1}</ProjectGuid>
9
    <OutputType>Library</OutputType>
10
    <RootNamespace>SaxonNUnit</RootNamespace>
11
    <AssemblyName>SaxonNUnit</AssemblyName>
12
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13
    <TargetFrameworkProfile />
14
    <NuGetPackageImportStamp>
15
    </NuGetPackageImportStamp>
16
  </PropertyGroup>
17
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18
    <DebugSymbols>true</DebugSymbols>
19
    <DebugType>full</DebugType>
20
    <Optimize>false</Optimize>
21
    <OutputPath>bin\Debug</OutputPath>
22
    <DefineConstants>DEBUG;</DefineConstants>
23
    <ErrorReport>prompt</ErrorReport>
24
    <WarningLevel>4</WarningLevel>
25
    <ConsolePause>false</ConsolePause>
26
    <Prefer32Bit>false</Prefer32Bit>
27
    <LangVersion>7.2</LangVersion>
28
  </PropertyGroup>
29
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30
    <DebugType>full</DebugType>
31
    <Optimize>true</Optimize>
32
    <OutputPath>bin\Release</OutputPath>
33
    <ErrorReport>prompt</ErrorReport>
34
    <WarningLevel>4</WarningLevel>
35
    <ConsolePause>false</ConsolePause>
36
    <Prefer32Bit>false</Prefer32Bit>
37
    <LangVersion>7.2</LangVersion>
38
  </PropertyGroup>
39
  <ItemGroup>
40
    <Reference Include="IKVM.OpenJDK.Charsets, Version=7.5.0.1, Culture=neutral, PublicKeyToken=00d957d768bec828, processorArchitecture=MSIL">
41
      <SpecificVersion>False</SpecificVersion>
42
      <HintPath>..\..\..\..\..\..\..\..\..\Program Files\Saxonica\SaxonEE10.3N\bin\IKVM.OpenJDK.Charsets.dll</HintPath>
43
    </Reference>
44
    <Reference Include="IKVM.OpenJDK.Core, Version=7.5.0.1, Culture=neutral, PublicKeyToken=00d957d768bec828, processorArchitecture=MSIL">
45
      <SpecificVersion>False</SpecificVersion>
46
      <HintPath>..\..\..\..\..\..\..\..\..\Program Files\Saxonica\SaxonEE10.3N\bin\IKVM.OpenJDK.Core.dll</HintPath>
47
    </Reference>
48
    <Reference Include="IKVM.OpenJDK.Security, Version=7.5.0.1, Culture=neutral, PublicKeyToken=00d957d768bec828, processorArchitecture=MSIL">
49
      <SpecificVersion>False</SpecificVersion>
50
      <HintPath>..\..\..\..\..\..\..\..\..\Program Files\Saxonica\SaxonEE10.3N\bin\IKVM.OpenJDK.Security.dll</HintPath>
51
    </Reference>
52
    <Reference Include="IKVM.OpenJDK.Text, Version=7.5.0.1, Culture=neutral, PublicKeyToken=00d957d768bec828, processorArchitecture=MSIL">
53
      <SpecificVersion>False</SpecificVersion>
54
      <HintPath>..\..\..\..\..\..\..\..\..\Program Files\Saxonica\SaxonEE10.3N\bin\IKVM.OpenJDK.Text.dll</HintPath>
55
    </Reference>
56
    <Reference Include="IKVM.OpenJDK.Util, Version=7.5.0.1, Culture=neutral, PublicKeyToken=00d957d768bec828, processorArchitecture=MSIL">
57
      <SpecificVersion>False</SpecificVersion>
58
      <HintPath>..\..\..\..\..\..\..\..\..\Program Files\Saxonica\SaxonEE10.3N\bin\IKVM.OpenJDK.Util.dll</HintPath>
59
    </Reference>
60
    <Reference Include="IKVM.OpenJDK.XML.API, Version=7.5.0.1, Culture=neutral, PublicKeyToken=00d957d768bec828, processorArchitecture=MSIL">
61
      <SpecificVersion>False</SpecificVersion>
62
      <HintPath>..\..\..\..\..\..\..\..\..\Program Files\Saxonica\SaxonEE10.3N\bin\IKVM.OpenJDK.XML.API.dll</HintPath>
63
    </Reference>
64
    <Reference Include="IKVM.Runtime, Version=7.5.0.1, Culture=neutral, PublicKeyToken=00d957d768bec828, processorArchitecture=MSIL">
65
      <SpecificVersion>False</SpecificVersion>
66
      <HintPath>..\..\..\..\..\..\..\..\..\Program Files\Saxonica\SaxonEE10.3N\bin\IKVM.Runtime.dll</HintPath>
67
    </Reference>
68
    <Reference Include="nunit.framework, Version=3.10.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
69
      <HintPath>..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll</HintPath>
70
    </Reference>
71
    <Reference Include="saxon-ee-10.3, Version=10.3.0.0, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6, processorArchitecture=MSIL">
72
      <SpecificVersion>False</SpecificVersion>
73
      <HintPath>..\..\..\..\..\..\..\..\..\Program Files\Saxonica\SaxonEE10.3N\bin\saxon-ee-10.3.dll</HintPath>
74
    </Reference>
75
    <Reference Include="saxon-ee-api-10.3, Version=10.3.0.0, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6, processorArchitecture=MSIL">
76
      <SpecificVersion>False</SpecificVersion>
77
      <HintPath>..\..\..\..\..\..\..\..\..\Program Files\Saxonica\SaxonEE10.3N\bin\saxon-ee-api-10.3.dll</HintPath>
78
    </Reference>
79
    <Reference Include="System" />
80
    <Reference Include="System.XML" />
81
  </ItemGroup>
82
  <ItemGroup>
83
    <Compile Include="Properties\Resource.Designer.cs" />
84
    <Compile Include="Program.cs" />
85
    <Compile Include="SchemaValidator.cs" />
86
    <Compile Include="TestCollection.cs" />
87
    <Compile Include="TestDocumentBuilder.cs" />
88
    <Compile Include="ConfigTest.cs" />
89
    <Compile Include="TestIntegratedExtensionFunctionXslt.cs" />
90
    <Compile Include="TestPackage.cs" />
91
    <Compile Include="TestXdmArray.cs" />
92
    <Compile Include="TestXdmMap.cs" />
93
    <Compile Include="TestXPathCompiler31.cs" />
94
    <Compile Include="TestXPathCompiler.cs" />
95
    <Compile Include="TestXQuery.cs" />
96
    <Compile Include="TestXslt30Transformer.cs" />
97
    <Compile Include="TestTimingPerformance.cs" />
98
  </ItemGroup>
99
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
100
  <ItemGroup>
101
    <None Include="App.config" />
102
    <None Include="packages.config" />
103
  </ItemGroup>
104
  <ItemGroup>
105
    <EmbeddedResource Include="Resource.resx">
106
      <SubType>Designer</SubType>
107
    </EmbeddedResource>
108
  </ItemGroup>
109
  <ItemGroup>
110
    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
111
  </ItemGroup>
112
  <ItemGroup>
113
    <WCFMetadata Include="Connected Services\" />
114
  </ItemGroup>
115
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
116
    <PropertyGroup>
117
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
118
    </PropertyGroup>
119
    <Error Condition="!Exists('..\packages\NUnit.3.10.1\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.10.1\build\NUnit.props'))" />
120
    <Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props'))" />
121
  </Target>
122
</Project>
src/test/nunit/SaxonNUnit/SaxonNUnit/SchemaValidator.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Collections;
4
using System.Linq;
5
using System.IO;
6
using System.Text;
7
using Saxon.Api;
8
using NUnit.Framework;
9
using System.Xml;
10
using net.sf.saxon.tree.wrapper;
11

  
12
namespace SaxonNUnit
13
{
14
    class TestSchemaValidator
15
    {
16

  
17
        [Test]
18
        public void TestSimpleValidation()
19
        {
20
            UriBuilder ub = new UriBuilder();
21
            ub.Scheme = "file";
22
            ub.Host = "";
23
            ub.Path = @"C:\work\tests\";
24
            Uri baseUri = ub.Uri;
25

  
26
            Processor saxon = new Processor(true);
27
            //saxon.SetProperty("http://saxon.sf.net/feature/streamability", "standard");
28

  
29
            SchemaManager manager = saxon.SchemaManager;
30
            manager.ErrorList = new List<StaticError>();
31
          
32
            manager.XsdVersion = "1.1";
33

  
34
            Uri schemaUri = new Uri(baseUri, "SAFTPT.xsd");
35

  
36
            try
37
            {
38
                manager.Compile(schemaUri);
39
            }
40
            catch (Exception ex)
41
            {
42
                Console.WriteLine("Schema compilation failed with " + manager.ErrorList.Count + " errors");
43
                foreach (StaticError error in manager.ErrorList)
44
                {
45
                    Console.WriteLine("At line " + error.LineNumber + ": " + error.Message);
46
                }
47
                return;
48
            }
49

  
50
            Saxon.Api.SchemaValidator validator = manager.NewSchemaValidator();
51
            //Uri instanceUri = new Uri(baseUri, "SAFT-PT (500086826) (20160412 172334).xml");
52

  
53
            //10 gigas
54
            Stream fs = File.OpenRead(@"C:\work\tests\SAFT.xml");
55

  
56
            //300 megas
57
            //Stream fs = File.OpenRead("SAFT-PT (500086826) (20160412 172334).xml");
58

  
59
            validator.SetSource(fs, baseUri);
60
            validator.ErrorList = new List<ValidationFailure>();
61

  
62
            Console.WriteLine("\nFile Validating file.. ");
63

  
64
            try
65
            {
66
                validator.Run();
67
            }
68
            catch (Exception ex)
69
            {
70
                Console.WriteLine(ex.StackTrace);
71

  
72
                Console.WriteLine("\nInstance validation failed with " + validator.ErrorList.Count + " errors");
73
                using (StreamWriter writetext = new StreamWriter(@"C:\work\tests\validate.txt"))
74
                {
75
                    foreach (ValidationFailure error in validator.ErrorList)
76
                    {
77
                        //Console.WriteLine("At line " + error.LineNumber + ": " + error.Message);
78
                        writetext.WriteLine("At line " + error.GetLineNumber() + ": " + error.GetMessage());
79
                    }
80

  
81
                    Console.WriteLine("\n\nException: {0}", ex.Message);
82
                }
83

  
84
            }
85

  
86
            Console.WriteLine("\nFile validation terminated!");
87
            Console.ReadLine();
88
        }
89

  
90
        [Test]
91
        public void TestInvalidityHandler()
92
        {
93

  
94
            XmlReader xsd = XmlReader.Create(new StringReader("<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" elementFormDefault=\"qualified\" attributeFormDefault=\"unqualified\">\n" +
95
               "\t<xs:element name=\"request\">\n" +
96
               "\t\t<xs:complexType>\n" +
97
               "\t\t\t<xs:sequence>\n" +
98
               "\t\t\t\t<xs:element name=\"user_name\" type=\"xs:string\"/>\n" +
99
               "\t\t\t\t<xs:element name=\"password\" type=\"xs:string\"/>\n" +
100
               "\t\t\t\t<xs:element name=\"date1\" type=\"xs:date\"/>\n" +
101
               "\t\t\t\t<xs:element name=\"date2\" type=\"xs:date\"/>\n" +
102
               "\t\t\t</xs:sequence>\n" +
103
               "\t\t</xs:complexType>\n" +
104
               "\t</xs:element>\n" +
105
               "</xs:schema>"));
106

  
107
            XmlReader source_xml = XmlReader.Create(new StringReader("<?xml version='1.0'?><request><user_name>ed</user_name><password>sdsd</password><date1>a2009-01-01</date1><date2>b2009-01-01</date2></request>"));
108

  
109
            UriBuilder ub = new UriBuilder();
110
            ub.Scheme = "file";
111
            ub.Host = "";
112
            ub.Path = @"C:\work\tests\";
113
            Uri baseUri = ub.Uri;
114

  
115
            Processor saxon = new Processor(true);
116

  
117

  
118
            SchemaManager manager = saxon.SchemaManager;
119
            manager.ErrorList = new List<StaticError>();
120
            manager.XsdVersion = "1.1";
121

  
122

  
123
            try
124
            {
125
                manager.Compile(xsd);
126
            }
127
            catch (Exception ex)
128
            {
129
                Console.WriteLine("Schema compilation failed with " + manager.ErrorList.Count + " errors");
130
                foreach (StaticError error in manager.ErrorList)
131
                {
132
                    Console.WriteLine("At line " + error.LineNumber + ": " + error.Message);
133
                }
134
                return;
135
            }
136

  
137
            SchemaValidator validator = manager.NewSchemaValidator();
138
            validator.SetInvalidityHandler(new MyInvalidaityHandler());
139

  
140
            
141

  
142
            validator.SetSource(source_xml);
143
//            validator.ErrorList = new ArrayList();
144

  
145
            Console.WriteLine("\nFile Validating file.. ");
146

  
147
            try
148
            {
149
                validator.Run();
150
            }
151
            catch (StaticError ex)
152
            {
153
                Console.WriteLine(ex.StackTrace);
154
               
155
            }
156
        }
157

  
158
        public class MyInvalidaityHandler : IInvalidityHandler
159
        {
160
            public XdmValue endReporting()
161
            {
162
                return null;
163
            }
164

  
165
            public void reportInvalidity(ValidationFailure i)
166
            {
167
                Console.WriteLine(i.GetMessage());
168
            }
169

  
170
            public void startReporting(string systemId)
171
            {
172
                
173
            }
174
        }
175

  
176
        //throws out of memory exception
177
        [Test]
178
        public void SchemaValdiatorPerf() {
179
            // Load a schema
180

  
181
            Processor processor = new Processor(true);
182
        processor.SetProperty("http://saxon.sf.net/feature/timing", "true");
183
            processor.SetProperty("http://saxon.sf.net/feature/validation-warnings", "false"); //Set to true to suppress the exception
184
            SchemaManager manager = processor.SchemaManager;
185
        manager.XsdVersion = "1.1";
186
            manager.ErrorList = new List<StaticError>();
187

  
188
            UriBuilder ub = new UriBuilder();
189
            ub.Scheme = "file";
190
            ub.Host = "";
191
            ub.Path = @"C:\work\repositories\AHSAMedicalAgreements-v0030z\";
192
            Uri baseUri = ub.Uri;
193

  
194
            
195
            Uri schemaUri = new Uri(baseUri, "AHSAMedicalAgreements-v0030z.xsd");
196

  
197
            try
198
            {
199
                manager.Compile(schemaUri);
200
            }
201
            catch (Exception e)
202
            {
203
                Console.WriteLine(e);
204
                Console.WriteLine("Schema compilation failed with " + manager.ErrorList.Count + " errors");
205
                foreach (StaticError error in manager.ErrorList)
206
                {
207
                    Console.WriteLine("At line " + error.LineNumber + ": " + error.Message);
208
                }
209
                Assert.Fail();
210
            }
211

  
212

  
213
            // Use this to validate an instance document
214

  
215
            SchemaValidator validator = manager.NewSchemaValidator();
216

  
217
            XmlReaderSettings settings = new XmlReaderSettings();
218
            settings.DtdProcessing = DtdProcessing.Ignore;
219
            String inputFileName = new Uri(baseUri, "Providers-H-20200403 MASKED.xml").ToString();
220
            XmlReader xmlReader = XmlReader.Create(inputFileName, settings);
221
            validator.SetSource(xmlReader);
222
            Console.WriteLine("Validating input file " + inputFileName);
223
            validator.ErrorList = new List<ValidationFailure>();
224
            XdmDestination psvi = new XdmDestination();
225
            validator.SetDestination(psvi);
226

  
227
            try
228
            {
229
                validator.Run();
230
                net.sf.saxon.trace.Instrumentation.report();
231
            }
232
            catch (Exception e)
233
            {
234
                net.sf.saxon.trace.Instrumentation.report();
235
                Console.WriteLine(e);
236
                Console.WriteLine("Instance validation failed with " + validator.ErrorList.Count + " errors");
237
                foreach (ValidationFailure error in validator.ErrorList)
238
                {
239
                    Console.WriteLine("At line " + error.GetLineNumber() + ": " + error.GetMessage());
240
                }
241
                Assert.Fail();
242
            }
243

  
244

  
245

  
246

  
247
        }
248
    }
249
}
src/test/nunit/SaxonNUnit/SaxonNUnit/Test.cs
1
using NUnit.Framework;
2
using System;
3

  
4
namespace Saxon9.NUnit
5
{
6
	[TestFixture ()]
7
	public class Test
8
	{
9
		[Test ()]
10
		public void TestCase ()
11
		{
12
		}
13
	}
14
}
15

  
src/test/nunit/SaxonNUnit/SaxonNUnit/TestCollection.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using Saxon.Api;
5
using NUnit.Framework;
6
using System.Diagnostics;
7

  
8
namespace SaxonNUnit
9
{
10
    class TestCollection
11
    {
12
        [Test]
13
    public void TestDirectoryNoRecurse()
14
        {
15
            try
16
            {
17
                Processor p = new Processor(true);
18
                XPathCompiler c = p.NewXPathCompiler();
19
                XPathExecutable exec = c.Compile("collection(.)!document-uri(.)");
20
                XPathSelector eval = exec.Load();
21
                eval.ContextItem = (new XdmAtomicValue("file:///" + ConfigTest.DATA_DIR + "trax/xml/?select=*.xml"));
22
                XdmValue val = eval.Evaluate();
23
                Assert.AreEqual(5, val.Count);
24
            }
25
            catch (Exception e)
26
            {
27
                Assert.Fail(e.Message);
28
            }
29
        }
30

  
31
        [Test]
32
    public void TestDirectoryMatch()
33
        {
34
            try
35
            {
36
                Processor p = new Processor(true);
37
                XPathCompiler c = p.NewXPathCompiler();
38
                c.XPathLanguageVersion = "3.1";
39
                c.DeclareVariable(new QName("a"));
40
                c.DeclareVariable(new QName("b"));
41
                XPathExecutable exec = c.Compile("collection($a||'trax/xml/?match='||encode-for-uri($b))!document-uri(.)");
42
                XPathSelector eval = exec.Load();
43
                eval.SetVariable(new QName("a"), new XdmAtomicValue("file:///" + ConfigTest.DATA_DIR));
44
                eval.SetVariable(new QName("b"), new XdmAtomicValue("[A-Za-z]+\\.xml"));
45
                XdmValue val = eval.Evaluate();
46
                Assert.AreEqual(5, val.Count);
47
            } catch (Exception e)
48
            {
49
                Assert.Fail(e.Message);
50
            }
51
        }
52

  
53
        [Test]
54
    public void TestDirectoryNoRecurse30()
55
        {
56
            try
57
            {
58
                Processor p = new Processor(true);
59
                XPathCompiler c = p.NewXPathCompiler();
60
                c.XPathLanguageVersion = ("3.0");
61
                XPathExecutable exec = c.Compile("collection(.)!document-uri(.)");
62
                XPathSelector eval = exec.Load();
63
                eval.ContextItem = (new XdmAtomicValue("file:///" + ConfigTest.DATA_DIR + "trax/xml/?select=*.xml"));
64
                XdmValue val = eval.Evaluate();
65
                Assert.AreEqual(5, val.Count);
66
            }
67
            catch (Exception e)
68
            {
69
                Assert.Fail(e.Message);
70
            }
71
        }
72

  
73
        [Test]
74
    public void TestDirectoryRecurse()
75
        {
76
            try
77
            {
78
                Processor p = new Processor(true);
79
                XPathCompiler c = p.NewXPathCompiler();
80
                XPathExecutable exec = c.Compile("collection(.)!document-uri(.)");
81
                XPathSelector eval = exec.Load();
82
                eval.ContextItem = (new XdmAtomicValue("file:///" + ConfigTest.DATA_DIR + "trax/xml/?select=*.xml;recurse=yes"));
83
                XdmValue val = eval.Evaluate();
84
                Assert.AreEqual(7, val.Count, "found7");
85
            }
86
            catch (Exception e)
87
            {
88
                Assert.Fail(e.Message);
89
            }
90
        }
91

  
92
        [Test]
93
    public void TestDirectoryWithContentType()
94
        {
95
            try
96
            {
97
                Processor p = new Processor(true);
98
                XPathCompiler c = p.NewXPathCompiler();
99
                XPathExecutable exec = c.Compile("collection(.)");
100
                XPathSelector eval = exec.Load();
101
                eval.ContextItem = (new XdmAtomicValue("file:///" + ConfigTest.DATA_DIR + "trax/xml/?select=*.xml;recurse=yes;content-type=text/plain"));
102
                XdmValue val = eval.Evaluate();
103
                Assert.AreEqual(7, val.Count, "found7");
104
                Assert.True(val.ItemAt(0) is XdmAtomicValue, "isString");
105
            }
106
            catch (Exception e)
107
            {
108
                Assert.Fail(e.Message);
109
            }
110
        }
111

  
112
        [Test]
113
    public void TestDirectoryUriNoRecurse()
114
        {
115
            try
116
            {
117
                Processor p = new Processor(true);
118
                XPathCompiler c = p.NewXPathCompiler();
119
                XPathExecutable exec = c.Compile("uri-collection(.)");
120
                XPathSelector eval = exec.Load();
121
                eval.ContextItem = (new XdmAtomicValue(ConfigTest.DATA_DIR2 + "trax/xml/?select=*.xml"));
122
                XdmValue val = eval.Evaluate();
123
                Assert.AreEqual(5, val.Count);
124
            }
125
            catch (Exception e)
126
            {
127
                Assert.Fail(e.Message);
128
            }
129
        }
130

  
131
        [Test]
132
    public void TestDirectoryUriRecurse()
133
        {
134
            try
135
            {
136
                Processor p = new Processor(true);
137
                XPathCompiler c = p.NewXPathCompiler();
138
                XPathExecutable exec = c.Compile("uri-collection(.)");
139
                XPathSelector eval = exec.Load();
140
                eval.ContextItem = (new XdmAtomicValue(ConfigTest.DATA_DIR2 + "trax/xml/?select=*.xml;recurse=yes"));
141
                XdmValue val = eval.Evaluate();
142
                Assert.AreEqual(7, val.Count);
143
            }
144
            catch (Exception e)
145
            {
146
                Assert.Fail(e.Message);
147
            }
148
        }
149

  
150
        [Test]
151
    public void TestParallelSpeed()
152
        {
153
            try
154
            {
155
                for (int i = 0; i < 5; i++)
156
                {
157
                    speedTest(true);
158
                    speedTest(false);
159
                }
160
                TimeSpan serial = speedTest(false);
161
                Console.WriteLine("Serial processing (HE): " + serial.Milliseconds + "ms");
162
                TimeSpan parallel = speedTest(true);
163
                Console.WriteLine("Parallel processing (EE): " + parallel.Milliseconds + "ms");
164
                Assert.True(parallel < serial, "not faster!");
165
            }
166
            catch (Exception e)
167
            {
168
                Assert.Fail(e.Message);
169
            }
170
        }
171

  
172
        private TimeSpan speedTest(bool parallel)
173
        {
174
            Processor p = new Processor(parallel);
175
            Stopwatch stopwatch = Stopwatch.StartNew();
176
            TimeSpan startTime = stopwatch.Elapsed;
177

  
178
            XPathCompiler c = p.NewXPathCompiler();
179
            XPathExecutable exec = c.Compile("sum(collection(.)!count(//*))");
180
            XPathSelector eval = exec.Load();
181
            eval.ContextItem = (new XdmAtomicValue("file:///" + ConfigTest.DATA_DIR + "collection/?select=*.xml;recurse=yes"));
182
            XdmValue val = eval.Evaluate();
183
            stopwatch.Stop();
184
            TimeSpan apiTime = stopwatch.Elapsed;
185
            Console.WriteLine("Found " + val + " nodes");
186
            return apiTime;
187
    }
188

  
189
    [Test]
190
    public void TestStable()
191
    {
192
        try
193
        {
194
            Processor p = new Processor(true);
195
            XPathCompiler c = p.NewXPathCompiler();
196
            XPathExecutable exec = c.Compile("count(collection(.)//* | collection(.)//*)");
197
            XPathSelector eval = exec.Load();
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff