Remove xml-format docs

It's well defined in storage.md.
This commit is contained in:
Arjan Molenaar 2021-01-28 08:52:45 +01:00
parent 6bdd46484f
commit a9578d4768
No known key found for this signature in database
GPG Key ID: BF977B918996CB13
2 changed files with 1 additions and 83 deletions

View File

@ -45,17 +45,11 @@ plug-in.
models/uml
models/SysML
.. toctree::
:caption: Storage
:maxdepth: 1
storage
xml-format
.. toctree::
:caption: Services
:maxdepth: 1
storage
undo
.. toctree::

View File

@ -1,76 +0,0 @@
# File Format (XML)
Since Gaphor generates the Python data model from a Gaphor model file, it
would be possible to also generate a Document Type Definition (DTD) as well.
These are the things that should be distinguished:
- Model elements
- Associations with other model elements (referenced by ID):
- Relations with multiplicity of zero to one (0..1)
- Relations with multiplicity of zero or more (0..*)
- Attributes, which always have a multiplicity of zero to one (0..1)
- Diagrams
- One canvas
- Several canvas items
- Derived attributes and associations are not saved
- Model elements should have their class name as tag name:
```xml
<Class id="1234-5678-...">
...
</Class>
<Package id="xxx...">
...
</Package>
```
- Support for the two types of Associations, single and multiple:
```xml
<Class id="xxx.xxx...">
<package>
<ref refid="xxx..."/>
</package>
</Class>
<Package id="xxx...">
<ownedClassifier>
<reflist>
<ref refid="xxx.xxx..."/>
...
</reflist>
</ownedClassifier>
</Package>
```
- Associations contain primitive data, this can always be displayed as
strings:
```xml
<Class id="xxx.xxx...">
<name>My name</name>
<intvar>4</intvar>
</Class>
```
- Canvas is the tag in which all canvas related stuff is placed. This is
the same way it is done now:
```xml
<Diagram id="...">
<canvas>
<item type="AssociationItem">
<subject>
<ref refid="..."/>
</subject>
<width><val>100.0</val></width>
</item>
</canvas>
</Diagram>
```
Most of the time you do not want to have anything to do with the canvas. The
data stored there is specific to Gaphor. The model elements however, are
interesting for other things such as code generators and conversion tools.
Gaphor is also able to export diagrams into a SVG image, so that they can be
used outside of the tool.