diff --git a/example.xml b/example.xml
new file mode 100644
index 0000000..4834877
--- /dev/null
+++ b/example.xml
@@ -0,0 +1,65 @@
+
+
+
+ Calculate the n-th Fibonacci number. As a reminder: The first two Fibonacci numbers are 0 and 1. The following numbers are the sum of the previous two numbers (0, 1, 1, 2, 3, 5, 8, 13, 21...). The class should be named Fibonacci and the method to be written fibonacci has an int as an input parameter.
+ java
+
+
+
+
+
+
+
+ import junit.framework.TestCase;
+ public class FibonacciTest extends TestCase {
+ public void testPos() {
+ assertEquals(13, Fibonacci.fibonacci(7));
+ }
+ public void testNull() {
+ assertEquals(0, Fibonacci.fibonacci(0));
+ }
+ }
+
+
+ public class Fibonacci {
+ public int fibonacci(int i) {
+ if (i <= 0) return 0;
+ else if (i == 1) return 1;
+ return fibonacci(i - 2) + fibonacci(i - 1);
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+
+ Compilation test
+ java-compilation
+
+
+
+ Calculation test
+ unittest
+
+
+
+
+
+ FibonacciTest
+
+
+
+
+
+ Calculation of n-th Fibonacci number
+
+
diff --git a/proforma-jartest.xsd b/proforma-jartest.xsd
new file mode 100644
index 0000000..7d25faf
--- /dev/null
+++ b/proforma-jartest.xsd
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/proforma-regexptest.xsd b/proforma-regexptest.xsd
new file mode 100644
index 0000000..f4cde11
--- /dev/null
+++ b/proforma-regexptest.xsd
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/proforma-unittest.xsd b/proforma-unittest.xsd
new file mode 100644
index 0000000..b2b112f
--- /dev/null
+++ b/proforma-unittest.xsd
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/taskxml.xsd b/taskxml.xsd
index 1f9b80b..729aa5e 100644
--- a/taskxml.xsd
+++ b/taskx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
@@ -1,21 +1,20 @@
-#An XML exchange format for (programming) tasks
+# An XML exchange format for (programming) tasks
-**Version 0.9.3**
+**Version 1.0.1**
contributors listed in alphabetical order:
-Humboldt-Universität zu Berlin: Niels Pinkwart, Sven Strickroth
-Technische Universität Clausthal: Oliver Müller
-Universität Duisburg-Essen: Michael Striewe
-Hochschule Hannover: Sebastian Becker, Oliver J. Bott, Robert Garmann
-Universität Osnabrück: Helmar Gust, Nadine Werner
-Ostfalia Hochschule für Angewandte Wissenschaften: Stefan Bisitz, Stefan
-Dröschler, Nils Jensen, Uta Priss, Oliver Rod
+Humboldt-Universität zu Berlin: *Niels Pinkwart, Sven Strickroth*
+Technische Universität Clausthal: *Oliver Müller*
+Universität Duisburg-Essen: *Michael Striewe*
+Hochschule Hannover: *Sebastian Becker, Oliver J. Bott, Robert Garmann, Peter Werner*
+Universität Osnabrück: *Helmar Gust, Nadine Werner*
+Ostfalia Hochschule für Angewandte Wissenschaften: *Stefan Bisitz, Stefan Dröschler, Nils Jensen, Uta Priss, Oliver Rod*
[TOC]
-##Introduction
+## Introduction
This document specifies syntax and semantics for a standardized “Task
Format” - an exchange format for programming exercises/tasks. It
@@ -27,9 +26,9 @@ e-assessment tools considered for this format are Praktomat, VIPS, JACK,
GATE or Moodle-Grapper WS (inspired by Web-CAT) most of which are
included in the eCULT project “ProFormA”. The latest version of this
document and the corresponding XML Schema can be found at this address:
-http://go.ecult.me/13022046A
+https://github.com/ProFormA/taskxml/
-##General Structure
+## General Structure
The XML exchange format consists of two parts: The first section shows
the description/specification of a task, including supporting files; and
@@ -37,7 +36,7 @@ the second section demonstrates a specification of tests which are to be
included in the specification of a task under the \ tag. Each
task can have many tests.
-##Format specification
+## Format specification
The XML file can be exchanged as a standalone file. However, if it
refers to several files, it is recommended to combine the XML file and
@@ -47,81 +46,106 @@ be found by tools supporting this format. The XML file should be well
formed and encoded in UTF-8 (RFC 3629). ID’s are globally unique within
the XML document.
-##Task section
+## Task section
-###XML Specification
+### XML Specification
The general structure of the XML format is given as follows (this is
meant to provide an overview and does not represent a minimal document):
+```xml
+
+
+
+
-
-
-
-
+
-
+
-
+
-
+
-
-
-
-
-
-
+
+
+
+```
The following code shows the XML Schema for the Task Format:
+```xml
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+```
+
The document root element “task” holds the XML-namespace URI for the
current version number of the XML Task Format. The only currently valid
-value is “urn:proforma:task:v0.9.3”. The task itself must have an
-attribute “lang” which specifies the natural language used. The
-description, title etc should be written in this language. The content
+value is “urn:proforma:task:v1.0.1”.
+
+### Task attributes
+
+The task is identified by attribute "uuid", an automatic generated UUID
+in Version 4 (see RFC 4122). There is no need for monitoring the uniqueness,
+ the chance of generating two UUIDs having the same value is about 6 x 10^-11.
+
+The optional attribute "parent-uuid" is used whenever a task is changed. It is
+an pointer to the original task-uuid. This is usefull to generate a version tree
+in a later progress.
+
+The task itself must have an attribute “lang” which specifies the natural language
+used. The description, title etc should be written in this language. The content
of the “lang” attribute must comply with the IETF BCP 47, RFC 4647 and
ISO 639-1:2002 standards.
-###The description part
+### The description part
-
+```xml
+
+```
An instance of this element contains the task description as text. A
subset of HTML is allowed (see Appendix A).
-###The proglang part
+### The proglang part
-
-
+```xml
+
+
-
-
+
+
+```
An instance of this element contains the programming/modelling/query
language to which this task applies. A valid list of values is specified
@@ -131,77 +155,218 @@ to work with that version – any other requirements about version
compatibility must be checked externally.) The “version” must be
entered as a “point” separated list of up to four unsigned integers.
-###The submission part
+### The submission-restrictions part
-
-
-
-
-
-
-
-
+```xml
+
+
+
+
+
+
+
+```
An instance of this element can specify restrictions for the upload of
-(solution) files - by default there are no restrictions. The possible
-restrictions can be entered into a set of four optional attributes:
-“max-size”, “allowed-upload-filename-regexp”,
-“unpack-files-from-archive”, and “unpack-files-from-archive-regexp”. A
-prefix of “\^” and a postfix of “\$” is implicitly assumed and must not
-be specified explicitly.
-
-- “max-size” specifies the maximum size of a file in bytes which
- should be accepted. Systems which have a stronger limit of the file
- size should print a warning to the importing user. If this attribute
- is missing, a system default value will be used.
-- “allowed-upload-filename-regexp” holds a regular expression of the
- filenames (only the filename, without path) which the system should
- accept.
-- "unpack-files-from-archive" specifies if uploaded archives (zip/jar)
- should be unpacked automatically. If it is set to *false,* no
- extraction takes place and the archive is used as it is.
-- In case "unpack-files-from-archive" is set to *true,*
- “unpack-files-from-archive-regexp” is honoured which holds a regular
- expression that controls which files are automatically extracted
- (the filename of the uploaded archive must of course match
- “allowed-upload-filename-regexp”). Only matching files (the whole
- path of the zip-items matches with “/” as path separator) are
- extracted from the archive.
-
-###The files part
-
+(solution) files - by default there are no restrictions. There is a choose
+between three possible restrictions types.
+- [archive-restriction](#archive-restriction)
+- [file-restriction](#file-restriction)
+- [regexp-restriction](#regexp-restriction)
+
+All restriction types have two optional attributes
+
+- “max-size” specifies the maximum size of a file in bytes which should be
+ accepted. Systems which have a stronger limit of the file size should print a
+ warning to the importing user. If this attribute is missing, a system default
+ value will be used.
+- "mimetype-regexp" specifies the mimetype by regular expression of files the
+ system should accept (specified regexp language in [regexp-language-restriction]
+ (#regexp-language-specification))
+
+```xml
+
+
+
+
+
+
+```
+#### Archive restriction
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+...
+
+
+
+
+```
+
+ - "unpack-files-from-archive" specifies if uploaded archives (zip/jar) should
+ be unpacked automatically. If it is set to *false,* no extraction takes place
+ and the archive is used as it is.
+ - the filename of the uploaded archive must match "allowed-archive-filename"
+
+There is a choice for handling the file restrictions.
+
+1. by regexp: The archive may contain many files. The regular expression specifies, which files will be extracted from the archive
+
+```xml
+
+
+ regular expression
+
+
+```
+
+ - “unpack-files-from-archive-regexp” holds a regular expression that
+ controls which files are automatically extracted. Only matching files (the
+ whole path of the zip-items matches with “/” as path separator) are
+ extracted from the archive (specified regexp language in [regexp-language-restriction]
+ (#regexp-language-specification)).
+
+2. by filenames: The archive must or may contain files as specified by the following file restrictions
+
+```xml
+
+
+
+
+
+
+
+
+```
+
+- "required" the archive must contain a file with specified "path" (rooted at the archive root) and optional "mime-type-regexp". Otherwise the submission should be rejected.
+- "optional" the archive may contain a file with specified attributes
+
+#### File restriction
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+A submission must or may consist of files as specified by the file restrictions. A submission should be rejected, if it does not match the restrictions.
+
+```xml
+
+
+
+
+
+
+```
+
+- "required" the submission must have a file with specified "path" (rooted at the archive root). Otherwise the submission should be rejected.
+- "optional" the submission may have a file with specified attributes.
+
+#### Regexp restriction
+```xml
+
+
+
+
+
+
+
+
+```
+
+A submission must consist of one or several files, where all file names must adhere to the regular expression.
+
+```xml
+
+ regular expression
+
+```
+
+- "regexp-restriction" holds a regular expression of the filenames (only the filename, without path) which the system should accept. Regular expressions can contain less than/greater than signs. CDATA is allowed.
+
+#### Regexp language specification
+
+TODO!!!
+
+### The files part
+
+```xml
-
+
-
-
+
+
-
+
+```
The files element contains 0 or more file elements. A file element is
used to attach files to a task. Files can be external or embedded into
the XML file.
-###The file element
+### The file element
-
-
+```xml
+
+
-
-
+
+
-
+
+
@@ -216,8 +381,9 @@ the XML file.
-
-
+
+
+```
The file element includes or links a single file to a task. Each
instance/file must have a (task) unique string in its “id” attribute (in
@@ -232,6 +398,8 @@ using the “class” attribute with one of the following values:
students should work with.
- “instruction”: The file contains further instructions for handling
the task, e.g. an UML activity diagram.
+- “internal-library”: This file is not visible for students and holds
+ libraries which are required for processing the tests within the system.
- “internal”: This file is not visible for students and holds files
which are required for processing the task/tests within the system.
@@ -242,8 +410,8 @@ be provided in the optional “comment” attribute. The file itself can be
embedded into the XML (recommended for shorter plain text files) or can
be included in the ZIP-archive (recommended for binary files). If a file
is embedded, the “type” attribute must be set to “embedded” and the text
-content of the element is the file content. The “filename“ attribute has
-to be set to define a filename (e.g., for Java classes where the class
+content of the element is the file content. The “filename“ attribute can
+be set to define a filename (e.g., for Java classes where the class
name must be equal to the filename, it can also include a relative
path). This attribute defines the name the file will have when it is
executed. If the name is unimportant, a default name can be used. If a
@@ -253,36 +421,39 @@ archive (which can be different from the filename attribute).
-###The external-resources part
+### The external-resources part
+```xml
-
+
-
+
+```
The external-resources element contains 0 or more external-resource elements. An external-resource element is
-used to refer to a resource that is neither embedded nor directly attached to the task.
+used to refer to a resource that is neither embedded nor directly attached to the task.
-###The external-resource element
+### The external-resource element
+```xml
-
-
+
+
-
+```
Normally task files should be self-contained, but in rare cases the use of external resources is unavoidable for fulfilling or grading the task. The external-resource element basically contains a reference to that kind of resources. In its simplest form, the resource is identified by an identifier contained in the “reference” attribute. More complicated references can be specified in child elements of any namespace.
@@ -295,61 +466,55 @@ Each external resource element can be identified by its mandatory “id” attri
A task that references at least one external resource is not "self-contained" anymore. The author of the task should take care that the referenced resources are publicly available. Otherwise the task won't be reusable in other than the author's application context.
-###The model-solutions part
+### The model-solutions part
+```xml
-
+
+```
The model solutions element is used to provide one or more solutions of
the task. For each model-solution a new model-solution element is added.
-###The model-solution element
+### The model-solution element
+```xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
+
+```
-The model-solution element includes or links a single model-solution to
-a task. Each instance/solution must have a (task) unique string in its
-“id” attribute. The model-solution can be directly embedded into the XML
-file or attached in an extra file within the zip archive (cf. “The file
-part”). The optional attribute “comment” can be used for additional
+The model-solution element links one single model-solution to a task. Each
+instance/solution must have a (task) unique string in its “id” attribute.
+The model-solution must refer to one or more files using the filerefs/fileref tag.
+The optional attribute “comment” can be used for additional
information, for example if more than one model solution is provided it
can be explained why there are several solutions.
-###The tests part
+### The tests part
The tests element is used to provide automatic checks and tests for the
task. More specific information about the test XML is provided in the
-[second section](#id.gmls3d60jimk) of this paper.
+[second section](#test-section) of this paper.
-###The grading-hints element###
+### The grading-hints element
+```xml
@@ -357,6 +522,7 @@ task. More specific information about the test XML is provided in the
+```
An instance of this element holds information on how the creator of the
task intended the grading process. This element contains plain text or
@@ -364,16 +530,18 @@ arbitrary elements in different namespaces. This field is mainly
intended to support an exchange of grading ideas and also to allow tasks
to be exported and imported again from one system to another.
-###The meta-data element
+### The meta-data element
+```xml
-
+
+```
The meta-data element holds a namespace for the meta-data of each
system. Because meta-data are already standardized in other systems, it
@@ -382,50 +550,55 @@ meta-data relevant for the whole task should be entered here. Meta-data
that is specific to an individual test should be entered in the
test-meta-data element.
-##Test section
+## Test section
-###XML Specification
+### XML Specification
The general structure of the test description is given as follows:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
The corresponding XML schema for the test XML structure is:
+```xml
-
+
-
-
+
+
-
+
+```
-###The test element
+### The test element
+```xml
-
-
-
+
+
+
@@ -440,14 +613,17 @@ The corresponding XML schema for the test XML structure is:
+```
The test element has a required attribute “id” and an optional attribute
“validity”. The optional attribute “validity” is used by some systems
(such as Vips) for tests which only partially verify the solution code.
-###The title element
+### The title element
+```xml
+```
The title element is used to provide a short and clear name for the test
that can be displayed to students as part of their results. It should be
@@ -455,26 +631,30 @@ noted that the title does not have a language attribute because it is
assumed that the title is written in the same natural language as
specified for the task itself.
-###The test-type element
+### The test-type element
+```xml
+```
-Examples of values are: java-syntax, java-junittest3. A list of allowed
+Examples of values are: java-syntax, unittest. A list of allowed
entries is specified in Appendix C.
-###The test-configuration part
+### The test-configuration part
+```xml
-
-
+
+
-
+
-
+```
+
The test-configuration contains all parameters which are needed for
configuring this specific test. The test-configuration should either
contain a files part or a code element which contains the actual code of
@@ -482,48 +662,65 @@ the test. It has sub-elements which are required, however, each test can
also have elements of its own namespace for test-type specific
configuration options.
-###The filerefs part
+### The filerefs part
+```xml
-
-
+
+
+```
-Several filerefs can be specified via file elements.
+Several filerefs can be specified via fileref elements.
-###The fileref element
+### The fileref element
-
+```xml
+
+
+
+
+
+```
The fileref element links a single file to a test based on the ID of the
file which has to be defined in task/files. The ID has to be entered as
-the simple content of the fileref element.
+the refid attribute.
-###The externalconfigurationrefs part
+### The externalresourcerefs part
-
+```xml
+
-
+
+```
-Several externalconfigurationrefs can be specified via externalconfigurationref elements.
+Several externalresourcerefs can be specified via externalresourceref elements.
-###The externalconfigurationref element
+### The externalresourceref element
-
+```xml
+
+
+
+
+
+```
-The externalconfigurationref element links a single external-configuration to a test based on the ID of the
-external-configuration which has to be defined in task/external-configurations. The ID has to be entered as
-the simple content of the externalconfigurationref element.
+The externalresourceref element links a single external-resource to a test based on the ID of the
+external-resource which has to be defined in task/external-resources. The ID has to be entered as
+the refid attribute.
-###The test-meta-data element
+### The test-meta-data element
+```xml
@@ -531,15 +728,16 @@ the simple content of the externalconfigurationref element.
+```
The test-meta-data element holds a namespace for test-specific meta-data
of each system. This is particularly useful for attributes that are
required for ex- and import in one system but which are not relevant for
other systems.
-##Appendix A: Subset of HTML
+## Appendix A: Subset of HTML
-<\!\-\- … \-\-\\>, a, b, blockquote, br, p, sup, sub, center, div, dl, dd,
+<\!\-\- … \-\-\>, a, b, blockquote, br, p, sup, sub, center, div, dl, dd,
dt, em, font, h1, h2, h3, h4, h5, h6, hr, img, li, ol, strong, pre,
span, table, tbody, td, tr, th, tt and ul.
@@ -548,20 +746,20 @@ li, ol, hr, strong, pre, span, table, tbody, td, tr, th, tt and ul there
are no attributes allowed in order to avoid problems with different
layouts.
-##Appendix B: List of programming languages
+## Appendix B: List of programming languages
- java
- SQL
- prolog
-##Appendix C: List of test types
+## Appendix C: List of test types
- java-compilation
-- java-junit3
- java-checkstyle
- java-code-coverage-emma
- java-findbugs
- java-pmd
+- unittest (urn:proforma:tests:unittest:v1)
- dejagnu
- anonymity (heuristics for checking that students have not included
their names in the code)