LML-Validation-tool
Downloads
LML-validation-tool for LML of
Version 1.3 |
tar.gz |
In order to generate valid
LML-files it is useful to check the validity against the XML-Schema,
which defines the structure and main rules for LML-files.
Unfortunately, some constraints for LML-files cannot be defined with an
XML-Schema. For example: it is not possible to define the rule, that
the value of a min-attribute within a nodedisplay-tag is smaller than
the value of the corresponding max-attribute.
<el1 min="10" max="3" oid="job1" />
At present there is no way to define with an XML-Schema that this
LML-code is incorrect. It is important to catch these errors so that
applications, which use LML as input, do not have to scan for these
errors. This makes it easier to handle the complex LML-structure. The
program can expect LML-files to be valid. As a result processing
LML-files can be realized very fast, because many errors and exceptions
can be foreclosed before the program starts.
There are many ways to define rules for XML-files in addition to the
global structure given by the XML-Schema. The validation tool, which
can be downloaded from this homepage, uses XSLT-files to define
additional constraints. Some constraints are difficult to define with
the concept of XSLT. These rules are checked by a java-application
especially implemented for checking special rules for LML-files.
Summary:
LML-files have to pass the following tests to be evaluated as valid:
- Test against XML-Schema
- Test with an XSL-file,
which defines more complex constraints
- Test special constraints by a Java-application,
which
are difficult to define by the previous methods
The LML-validation-tool can be used to check all rules defined for
LML-files. If the generated LML-file passes all checks, the file can be
evaluated as valid.
The download for this validation-tool contains a README, which explains
how to install and use the tool.
Documentation of tested constraints
In addition to validating LML-files against the LML's Schema the
following constraints are checked by this validation tool:
The following constraints are checked by XSL-transformations:
- nodedisplay-checks
- check min and max-attributes against min<=max in scheme
and in data
- every element needs to define at least a min or a
list-attribute
- if min is defined, list is not allowed and vice versa
- if max is defined, then min has to be defined
- if step is defined, then min has to be defined
- within data-tag: elX-element with depth X is only allowed if
at least one elX-element appears in scheme-tag
- at least one tagname has to be defined for every level
- count of names in map-attribute must be greater or equal to
count of
elements (given by min-max-range or list), so that implicit names can
identify elements
- either use mask-attribute or map-attribute but not both in
one tag
- Base nodedisplays
- base nodedisplays are not allowed to use refid-attributes
- base nodedisplay must define an oid for every
system-element in the data-tag
- oid-attributes must refer to objects of type job
- name-attributes must not refer to jobs or queues, but
only physical elements in the system
- it is not allowed to use the name-attribute within lists
of elements; name can only be used if all upper elements have max=min
- Referencing nodedisplays
- it is not allowed to use the refid-attribute within lists
of elements => refid can only be used if all upper elements have
max=min
- referencing nodedisplays are not allowed to use attribute
oid
- referencing nodedisplays are not allowed to use attribute
name
- referencing nodedisplays are not allowed to use attribute
status
- table-checks
- every row must contain at most as many cells as columns are
defined
- check implicit ids given by position and
preceding-sibling-cid-attributes for uniqueness and being allowed by
column-definitions
- cells with sort-type date need to match the regular
expression:
^\d{2}/\d{2}/\d{2}\s*(\d{2}:\d{2}:\d{2})?$
- tablelayout-checks
- check if cid-attributes of tablelayout go with id-attributes
of table
- pos needs to be in {0..#columns-1}. pos-attribute can not
comprise
a value higher then maximum of positions
- sorted must not be equal to "false" more than once, because
the
table can only be sorted by one column
- infoboxlayout-checks
- sorted must not be equal to "false" more than once, because
the
table can only be sorted by one column (see tablelayout-checks)
- textlayout-checks
- referred text-tag needs to contain an info-tag, otherwise a
layout-definition is forbidden
- usagebar-checks
- cpucount-value needs to be equal to sum of cpucount-values of
inner job-tags
- cpucount-value of a job-tag must be equal to sum of
cpucount-values of inner jobpart-tags
- chart-checks
- min-attribute must be lower or equal to max attributes in
x-tag within axes
- min-attribute must be lower or equal to max attributes in
y-tag within axes
- splitlayout-checks
- a splitpane, which has lower elements, must not define the
gid-attribute
- a leave-node within splitlayout must not define the
divpos-attribute
- a leave-node within splitlayout must define gid
- a splitpane-tag contains zero or two children
The following constraints are checked by a Java-application:
- additional nodedisplay-checks
- the defined data-nodes must be allowed by the scheme of the
corresponding nodedisplay; the scheme of the nodedisplay defines the
structure of the corresponding data-tag
- in a base nodedisplay all el1-elements defined by a scheme
must
be covered by el1-tags within the data-tag; this means that the first
level of the tree described by the scheme has to be defined in the
data-tag. Thus every physical element in the nodedisplay is connected
to a job (explicitly or through oid-inheritance)
- it is not allowed to connect a physical element within a
nodedisplay to a job more than once; on every level of the data-tree an
id must not be used more than once
- it is not allowed to define multiple scheme-tags for the same
id.
As a result the ranges of the scheme-elements must not overlap
- check nodedisplay-refid-attributes. The used names
referencing implicit objects must be allowed by the naming scheme of
the referred nodedisplay.
Home | last change 20.08.2013 | copyright see
Copyright and Disclaimer | contact: c.karbach@fz-juelich.de