Commit 78eda58b authored by urbant's avatar urbant
Browse files

STF 521: New XSD tests (base on ETSI ES 201 873-9 V4.7.1)

parent ee59ba90
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 521
 ** @version  0.0.1
 ** @purpose  9:5.2.2, Conversion of module names
 ** @verdict  pass accept, ttcn3verdict:pass
***************************************************/
// The following requirements are tested:
// Rule a: Target namespace values used in XSD schema documents shall be ordered 
// alphabetically, independently from the above components (after conversion they are
// merely used as TTCN-3 module names). The string value of the target namespace values 
// shall be used, i.e. without un-escaping or removing trailing “/” SOLIDUS characters
//  of the authority part or any other changes to the character string.

// Rule e: 
// "_" (LOW LINE) characters occurring at the beginning or at the end of the name shall
// be removed, except trailing "_" (LOW LINE) characters resulted from converting target
// namespace values (to be used as TTCN-3 module names); 

module Pos_050202_name_conversion_rules_024 {

   import from schema_Pos_050202_name_conversion_rules_024 language "XSD" all;
   import from schema_Pos_050202_name_conversion_rules_024_ language "XSD" all;

   template schema_Pos_050202_name_conversion_rules_024_.Test m_msg := "abc";

//#TC

}
+2 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<ns:Test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="schema:Pos_050202_name_conversion_rules_024/">abc</ns:Test>
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
  targetNamespace="schema:Pos_050202_name_conversion_rules_024"
  xmlns:ns="schema:Pos_050202_name_conversion_rules_024">
  <element name="Test" type="integer" />
</schema>
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
  targetNamespace="schema:Pos_050202_name_conversion_rules_024/"
  xmlns:ns="schema:Pos_050202_name_conversion_rules_024/">
  <element name="Test" type="string" />
</schema>
+27 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 521
 ** @version  0.0.1
 ** @purpose  9:5.2.2, Resolving name conflict in module names (not ending with underline)
 ** @verdict  pass accept, ttcn3verdict:pass
***************************************************/
// The following requirements are tested:
// Rule a: If the name being generated is the name of a TTCN-3 module and the character 
// string generated by items a) to e) above is identical to an another, previously 
// generated TTCN-3 module name, then a postfix shall be appended to the character 
// string: the postfix shall consist of a "_" (LOW LINE) followed by the canonical 
// lexical representation (see W3C XML Schema Part 2 [9], clause 2.3.1) of an integer, 
// unless the name already finishes with a "_" (LOW LINE) character, in which case the 
// postfix is an integer only. This integer shall be the least positive integer such 
// that the new name is different from all previously generated TTCN 3 modules names 
// and clashing definition name.

module Pos_050202_name_conversion_rules_025 {

   import from schema_Pos_050202_name_conversion_rules_025 language "XSD" all;
   import from schema_Pos_050202_name_conversion_rules_025_1 language "XSD" all;

   template schema_Pos_050202_name_conversion_rules_025_1.Test m_msg := "abc";

//#TC

}
Loading