Skip to content

Use Schema attributes for version info #110

@StokesMIDE

Description

@StokesMIDE

In schemas, we currently use default values in some of the EBML child elements to define version info (DocType, DocVersion, ReadVersion, etc.). This is not the best place for it; the user has to root around to find the values when updating the schema, and it's a bit of a hack.

Some of the schemata have attributes in the root <Schema> element, like:

<Schema type="mide" version="2" readversion="2">

This is a better place for this sort of information, but it isn't actually used at this point. The schema parser should read these, and fall back to the <EBML> child element defaults if they aren't present (for backwards compatibility).

The default values of the EBML* child elements should also be elsewhere, either as additional <Schema> attributes, or maybe elements in <SchemaInfo> with the same name as the EBML element, like:

<?xml version="1.0" encoding="utf-8"?>
<Schema type="mide.ss.cmd" version="1" readversion="1">
    <SchemaInfo>
        <EBMLVersion value="1" />
        <EBMLReadVersion value="1" />
        ...

These are essentially constants, though, so they should be optional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SchemaRelated to the EBML schematadevelopmentDevelopment issues: package deployment, project organization, etc.enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions