0

I have this simple Hello world code from here, and can't find what does line xsd mean, and how to use it. Where is this file located and is it necessary?

module scribble.example.Basic;

type <xsd> "{http://scribble.org/examples}Greetings" from "HelloWorld.xsd" as Greetings;

global protocol HelloWorld (role Me, role World) {
    hello(Greetings) from Me to World;
    hello(Greetings) from World to Me;
}
  • XSD means **XML Schema Definition Language**. [This](http://stackoverflow.com/questions/2333998/what-is-the-difference-between-xml-and-xsd) answer may help with the explanation – Asier Azkuenaga Mar 27 '17 at 11:53

1 Answers1

0

XSD is XML schema definition. It defines how your XML documents looks like. Also see page on w3schools. The file is located wherever you want.

From Scribble Readme:

The part between < > identifies the nature of the type, in this case it is an XSD (XML Schema Definition). The next part, which is in double quotes, identifies the type in a format appropriate for the schema. The from value (also in double quotes) represents the location of the schema definition. Finally the as value is an alias which the protocol will use to reference this type.

Since you want do define a protocol, this is necessary. Otherwise, using scribble does not make sense at all (in my opinion).

Community
  • 1
  • 1
muehsi
  • 588
  • 3
  • 19
  • Can you give me example how that xml documents need to looks like? I was looking for tutorial of scribble, but there are not many usefull sources. – long_battery Mar 27 '17 at 17:10