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

Prototype annotations for Cycic #105

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
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
13 changes: 11 additions & 2 deletions src/Models/Facility/StorageFacility/StorageFacility.rng
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<element name="capacity">
<data type="double"/>
</element>
<element name="inventorysize">
<data type="double"/>
<element name="Inventory Size">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of declaring a display name to use in Cycic, why not just start naming all elements with display names? (We don't automatically generate data structures so we don't need to worry about valid naming of variables.)

<data type="double">
<param name="minExclusive">0</param>
<param name="maxInclusive">1e9</param>
<cycic:units>kg</cycic:units>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the 'cycic' namespace causes RelaxNG to ignore these entries. Not sure how it will be treated inside this datatyping element? I placed it there because of its close relationship to the datatype itself.
(whitespace is accidental)

<cycic:default>0</cycic:default>
</data>
<cycic:userlevel>0</cycic:userlevel>
<cycic:tooltip>The inventory of this storage facility.</cycic:tooltip>
<cycic:help>Blah Blah Blah</cycic:help>
<cycic:minVersion>0.1</cycic:minVersion>
</element>
<element name="residencetime">
<data type="nonNegativeInteger"/>
Expand Down