diff --git a/shared/xsd/ldf.xsd b/shared/xsd/ldf.xsd index 3e5bb2e1..1f0877ff 100644 --- a/shared/xsd/ldf.xsd +++ b/shared/xsd/ldf.xsd @@ -21,20 +21,27 @@ - A document is essentially a sequence of several parts, such as title page, front matter, - lexical and syntax sections, placeholders for generated content and various lists. - + A document is essentially a sequence of several parts, such as title page, front matter, + lexical and syntax sections, placeholders for generated content and various lists. + - - + + + + + + + + - - - + + + + The ``title page'' can in reality be rendered as several pages, but it contains the basic information that helps to identify this particular language definition and to distinguish it from similar documents. In our experience, language standards are either marked as @@ -44,53 +51,51 @@ as having been authored by a specific set of authors, but the ones defined here are the principal authors that identify the specific standard. - + The ``topic'' of the language document is its pure textual title without the reference number and status: e.g., ``Programming Language REXX'', - ``Information technology --- Programming languages --- Full BASIC'', etc. Either version or edition - follows. + ``Information technology --- Programming languages --- Full BASIC'', etc. + Either version or edition follows. - - - - - + + + + - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + According to W3C Process Document, each viable specification goes through the stages @@ -145,57 +150,71 @@ or even adapted to fit completely in some specific standardisation body classification. - - - + + + + - - - + + + - - - - - - - - - - + + + + + + + + + + + Previous versions of the same standard. - - - - - - - - - - + + + + + + + + + + + + Document part. - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -206,7 +225,7 @@ - + Placeholders are used to designate places where generated content @@ -214,57 +233,55 @@ - - - - - + + + + + - - - - - - - - - + + + + + + + + + + + Entities such as table of contents can be generated by the infrastructure automatically, ensuring internal consistency and coherence. However, the language documentation creators should be able to specify the places where such data needs to be inserted. - - - - - - - - - - - - - + + + + + + + + + + + + + + + Innermost sections do not have to belong to a certain pre-defined type (like ``synopsis'' or ``design goals''), but they can have a title and a possible list of authors which contributed directly to this section. - - - - - - - - - - - - - - + + + + + + + + @@ -372,31 +389,26 @@ - - - + + + + Sections describing lexical structure tend to be shorter, less structured inside, and very limited in scope: there is usually one lexical section dedicated to whitespace, one lexical section about tokens, one about literals, one about comments, etc. - + See the section on grammar notation for more details about how broad even the smallest aspects (e.g., about line continuations) can vary. - - - - - - - - - - - - - - + + + + + + + + @@ -413,26 +425,21 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -445,34 +452,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + In big documents it is not uncommon to find one topic divided into @@ -486,6 +491,11 @@ inspire these subtopics, each of them is a fully structured section in itself. + + + + + @@ -498,7 +508,7 @@ - + Some subsections can be generated, especially those that consist @@ -523,153 +533,138 @@ - - + + + + + Normative sections are obligatory and usually contain strict content + that needs to be implemented by compiler developers or satisfied + by language end users in order to comply to this standard. + + + For instance, if a section with a grammar production is marked as + normative, this production must hold for the implemented language. + + + + + + + Informative sections are supplementary and provide some useful information + that can be omitted or overridden if deemed appropriately. + + + For instance, if all sections with code samples are marked as informative, + we cannot rely on the set of examples extracted from the standard to be + the test set for the language. Apparently, we can still run some analyses + on the basis of this, but it is not legitimate to make any conclusions + about standard inconsistencies based on the informative sections, nor can + they be legitimately be used to resolve inner conflicts of the documentation. + + + + + - - - - - - Normative sections are obligatory and usually contain strict content - that needs to be implemented by compiler developers or satisfied - by language end users in order to comply to this standard. - - - For instance, if a section with a grammar production is marked as - normative, this production must hold for the implemented language. - - - - - - - Informative sections are supplementary and provide some useful information - that can be omitted or overridden if deemed appropriately. - - - For instance, if all sections with code samples are marked as informative, - we cannot rely on the set of examples extracted from the standard to be - the test set for the language. Apparently, we can still run some analyses - on the basis of this, but it is not legitimate to make any conclusions - about standard inconsistencies based on the informative sections, nor can - they be legitimately be used to resolve inner conflicts of the documentation. - - - - - - - - Any other type of normative or informative section. - - - - - - - - + + + + Normative sections form the core of the language standard: for each core section they belong to, they define the purpose of the language construct, provide a description, a syntax definition, list use constraints and other semantic details, etc. - - - - - + + + + + A separate subsection named ``purpose'' is only encountered in some 4GL language manuals (e.g., JCL). However, it is quite common for the first paragraph of any new section of any language document to briefly introduce the purpose of the language construct that is about to be described. - - - - - + + + + + Description is the core of the parent section, containing the main details about the defined topic, information about its usage, motivation behind its design. - - - - - + + + + + Syntax sections consist of one or more BGF productions, possibly complemented by textual descriptions. - - - - - + + + + + This section can list requirements needed for using a specific language construct, applicability constraints and other restrictions. - - - - - + + + + + Related language constructs can be named and referenced here. It is not a simple list of references, but rather a comprehensive overview on the kind of consequences other parts of the language can bear if this one is used. - - - - - + + + + + A section on semantics explains in plain English, if no other specific formalism is used, how exactly the language construct works, what happens inside the system when it is utilised. It also describes the context in which the introduced language construct can be encountered and in which it should or should not be used. - - - - - + + + + + It is quite common in the sections that describe an optional parameter to tell the reader what will happen in the case nothing was specified. ``There is no default'' can be as valid a definition as a real default value. - - - - - - - + + + + + + + + + Unlike normative sections that impose some conformance constraints that need to be satisfied by a language processor to claim compatibility with the standard, the informative sections are only presented to provide some additional information to the reader. - - - - - + + + + + A subsection with an example can contain a code sample as well as some accompanying text. - - - - - + + + + + A rationale or a note usually lists some narrow places of non-obvious usage, implementation details, incompatibility issues, coding standards, common programming practices, etc. It is a @@ -678,47 +673,48 @@ readers. Notes usually tell the readers how to use certain language constructs or tell compiler vendors how to implement them. - - - - - + + + + + It is quite uncommon practice, but some standardisation bodies really put the information about language evolution directly into each section that changed since the last public version of the language document. - + If this is done consistently and carefully, it is possible to generate the global ``What's new'' section automatically. - - - - - + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + A figure in LDF can include several presentation variants in different formats. Any of them can be chosen by the rendering tool: for example, in our prototype, \TeX\ generators prefer PDF figures while HTML generators tend to prefer PNG ones. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tables have header rows (optional) and regular rows, with each row filled with table cells. - - - - - - - - - - - - - - - - - - - A list in LDF is nothing more sophisticated than a sequence of textual items. - - - - - - - - - - + + + + + + + + + + + + + + + + A list in LDF is nothing more sophisticated than a sequence of textual items. + + + + + + + + + Any unstructured element of the language document belongs to a so called mixed type: i.e., it is plain text with some keywords marked. - - - - - - - - - - + + + + + + + + + Formulae can be used in language documentation in many ways. The internal representation format is MathML which is W3C Recommendation, but the external representation can vary, in our case there are two: \TeX\ and HTML. - - - - - - - - - - - + + + + + + + + + + Keywords are usually printed in bolder font weight. They need to be marked as such for two purposes: for presentation and for meta-information. The former goal serves as a basis for typesetting and hyperlinking, while the latter allows for correct indexing and searching facilities. - - - - - - + + + + + Inlined pieces of code are usually printed in a typewriter-like font. They are frequently incomplete, mostly nothing more than simple literals, and can only be checked to be correct tokens of the language in a lexical sense. - - - - - - + + + + + Internal links are pairs of text that will become clickable in hypertext presentation forms or precede the reference itself when this is the only option. The reference points to a section or a subsection of the same document that the link should refer to. If the explicit text is omitted, its default value is the name of the section being referenced. - - - - - - - - - - - - - + + + + + + + + + + + + +