Skip to content

Writer emits 'class="empty set"' which is not accepted by published SBGN-ML schemas #80

Description

@pklemmer

Following #12 / #13, Glyph.prototype.buildJsObj on develop writes the new name:

// src/libsbgn.js:756 (develop)
attributes.class = (this.class_ === 'source and sink') ? 'empty set' : this.class_;

The lenient reader (src/libsbgn.js:850) is fine and forward-compatible. The problem is the writer: the rename it depends on (#62) is still open, and no published schema has been updated. empty set / emptyset appears zero times in resources/SBGN.xsd or
documentation/differences-to-M2/SBGN-v0.2.xsd on either master or develop; both still enumerate only source and sink.

Effect: every file libsbgn.js writes containing a source/sink glyph is schema-invalid.

$ xmllint --schema SBGN-v0.2.xsd map.sbgn --noout
Element '{http://sbgn.org/libsbgn/0.2}glyph', attribute 'class': [facet 'enumeration']
The value 'empty set' is not an element of the set {..., 'source and sink', ...}

Newt bundles libsbgn.js, and sbgnviz.js correctly maps its internal empty set to source and sink before serialising — which this line then reverses, so the fix upstream of it has no effect. The resulting files are rejected by other SBGN-ML consumers; MINERVA's importer returns HTTP 500 on them.

Maybe revert the writer to emit source and sink until #62 is resolved and a schema enumerating the new value is published.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions