Skip to content

Commit bdbbcba

Browse files
committed
generate the main Matroska document as rfc9559
1 parent 7a92009 commit bdbbcba

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

Makefile

+21-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ MATROSKA_IANA_CSV := matroska-element-ids.csv \
4141
matroska-chapter-codec-ids.csv \
4242
matroska-tags-target-type-ids.csv
4343

44-
all: matroska codecs tags chapter_codecs control matroska_iana.xml $(MATROSKA_IANA_CSV)
44+
all: matroska codecs tags chapter_codecs control matroska_iana.xml $(MATROSKA_IANA_CSV) rfc9559.notprepped.html
4545
$(info RFC rendering has been tested with mmark version 2.2.8 and xml2rfc 2.46.0, please ensure these are installed and recent enough.)
4646

4747
matroska: $(OUTPUT_MATROSKA).html $(OUTPUT_MATROSKA).txt $(OUTPUT_MATROSKA).xml
@@ -103,8 +103,7 @@ control_elements4rfc.md: transforms/ebml_schema2markdown4rfc.xsl control_xsd.xml
103103
xsltproc transforms/ebml_schema2markdown4rfc.xsl control_xsd.xml > $@
104104

105105
$(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 tags-precedence.md matroska_implement.md matroska_security.md iana_matroska_ids.md matroska_iana_ids.md matroska_iana.md iana.md rfc_backmatter_matroska.md matroska_annex.md matroska_deprecated4rfc.md
106-
cat $^ | sed -e "s/@BUILD_DATE@/$(shell date +'%F')/" \
107-
-e "s/@BUILD_VERSION@/$(OUTPUT_MATROSKA)/" > $@
106+
cat $^ > $@
108107

109108
$(OUTPUT_CODEC).md: index_codec.md codec_specs.md subtitles.md block_additional_mappings_intro.md block_additional_mappings/*.md codec_security.md codec_iana.md rfc_backmatter_codec.md
110109
cat $^ | sed -e "s/@BUILD_DATE@/$(shell date +'%F')/" \
@@ -138,6 +137,25 @@ matroska_tagging_registry.md: matroska_tags.xml transforms/matroska_tags2markdow
138137
tags_iana_names.md: matroska_tags.xml transforms/matroska_tags2markdown4iana.xsl
139138
xsltproc transforms/matroska_tags2markdown4iana.xsl $< > $@
140139

140+
rfc9559.notprepped.xml: $(OUTPUT_MATROSKA).xml
141+
sed -e 's@<?xml version="1.0" encoding="utf-8"?>@<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE rfc \[\n <!ENTITY nbsp "\&#160;">\n <!ENTITY zwsp "\&#8203;">\n <!ENTITY nbhy "\&#8209;">\n <!ENTITY wj "\&#8288;">\n\]>@' \
142+
-e "s@\"http://www.w3.org/2001/XInclude\"@\"http://www.w3.org/2001/XInclude\" tocInclude=\"true\" symRefs=\"true\"@" \
143+
-e 's@<street></street>@@' \
144+
-e 's@<date></date>@@' \
145+
-e 's@></xref>@/>@g' \
146+
-e 's@<reference @\n<reference @g' \
147+
-e 's@&quot;@"@g' \
148+
-e 's@<!\[CDATA\[@\n@g' \
149+
-e 's@\]\]>@@g' \
150+
-e 's@</table></section>@</table>\n</section>@g' \
151+
$< > $@
152+
153+
%.html: rfc9559.notprepped.xml
154+
$(XML2RFC) --html $< -o $@
155+
156+
%.txt: rfc9559.notprepped.xml
157+
$(XML2RFC) $< -o $@
158+
141159
website:
142160
jekyll b
143161

index_matroska.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ ipr= "trust200902"
55
area = "art"
66
submissiontype = "IETF"
77
workgroup = "cellar"
8-
date = @BUILD_DATE@
8+
date = 2024-10-01
99
keyword = ["binary","storage","matroska","ebml","webm"]
10+
updates = [8794]
11+
obsoletes = []
1012

1113
[seriesInfo]
12-
name = "Internet-Draft"
13-
stream = "IETF"
14+
name = "RFC"
15+
value = "9559"
1416
status = "standard"
15-
value = "@BUILD_VERSION@"
1617

1718
[[author]]
1819
initials="S."

0 commit comments

Comments
 (0)