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

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/ISO19136-AnxE/test-003.xq@8209
Revision 8191, 1.5 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:    003
4Description:    Asserts the existence of at least one publicly visible
5                                UML:Class within the target Application Schema package.
6Reference:             
7~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:)
8
9import module namespace mod-fr = "urn:local-module:ISO19136-V3.2-AnxE_XMI-V1.1:framework"
10at "#{ROOT_URL}ISO19136-AnxE/modules/module-framework-functions.xq";
11
12import module namespace mod-xp = "urn:local-module:ISO19136-V3.2-AnxE_XMI-V1.1:xmi-proc"
13at "#{ROOT_URL}ISO19136-AnxE/modules/module-xproc-functions.xq";
14
15declare namespace UML   = "omg.org/UML1.3";
16declare namespace cr    = "http://ndg.service.newmoon.conftest-result/1.0";
17
18(: Declare local variables, particular to this test :)
19declare variable $test-num as xs:integer := 3;
20declare variable $pass-msg as xs:string := "The Application Schema does contain at least one publicly visible class.";
21declare variable $fail-msg as xs:string := "The Application Schema does NOT contain at least one publicly visible class.";
22
23(: Declare the local assert function which defines a postive condition for pass :)
24declare function local:assert($doc-root as node()?) as node()?
25{
26        if (exists(mod-xp:get-target-app-schema($doc-root)//UML:Class[@visibility eq "public"])) then ()
27        else <cr:fail />
28};
29
30(: Create a new result element :)
31mod-fr:new-result($test-num, $pass-msg, $fail-msg, local:assert(/))
Note: See TracBrowser for help on using the repository browser.