-
-
Notifications
You must be signed in to change notification settings - Fork 71
Start draft of KDL Data Model #228
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
Open
nichtich
wants to merge
5
commits into
kdl-org:main
Choose a base branch
from
nichtich:data-model
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
70f119d
Start draft of KDL Data Model
nichtich 64d23f5
model: simplify definition of number
nichtich 19816c5
Extend KDL data model
nichtich 668c6d3
Merge branch 'kdl-org:main' into data-model
nichtich 43f1680
Include results of discussion on KDL Data Model
nichtich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| # KDL Data Model | ||
|
|
||
| This document specifies an abstract data model of KDL document language. | ||
|
|
||
| *This is version `0.0.0` of KDL Data model. It has not been released yet.* | ||
|
|
||
| ## Introduction | ||
|
|
||
| KDL is defined by [KDL Specification](SPEC.md) as a formal language with | ||
| components such as nodes, identifiers, strings, comments, and whitespace. | ||
| Some of these components can be expressed in mutliple ways and some of | ||
| these components are typically ignored when a KDL document is parsed. | ||
|
|
||
| KDL Data model defines a conceptual structure of semantically relevant elements | ||
| expressed in KDL syntax. The data model is required to process KDL documents | ||
| independent from syntax and implementations with [KDL Query | ||
| Language](QUERY-SPEC.md) and [KDL Schema Language](SCHEMA-SPEC.md). | ||
|
|
||
| ## Elements | ||
|
|
||
| Every KDL document represents a [document](#document). | ||
|
|
||
| Sequences and sets can be empty. | ||
|
|
||
| A Unicode string is a sequence of Unicode code points. | ||
|
|
||
| ### Document | ||
|
|
||
| A document is a sequence of [nodes](#node). | ||
|
|
||
| Documents must not contain itself via node direct or indirect children to avoid | ||
| circular structures. | ||
|
|
||
| ### Node | ||
|
|
||
| A node consists of three mandatory and two optional elements: | ||
|
|
||
| * a **name** being a Unicode string | ||
| * an optional **tag** being a Unicode string | ||
| * a sequence of **arguments**, each being a [value](#value) | ||
| * a set of **properties**, each consisting of | ||
nichtich marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| * a name being Unicode string unique within the set | ||
| * a [value](#value) | ||
| * an optional list of **children** being a [document](#document) | ||
nichtich marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Value | ||
|
|
||
| A value is one of: | ||
|
|
||
| * a Unicode string | ||
| * a **number**, consisting of an integer part and a decimal part | ||
nichtich marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| * a **boolean**, being one of the special values *true* and *false* | ||
| * the special value *null* | ||
|
|
||
| ## Application Notes | ||
|
|
||
| Implementations may want to limit the set of processable KDL documents by | ||
| limiting properties of the data model such as the following: | ||
|
|
||
| * A node with empty string tag (e.g. `("")node`) differs from a node without | ||
| tag (`node`). | ||
|
|
||
| * A node with empty children (e.g. `node {}`) differs from a node without | ||
| children (`node`). | ||
|
|
||
| * KDL does not differ between integer numbers and numbers with fractional part | ||
| nor does it define a fixed limit to the length or precision of numbers. | ||
|
|
||
| * property names differ also if their distinct strings become equivalent after | ||
| Unicode normalization. | ||
nichtich marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Applications must make clear whether they support full KDL data model or a | ||
| specific subset and whether they modify KDL documents to fit to their limited | ||
| model. Applications may further extend their document model with additional | ||
| information such as line numbers beyond the scope of this specification. | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.