Project

Profile

Help

How to connect?
Download (1.97 KB) Statistics
| Branch: | Revision:

he / src / samples / cs / TestRunner10.0 / Xslt30ResultsDocument.cs @ be17ef52

1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using Saxon.Api;
6

    
7
namespace TestRunner
8
{
9

    
10
public class Xslt30ResultsDocument : ResultsDocument {
11

    
12
    public Xslt30ResultsDocument(string rdir, Spec sp)
13
         : base(rdir, sp){
14
    }
15

    
16
    public override void writeResultFilePreamble(Processor processor, XdmNode catalog) {
17
        createWriter(processor);
18
        String today = DateTime.Now.ToString();
19
        //XdmNode outermost = (XdmNode)catalog.EnumerateAxis(XdmAxis.Child, new QName(FOTestSuiteDriver.CNS, "catalog")).Current;
20
        results.WriteStartElement("test-suite-result", "http://www.w3.org/2012/11/xslt30-test-results");
21
        results.WriteStartElement("submission");
22
        results.WriteAttributeString("anonymous", "false");
23

    
24
        results.WriteStartElement("created");
25
        results.WriteAttributeString("by", "Michael Kay");
26
        results.WriteAttributeString("email", "mike@saxonica.com");
27
        results.WriteAttributeString("organization", "Saxonica");
28
        results.WriteAttributeString("on", today);
29
        results.WriteEndElement();
30

    
31
        results.WriteStartElement("test-run");
32
		results.WriteAttributeString("testsuiteVersion", "3.0.1");
33
        results.WriteAttributeString("date-run", today);
34
        results.WriteEndElement();
35

    
36
        results.WriteStartElement("notes");
37
        results.WriteEndElement(); // notes
38

    
39
        results.WriteEndElement(); // submission
40

    
41
        results.WriteStartElement("product");
42

    
43
        results.WriteAttributeString("vendor", "Saxonica");
44
        results.WriteAttributeString("name", "Saxon-EEN");
45
        results.WriteAttributeString("version", processor.ProductVersion);
46
        results.WriteAttributeString("released", "false");
47
        results.WriteAttributeString("open-source", "false");
48
        results.WriteAttributeString("language", ((SpecAttr)spec.GetAttr()).svname);
49
        results.WriteEndElement(); //product
50

    
51
    }
52

    
53
}
54
}
55

    
(17-17/19)