Skip to content

Commit

Permalink
* Language Document eXtentions added
Browse files Browse the repository at this point in the history
* All references to it are updated accordingly, not all schemata are valid


git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@73 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Jul 28, 2008
1 parent c50967b commit 27595ca
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 30 deletions.
23 changes: 1 addition & 22 deletions shared/xsd/ldf.xsd
Expand Up @@ -2,15 +2,14 @@
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ldf="http://planet-sl.org/ldf"
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:ldxl="http://planet-sl.org/ldxl"
xmlns:xhtml="http://www.w3.org/1999/xhtml/datatypes/"
targetNamespace="http://planet-sl.org/ldf">

<xsd:import namespace="http://planet-sl.org/bgf" schemaLocation="bgf.xsd"/>

<xsd:annotation>
<xsd:documentation>
The Language Document Format.
Language Document Format.
This is basically a metamodel for language documents or documentations.

Sample program tags:
Expand Down Expand Up @@ -161,24 +160,4 @@
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>

<xsd:element name="reference" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
A reference to a nonterminal
Generally, (reference)alpha(/reference) should mean something like
(a href="#alpha")alpha(/a)
</xsd:documentation>
</xsd:annotation>
</xsd:element>

<xsd:element name="tail" type="ldf:mixedType">
<xsd:annotation>
<xsd:documentation>
A documentation part that comes after the grammar in the resulting document,
yet precedes the grammar in the language document due to some idiosyncrasy.
This definition reuses the one from LDL, but this is not critical.
</xsd:documentation>
</xsd:annotation>
</xsd:element>

</xsd:schema>
57 changes: 57 additions & 0 deletions shared/xsd/ldx.xsd
@@ -0,0 +1,57 @@
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ldx="http://planet-sl.org/ldx"
xmlns:ldf="http://planet-sl.org/ldf"
xmlns:bgf="http://planet-sl.org/bgf"
targetNamespace="http://planet-sl.org/ldx">

<xsd:import namespace="http://planet-sl.org/ldf" schemaLocation="ldf.xsd"/>

<xsd:annotation>
<xsd:documentation>
Language Document eXtensions.

This is the schema collecting additional features available for language documents.
It re-uses content types defined by LDF.
By relying on a separate schema, it is possible to include LDX elements in XSD documents.
That, in turn, enables generation of LDF (not just BGF) documents from XSD documents.
</xsd:documentation>
</xsd:annotation>

<xsd:element name="reference" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
A reference to a nonterminal
Generally, (reference)alpha(/reference) should mean something like
(a href="#alpha")alpha(/a)
</xsd:documentation>
</xsd:annotation>
</xsd:element>

<xsd:element name="sample" type="ldf:sampleType">
<xsd:annotation>
<xsd:documentation>
A sample inside documentation is a sample defined by ldf.
</xsd:documentation>
</xsd:annotation>
</xsd:element>

<xsd:element name="runnable" type="ldf:runnableType">
<xsd:annotation>
<xsd:documentation>
A runnable inside documentation is a runnable defined by ldf.
</xsd:documentation>
</xsd:annotation>
</xsd:element>

<xsd:element name="tail" type="ldf:mixedType">
<xsd:annotation>
<xsd:documentation>
A documentation part that comes after the grammar in the resulting document,
yet precedes the grammar in the language document due to some idiosyncrasy.
This definition reuses the one from ldf, but this is not critical.
</xsd:documentation>
</xsd:annotation>
</xsd:element>

</xsd:schema>
1 change: 1 addition & 0 deletions shared/xsd/slps-xsd.csproj
Expand Up @@ -42,6 +42,7 @@
<None Include="bgf.xsd" />
<None Include="btf.xsd" />
<None Include="ldf.xsd" />
<None Include="ldx.xsd" />
<None Include="xbgf.xsd" />
</ItemGroup>
</Project>
16 changes: 8 additions & 8 deletions shared/xsd/xbgf.xsd
Expand Up @@ -3,7 +3,7 @@
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf"
xmlns:ldf="http://planet-sl.org/ldf"
xmlns:ldxl="http://planet-sl.org/ldxl"
xmlns:ldx="http://planet-sl.org/ldx"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
targetNamespace="http://planet-sl.org/xbgf">

Expand All @@ -15,7 +15,7 @@

<xsd:import namespace="http://planet-sl.org/bgf" schemaLocation="bgf.xsd"/>
<xsd:import namespace="http://planet-sl.org/ldf" schemaLocation="ldf.xsd"/>

<xsd:group name="transformation">
<xsd:annotation>
<xsd:documentation>
Expand Down Expand Up @@ -60,14 +60,14 @@
<xsd:documentation>
Add a production for a nonterminal to an existing definition.
That is, the nonterminal is meant to be extended.
<ldxl:tail>
Use the <ldxl:reference>define</ldxl:reference> transformation if you want to resolve an undefined nonterminal.
<ldx:tail>
Use the <ldx:reference>define</ldx:reference> transformation if you want to resolve an undefined nonterminal.

Use the <ldxl:reference>introduce</ldxl:reference> transformation if you want to define a fresh nonterminal.
<ldf:sample language="http://planet-sl.org/xbgf">
Use the <ldx:reference>introduce</ldx:reference> transformation if you want to define a fresh nonterminal.
<ldx:sample language="http://planet-sl.org/xbgf">
sorry, the sample is fake!
</ldf:sample>
</ldxl:tail>
</ldx:sample>
</ldx:tail>
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
Expand Down

0 comments on commit 27595ca

Please sign in to comment.