Skip to content

Commit bdc945c

Browse files
committed
format all mmark output XML files the same way
Similar to the formatting of the RFC9559 XML.
1 parent 64fc5ef commit bdc945c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ $(OUTPUT_CONTROL).md: index_control.md control.md control_elements4rfc.md menu.m
123123

124124
%.xml: %.md
125125
$(MMARK) $< | sed -e "s/submissionType=/sortRefs=\"true\" tocDepth=\"4\" submissionType=/" \
126+
-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\]>@' \
127+
-e "s@\"http://www.w3.org/2001/XInclude\"@\"http://www.w3.org/2001/XInclude\" tocInclude=\"true\" symRefs=\"true\"@" \
128+
-e 's@<street></street>@@g' \
129+
-e 's@<date></date>@@g' \
130+
-e 's@></xref>@/>@g' \
131+
-e 's@<reference @\n<reference @g' \
132+
-e 's@&quot;@"@g' \
133+
-e 's@</table></section>@</table>\n</section>@g' \
126134
> $@
127135

128136
%.html: %.xml
@@ -138,16 +146,8 @@ tags_iana_names.md: matroska_tags.xml transforms/matroska_tags2markdown4iana.xsl
138146
xsltproc transforms/matroska_tags2markdown4iana.xsl $< > $@
139147

140148
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+
sed -e 's@<!\[CDATA\[@\n@g' \
149150
-e 's@\]\]>@@g' \
150-
-e 's@</table></section>@</table>\n</section>@g' \
151151
$< > $@
152152

153153
%.html: rfc9559.notprepped.xml

0 commit comments

Comments
 (0)