-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from cellml/cellml-2-drafting
Update from upstream
- Loading branch information
Showing
75 changed files
with
602 additions
and
421 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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,72 @@ | ||
.. _inform2_2: | ||
|
||
.. container:: toggle | ||
|
||
.. container:: header | ||
|
||
See more | ||
|
||
.. container:: infospec | ||
|
||
.. container:: heading3 | ||
|
||
Specific information items | ||
|
||
There are different kinds of information stored in XML elements. | ||
In the example below, the :code:`food_ideas` element has: | ||
|
||
- :code:`title`, :code:`instructions`, :code:`ingredient` have *text* content (note that numbers like 1.0 are treated as text), | ||
- :code:`ingredients` and :code:`food_ideas` have *element* contents, because they have child elements inside them, | ||
- :code:`category` is an *attribute* of the :code:`recipe` element, and :code:`name` and :code:`units` are *attributes* of the :code:`ingredient` element, and | ||
- the note within :code:`<!-- ... -->` comment tags is of an *unparsed* type and is ignored. | ||
|
||
.. code-block:: xml | ||
<food_ideas> | ||
<recipe category="easy"> | ||
<title>Three ingredient scones</title> | ||
<!-- These are so easy ... and if you're clever you'll save a little cream for whipping on the top! --> | ||
<ingredients> | ||
<ingredient name="cream" units="cup">1.0</ingredient> | ||
<ingredient name="lemonade" units="cup">1</ingredient> | ||
<ingredient name="selfraising_flour" units="cup">4</ingredient> | ||
</ingredients> | ||
<instructions> | ||
Mix them all together using your hands. | ||
You can use extra flour if you need to. | ||
Bake at 220C for about 12 minutes or until golden. | ||
</instructions> | ||
</recipe> | ||
</food_ideas> | ||
Using CellML this could be written: | ||
|
||
.. code-block:: xml | ||
<model name="recipes"> | ||
<units name="cup"> | ||
<unit units="litre" prefix="milli" multiplier="250.0" /> | ||
</units> | ||
<component name="Three_ingredient_scones"> | ||
<!-- Sigh ... if only it were possible for my computer to make me tea ... --> | ||
<variable name="cream" cellml:units="cup" initial_value="1" /> | ||
<variable name="lemonade" cellml:units="cup" initial_value="1" /> | ||
<variable name="selfraising_flour" cellml:units="cup" initial_value="5" /> | ||
<variable name="mixture" cellml:units="cup" /> | ||
<math> | ||
<apply><eq/> | ||
<ci>mixture</ci> | ||
<apply><plus/> | ||
<ci>cream</ci> | ||
<ci>lemonade</ci> | ||
<ci>selfraising_flour</ci> | ||
</apply> | ||
</apply> | ||
</math> | ||
</component> | ||
<!-- BUT THIS IS NOT VALID! --> | ||
<extra type="Danger_Will_Robinson"> | ||
Even though this looks like a valid XML text block, it's not allowed here. Only those | ||
elements which are explicitly specified as types of children are allowed! | ||
</extra> | ||
</model> |
This file contains 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,61 @@ | ||
.. _inform2_3: | ||
|
||
.. container:: toggle | ||
|
||
.. container:: header | ||
|
||
See more | ||
|
||
.. container:: infospec | ||
|
||
.. container:: heading3 | ||
|
||
Semantic equivalence | ||
|
||
The example below is identical to that in the previous "See more" block because: | ||
|
||
- newlines, tabs, whitespace do not affect equivalence (except as part of text or attribute content), | ||
- the order of element definition does not affect equivalence, | ||
- the order of attribute definition does not affect equivalence, and | ||
- comments do not affect equivalence. | ||
|
||
.. code-block:: xml | ||
<model name="recipes"> | ||
<component name="Three_ingredient_scones"> | ||
<!-- | ||
Comments are ignored ... | ||
so here's a really long one about how much I now | ||
feel like yummy scones and jam and cream and tea ... | ||
--> | ||
<!-- The order of child elements is ignored --> | ||
<math> | ||
<apply><eq/> | ||
<ci>mixture</ci> | ||
<apply><plus/> | ||
<ci>cream</ci> | ||
<ci>lemonade</ci> | ||
<ci>selfraising_flour</ci> | ||
</apply> | ||
</apply> | ||
</math> | ||
<!-- Whitespace (including tab, new line, and space) between attributes is ignored. --> | ||
<variable | ||
name="selfraising_flour" | ||
cellml:units="cup" | ||
/> | ||
<variable name="cream" cellml:units="cup" /> | ||
<!-- Whitespace (including tab, new line, and space) between elements is ignored. --> | ||
<variable cellml:units="dimensionless" name="mixture" /><variable name="lemonade" cellml:units="cup" /> | ||
</component> | ||
<units name="cup"> | ||
<!-- The order of attributes within an element is ignored. --> | ||
<unit multiplier="250.0" prefix="milli" units="litre" /> | ||
</units> | ||
</model> |
This file contains 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,15 @@ | ||
.. _inform2_4: | ||
|
||
.. container:: toggle | ||
|
||
.. container:: header | ||
|
||
See more | ||
|
||
.. container:: infospec | ||
|
||
.. code-block:: none | ||
<model name="myInvalidCellML" has other stuff in the element information item > | ||
</model> |
Oops, something went wrong.