source: mauRepo/ISO19136-AnxE/test-025.xq @ 8191

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/ISO19136-AnxE/test-025.xq@8406
Revision 8191, 1.2 KB checked in by mnagni, 8 years ago (diff)

#{ROOT_URL}ISO19136-AnxE parametrized the import URLs

Line 
1xquery version "1.0";
2(:~~~~~~~~~~~~~~~~~~~~~~~~~~ Conformance Test  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3Test Number:    025
4Description:    Asserts Input model must be XMI version 1.1.
5Reference:             
6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:)
7
8import module namespace mod-fr = "urn:local-module:ISO19136-V3.2-AnxE_XMI-V1.1:framework"
9at "#{ROOT_URL}ISO19136-AnxE/modules/module-framework-functions.xq";
10
11declare namespace UML   = "omg.org/UML1.3";
12declare namespace cr    = "http://ndg.service.newmoon.conftest-result/1.0";
13
14(: Declare local variables, particular to this test :)
15declare variable $test-num as xs:integer := 25;
16declare variable $pass-msg as xs:string := "Input model is serialized using XMI v1.1";
17declare variable $fail-msg as xs:string := "Input model is NOT serialized using XMI v1.1 - please re-generate the model document using the correct XMI version.";
18
19(: Declare the local assert function which defines a postive condition for pass :)
20declare function local:assert($doc-root as node()?) as node()?
21{
22        if ($doc-root/XMI/@xmi.version ne "1.1") then
23                <cr:fail />
24        else ()
25};
26
27(: Create a new result element :)
28mod-fr:new-result($test-num, $pass-msg, $fail-msg, local:assert(/))
Note: See TracBrowser for help on using the repository browser.