Scribble 协议文件中的 xsd 行是什么?

What is xsd line in Scribble protocol file?

我有来自 here 的这个简单的 Hello world 代码,但找不到第 xsd 行的含义以及如何使用它。该文件位于何处,是否有必要?

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;
}

XSDXML 模式定义。 它定义了您的 XML 文档的外观。 另请参阅 w3schools 上的页面。 该文件位于您想要的任何位置。

来自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.

既然你想定义一个协议,这是必要的。否则,使用涂鸦根本没有意义(在我看来)。