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

Move the deprecated elements at the end of the specs #487

Merged
merged 3 commits into from Jun 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -13,6 +13,7 @@ bootstrap.mak
ebml_matroska_elements.md
ebml_matroska_elements4rfc.md
control_elements4rfc.md
*_deprecated4rfc.md
matroska_tagging_registry.md
control_xsd.xml
matroska_xsd.xml
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -45,10 +45,13 @@ check: matroska_xsd.xml control_xsd.xml $(EBML_SCHEMA_XSD)
ebml_matroska_elements4rfc.md: transforms/ebml_schema2markdown4rfc.xsl matroska_xsd.xml
xsltproc transforms/ebml_schema2markdown4rfc.xsl matroska_xsd.xml > $@

matroska_deprecated4rfc.md: transforms/ebml_schema2markdown4deprecated.xsl matroska_xsd.xml
xsltproc transforms/ebml_schema2markdown4deprecated.xsl matroska_xsd.xml > $@

control_elements4rfc.md: transforms/ebml_schema2markdown4rfc.xsl control_xsd.xml
xsltproc transforms/ebml_schema2markdown4rfc.xsl control_xsd.xml > $@

$(OUTPUT_MATROSKA).md: index_matroska.md diagram.md matroska_schema_section_header.md ebml_matroska_elements4rfc.md ordering.md notes.md chapters.md attachments.md cues.md streaming.md rfc_backmatter_matroska.md
$(OUTPUT_MATROSKA).md: index_matroska.md diagram.md matroska_schema_section_header.md ebml_matroska_elements4rfc.md ordering.md notes.md chapters.md attachments.md cues.md streaming.md iana.md matroska_deprecated4rfc.md rfc_backmatter_matroska.md
cat $^ | sed -e '/^---/,/^---/d' \
-e "s/@BUILD_DATE@/$(shell date +'%F')/" \
-e "s/@BUILD_VERSION@/$(OUTPUT_MATROSKA)/" > $@
Expand Down
15 changes: 15 additions & 0 deletions iana.md
@@ -0,0 +1,15 @@
# IANA Considerations

## Matroska Element IDs Registry

## ChapterCodecID Registry

## Historic Deprecated Element IDs Registry

As Matroska evolved since 2002 many parts that were considered for use in the format were never
used and often incorrectly designed. Many of the elements that were then defined are not
found in any known files but were part of public specs. DivX also had a few custom elements that
were designed for custom features.

We list these elements that have a known ID that **SHOULD** not be reused to avoid colliding
with existing files.
4 changes: 0 additions & 4 deletions index_matroska.md
Expand Up @@ -91,10 +91,6 @@ Attacks on a `Matroska Reader` could include:
check that the data adheres to expectations.
- A `Matroska Attachment` with an inaccurate mime-type.

# IANA Considerations

To be determined.

# Notation and Conventions

The key words "**MUST**", "**MUST NOT**",
Expand Down
41 changes: 41 additions & 0 deletions transforms/ebml_schema2markdown4deprecated.xsl
@@ -0,0 +1,41 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:str="http://exslt.org/strings" xmlns:ebml="urn:ietf:rfc:8794" >
<xsl:output encoding="UTF-8" method="text" version="1.0" indent="yes"/>
<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'"/>
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
<xsl:template match="ebml:EBMLSchema">
<xsl:apply-templates select="//ebml:element[contains(@path,'\Segment') and @maxver='0']"/>
</xsl:template>
<xsl:template match="ebml:element">
<xsl:text>### </xsl:text>
<xsl:value-of select="@name"/>
<xsl:text> Element&#xa;&#xa;</xsl:text>
<xsl:if test="@path">
<xsl:text>path:&#xa;: `</xsl:text>
<xsl:value-of select="@path"/>
<xsl:text>`&#xa;&#xa;</xsl:text>
</xsl:if>
<xsl:if test="@id">
<xsl:text>id:&#xa;: </xsl:text>
<xsl:value-of select="@id"/>
<xsl:text>&#xa;&#xa;</xsl:text>
</xsl:if>
<xsl:if test="@type">
<xsl:text>type:&#xa;: </xsl:text>
<xsl:value-of select="@type"/>
<xsl:text>&#xa;&#xa;</xsl:text>
</xsl:if>
<xsl:for-each select="ebml:documentation">
<xsl:choose>
<xsl:when test="@purpose">
<xsl:value-of select="@purpose"/>
</xsl:when>
<xsl:otherwise>documentation</xsl:otherwise>
</xsl:choose>
<xsl:text>:&#xa;: </xsl:text>
<xsl:value-of select="."/>
<xsl:text>&#xa;&#xa;</xsl:text>
</xsl:for-each>
<xsl:text>&#xa;</xsl:text>
</xsl:template>
</xsl:stylesheet>
2 changes: 1 addition & 1 deletion transforms/ebml_schema2markdown4rfc.xsl
Expand Up @@ -4,7 +4,7 @@
<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'"/>
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
<xsl:template match="ebml:EBMLSchema">
<xsl:apply-templates select="//ebml:element[contains(@path,'\Segment')]"/>
<xsl:apply-templates select="//ebml:element[contains(@path,'\Segment') and not(@maxver='0')]"/>
</xsl:template>
<xsl:template match="ebml:element">
<xsl:text>#</xsl:text>
Expand Down