Debian Codegraph @

net/sf/saxon/testdriver/Xslt30TestReport.java

raw symbols SCIP
1 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2018 Saxonica Limited.
3 // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4 // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
6 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7
8 package net.sf.saxon.testdriver;
9
10
11 import net.sf.saxon.Version;
12 import net.sf.saxon.s9api.Processor;
13 import net.sf.saxon.s9api.SaxonApiException;
14 import net.sf.saxon.s9api.XdmNode;
15
16 import javax.xml.stream.XMLStreamException;
17 import java.io.IOException;
18
19 public class Xslt30TestReport extends TestReport {
20
21 public static final String NS = "http://www.w3.org/2012/11/xslt30-test-results";
22
23 public Xslt30TestReport(TestDriver testDriver, Spec sp) {
24 super(testDriver, sp);
25 }
26
27 public void writeResultFilePreamble(Processor processor, XdmNode catalog)
28 throws IOException, SaxonApiException, XMLStreamException {
29 createWriter(processor);
30 results.writeStartElement(NS, "test-suite-result");
31 results.writeDefaultNamespace(NS);
32 results.writeStartElement(NS, "implementation");
33 results.writeAttribute("name", testDriver.getProductEdition());
34 results.writeAttribute("version", Version.getProductVersion());
35 results.writeAttribute("anonymous-result-column", "false");
36 results.writeEmptyElement(NS, "organization");
37 results.writeAttribute("name", "http://www.saxonica.com/");
38 results.writeAttribute("anonymous", "false");
39 results.writeEmptyElement(NS, "submitter");
40 results.writeAttribute("name", "Michael Kay");
41 results.writeAttribute("email", "[email protected]");
42 //outputDiscretionaryItems();
43 results.writeEmptyElement(NS, "configuration");
44 results.writeAttribute("timeRun", getTime());
45 results.writeAttribute("lang", testDriver.lang);
46 results.writeAttribute("bytecode", testDriver.isByteCode()?"on":"off");
47 results.writeAttribute("jit", testDriver.jitFlag?"on":"off");
48 if(testDriver.export) {
49 results.writeAttribute("export", "on");
50 }
51
52
53 results.writeEndElement(); //implementation
54 results.writeEmptyElement(NS, "test-run");
55 results.writeAttribute("dateRun", getDate());
56 results.writeAttribute("testsuiteVersion", "3.0.1");
57
58
59
60 }
61
62 @Override
63 public String getReportNamespace() {
64 return NS;
65 }
66 }
67