Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition from DTD/EBNF to RELAX NG Compact schema #18

Merged
merged 20 commits into from
Feb 22, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Swap the BNF with the RNC schema in anatomy
Start separating the schema snippets into files
in schema subdirectory.
  • Loading branch information
rakhimov committed Feb 16, 2017
commit 4e6c7a44168785afe64e00a7ad0dbe342b21b103
8 changes: 2 additions & 6 deletions mef/anatomy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,6 @@ Attributes
...
</define-gate>

The Backus-Naur form for the XML representation of labels and attributes is as follows.
The RNC schema for the XML representation of labels and attributes is as follows.

.. code-block:: bnf

label ::= <label> any text </label>
attributes ::= <attributes> attribute+ </attributes>
attribute ::= <attribute name="identifier" value="string" [ type="string" ] />
.. literalinclude:: schema/label_and_attributes.rnc
12 changes: 12 additions & 0 deletions mef/schema/label_and_attributes.rnc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name = attribute { Identifier }

label = element label { text }

attributes =
element attributes {
element attribute {
name,
attribute value { xsd:string },
attribute type { xsd:string }?
}+
}