Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » xsd2ttcn issue(XSD xsd2ttcn)
xsd2ttcn issue [message #1783794] Sat, 17 March 2018 19:18 Go to next message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 63
Registered: June 2016
Member
Hello All,

I got two issues while converting XSD file into TTCN file:
1) The following XSD documents seems to be unresolved but they are accessible:
- I/O error : Attempt to load network entity http://www.w3.org/2001/xml.xsd
WARNING:
/home/ubuntu/TriesAndDelete/etsi_emtel/xsd/xsd/pemea.xsd (in line 19): Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location 'http://www.w3.org/2001/xml.xsd'. Skipping the import.
WARNING:
- wifi.xsd (in type import): The 'http://www.opengis.net/gml' specified in the 'namespace' attribute is not resolvable.
2) the generated TTCN files contains strange variant such as:
type record of enumerated
{
  device,
  lis,
  other
} SourceType
with {
  variant ([-]) ;
  variant ([-]) ;
  variant ([-]) ;
  variant "name as uncapitalized";
  variant "list";
};
}
with {
  encode "XML";
  variant "namespace as 'urn:ietf:params:xml:ns:pidf:geopriv10:lmsrc' prefix 'lmsrc'";
  variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
  variant "elementFormQualified";
}

This one is not a blocking issue because I can remove suspicious variant.

I have attached the XSD files I'm using.

Thanks a lot for your support,

Yann
  • Attachment: xsd.tar
    (Size: 60.00KB, Downloaded 13 times)
Re: xsd2ttcn issue [message #1783797 is a reply to message #1783794] Sun, 18 March 2018 07:21 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Yann,


let me start with #2: you can safely remove the weird variants , they are some parasitic artifacts:
type record of enumerated
{
	device,
	lis,
	other
} SourceType
with {
//  variant ([-]) ;
//  variant ([-]) ;
//  variant ([-]) ;
  variant "name as uncapitalized";
  variant "list";
};

I have verified the encoding and it looks correct, e.g.
var Source  v_Source:= {lis, device, lis, other, device, device, lis}

is encoded as:
"<lmsrc:source xmlns:lmsrc='urn:ietf:params:xml:ns:pidf:geopriv10:lmsrc'>lis device lis other device device lis</lmsrc:source>\n\n"


see also http://www.rfc-editor.org/rfc/rfc7105.txt

Now, #1.

The converter cannot follow links or hyperlinks, all XSD's have to be present and located in the same directory. This means that import links and hyperlinks will have to be replaced with a direct local reference.

So in pemea.xsd
  <xs:import namespace="http://www.w3.org/XML/1998/namespace"   
             schemaLocation= "http://www.w3.org/2001/xml.xsd" />

has to be replaced with
 <xs:import namespace="http://www.w3.org/XML/1998/namespace"   
             schemaLocation= "xml.xsd" />


This will solve your first issue.

I have attached the generated (and corrected files), see package1.tgz.

Now, the second issue is somewhat more complicated.

wifi.xsd tries to import the gml namespace:
     <xs:import namespace="http://www.opengis.net/gml"/>


but , as there is no .xsd file present with that namespace, a warning is thrown.
Now as no definition from that namespace is being referred to, this is just a warning,
not an error, and the TTCN-3 files will be generated.

There are two options here:
if you don't need gml ( https://en.wikipedia.org/wiki/Geography_Markup_Language ) then you can continue with the package1 I have uploaded.

If you do need gml , then, as there are several variants, you have to decide which variant you want to use and add the schemas for that variant to the conversion.

See all the variants here http://schemas.opengis.net/gml/


I hope this helps

Best regards
Elemer


  • Attachment: package1.tgz
    (Size: 17.01KB, Downloaded 14 times)
Re: xsd2ttcn issue [message #1783801 is a reply to message #1783797] Sun, 18 March 2018 09:16 Go to previous message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 63
Registered: June 2016
Member
Hello Elemer,

Many thanks for your quick answer.
For gml package, I'm going to try without first ;)

Have a nice Sunday,

Yann
Previous Topic:gRPC/ProtoBuff support in Titan
Next Topic:Patch submission procedure for repositories on git.eclipse.org
Goto Forum:
  


Current Time: Sat Sep 22 00:21:10 GMT 2018

Powered by FUDForum. Page generated in 0.01599 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top