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

Compact index #863

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ tests/out/%.txt tests/out/%.raw.txt tests/out/%.nroff tests/out/%.html tests/out
@echo -e "\n Processing $<"
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --allow-local-file-access --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --base tests/out/ --text --html --strict $<"

tests/out/%.compact_index.text tests/out/%.compact_index.html : tests/input/%.xml install
@echo -e "\n Generating with a compact index $<"
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --allow-local-file-access --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --base tests/out/ --$(subst .,,$(suffix $@)) --strict --compact-index --no-pagination $< --out $@"


tests/out/%.v2v3.xml: tests/input/%.xml install
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --allow-local-file-access --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --v2v3 --strict --legacy-date-format $< --out $@"
@doc=$(basename $@); printf ' '; xmllint --noout --xinclude --relaxng xml2rfc/data/v3.rng $$doc.xml
Expand Down Expand Up @@ -227,12 +232,12 @@ rfcregressiontest: cleantmp install
drafttest: cleantmp env/bin/python install $(drafttests) dateshifttest

# rfctest: cleantmp env/bin/python install $(rfctests)
# @PS4=" " /bin/bash -cx "xml2rfc --skip-config --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --utf8tests/input/rfc6787.xml --base tmp/ --raw --legacy --text --nroff --html --exp --v2v3 --prep"
# doc=rfc6787 ; postnrofffix="cat" ; type=ascii; $(CHECKOUTPUT)
# @PS4=" " /bin/bash -cx "xml2rfc --skip-config --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --utf8tests/input/rfc7754.edited.xml --base tmp/ --raw --legacy --text --nroff --html --exp --v2v3 --prep"
# doc=rfc7754.edited ; postnrofffix="cat" ; type=ascii; $(CHECKOUTPUT)
# @PS4=" " /bin/bash -cx "xml2rfc --skip-config --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --utf8tests/input/rfc7911.xml --base tmp/ --raw --legacy --text --nroff --html --exp --v2v3 --prep"
# doc=rfc7911 ; postnrofffix="cat" ; type=ascii; $(CHECKOUTPUT)
# @PS4=" " /bin/bash -cx "xml2rfc --skip-config --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --utf8tests/input/rfc6787.xml --base tmp/ --raw --legacy --text --nroff --html --exp --v2v3 --prep"
# doc=rfc6787 ; postnrofffix="cat" ; type=ascii; $(CHECKOUTPUT)
# @PS4=" " /bin/bash -cx "xml2rfc --skip-config --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --utf8tests/input/rfc7754.edited.xml --base tmp/ --raw --legacy --text --nroff --html --exp --v2v3 --prep"
# doc=rfc7754.edited ; postnrofffix="cat" ; type=ascii; $(CHECKOUTPUT)
# @PS4=" " /bin/bash -cx "xml2rfc --skip-config --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --utf8tests/input/rfc7911.xml --base tmp/ --raw --legacy --text --nroff --html --exp --v2v3 --prep"
# doc=rfc7911 ; postnrofffix="cat" ; type=ascii; $(CHECKOUTPUT)

unicodetest: cleantmp env/bin/python install
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --allow-local-file-access --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --base tmp/ --raw --legacy --text --nroff --html --no-inline-version --exp --v2v3 --prep tests/input/unicode.xml "
Expand All @@ -246,11 +251,11 @@ v3featuretest: tests/out/draft-v3-features.prepped.xml.test tests/out/draft-v3-f

dateshifttest: cleantmp install
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --allow-local-file-access --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --date 2013-02-01 --legacy --out tmp/draft-miek-test.dateshift.txt --text tests/input/draft-miek-test.xml"
@diff -u -I '$(datetime_regex)' -I '$(version_regex)' -I '$(date_regex)' tests/valid/draft-miek-test.dateshift.txt tmp/draft-miek-test.dateshift.txt || { echo "Diff failed for draft-miek-test.dateshift.txt output"; exit 1; }
@diff -u -I '$(datetime_regex)' -I '$(version_regex)' -I '$(date_regex)' tests/valid/draft-miek-test.dateshift.txt tmp/draft-miek-test.dateshift.txt || { echo "Diff failed for draft-miek-test.dateshift.txt output"; exit 1; }

elementstest: install tests/out/elements.prepped.xml.test tests/out/elements.text.test tests/out/elements.pages.text.test tests/out/elements.v3.html.test

indextest: install tests/out/indexes.prepped.xml.test tests/out/indexes.text.test tests/out/indexes.pages.text.test tests/out/indexes.v3.html.test
indextest: install tests/out/indexes.prepped.xml.test tests/out/indexes.text.test tests/out/indexes.pages.text.test tests/out/indexes.v3.html.test tests/out/indexes.compact_index.text.test

sourcecodetest: install tests/out/sourcecode.prepped.xml.test tests/out/sourcecode.text.test tests/out/sourcecode.pages.text.test tests/out/sourcecode.v3.html.test

Expand Down
79 changes: 44 additions & 35 deletions tests/valid/docfile.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<meta charset="utf-8">
<meta content="Cherokee,Common,Greek,Latin" name="scripts">
<meta content="initial-scale=1.0" name="viewport">
<title>Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.13.1</title>
<title>Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.14.0</title>
<meta content="xml2rfc(1)" name="author">
<meta content="

This document provides information about the XML schema implemented in this release of xml2rfc, and the individual elements of that schema. The document is generated from the RNG schema file that is part of the xml2rfc distribution, so schema information in this document should always be in sync with the schema in actual use. The textual descriptions depend on manual updates in order to reflect the implementation.

" name="description">
<meta content="xml2rfc 3.13.1" name="generator">
<meta content="xml2rfc-docs-3.13.1" name="ietf.draft">
<meta content="xml2rfc 3.14.0" name="generator">
<meta content="xml2rfc-docs-3.14.0" name="ietf.draft">
<link href="tests/out/docfile.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
<link href="xml2rfc.css" rel="stylesheet">
Expand Down Expand Up @@ -45,7 +45,7 @@
</dd>
</dl>
</div>
<h1 id="title">Xml2rfc Vocabulary Version 3 Schema<br>xml2rfc release 3.13.1</h1>
<h1 id="title">Xml2rfc Vocabulary Version 3 Schema<br>xml2rfc release 3.14.0</h1>
<section id="section-abstract">
<h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2>
<p id="section-abstract-1">
Expand Down Expand Up @@ -367,7 +367,7 @@ <h2 id="name-introduction">
<p id="section-1-5">
The latest version of this documentation is available in HTML form at <span><a href="https://ietf-tools.github.io/xml2rfc/">https://ietf-tools.github.io/xml2rfc/</a></span>.<a href="#section-1-5" class="pilcrow">¶</a></p>
<p id="section-1-6">
This documentation applies to xml2rfc version 3.13.1.<a href="#section-1-6" class="pilcrow">¶</a></p>
This documentation applies to xml2rfc version 3.14.0.<a href="#section-1-6" class="pilcrow">¶</a></p>
</section>
<section id="section-2">
<h2 id="name-schema-version-3-elements">
Expand Down Expand Up @@ -5709,86 +5709,95 @@ <h3 id="name-generic-switch-options">
</dd>
<dd class="break"></dd>
<dt id="appendix-B.4-1.3">
<div id="option--debug">
<code>--debug</code> </div>
<div id="option--compact-index">
<code>--compact-index</code> </div>
</dt>
<dd style="margin-left: 1.5em" id="appendix-B.4-1.4">
<p id="appendix-B.4-1.4.1">
Show debugging output.<a href="#appendix-B.4-1.4.1" class="pilcrow">¶</a></p>
Generate a compact index.<a href="#appendix-B.4-1.4.1" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="appendix-B.4-1.5">
<div id="option--no-network">
<code>--no-network</code>, <code>-N</code> </div>
<div id="option--debug">
<code>--debug</code> </div>
</dt>
<dd style="margin-left: 1.5em" id="appendix-B.4-1.6">
<p id="appendix-B.4-1.6.1">
Don't use the network to resolve references.<a href="#appendix-B.4-1.6.1" class="pilcrow">¶</a></p>
Show debugging output.<a href="#appendix-B.4-1.6.1" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="appendix-B.4-1.7">
<div id="option--no-org-info">
<code>--no-org-info</code>, <code>-O</code> </div>
<div id="option--no-network">
<code>--no-network</code>, <code>-N</code> </div>
</dt>
<dd style="margin-left: 1.5em" id="appendix-B.4-1.8">
<p id="appendix-B.4-1.8.1">
Don't show author orgainzation info on page one (legacy only).<a href="#appendix-B.4-1.8.1" class="pilcrow">¶</a></p>
Don't use the network to resolve references.<a href="#appendix-B.4-1.8.1" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="appendix-B.4-1.9">
<div id="option--quiet">
<code>--quiet</code>, <code>-q</code> </div>
<div id="option--no-org-info">
<code>--no-org-info</code>, <code>-O</code> </div>
</dt>
<dd style="margin-left: 1.5em" id="appendix-B.4-1.10">
<p id="appendix-B.4-1.10.1">
Don't print anything while working.<a href="#appendix-B.4-1.10.1" class="pilcrow">¶</a></p>
Don't show author orgainzation info on page one (legacy only).<a href="#appendix-B.4-1.10.1" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="appendix-B.4-1.11">
<div id="option--skip-config-files">
<code>--skip-config-files</code> </div>
<div id="option--quiet">
<code>--quiet</code>, <code>-q</code> </div>
</dt>
<dd style="margin-left: 1.5em" id="appendix-B.4-1.12">
<p id="appendix-B.4-1.12.1">
Ignore config file settings.<a href="#appendix-B.4-1.12.1" class="pilcrow">¶</a></p>
<p id="appendix-B.4-1.12.2">
Use this to ignore values in config files, even if there are config files in the search path. Somewhat ironically, this option can itself be set in a config file, and cause all other config file settings to be ignored.<a href="#appendix-B.4-1.12.2" class="pilcrow">¶</a></p>
Don't print anything while working.<a href="#appendix-B.4-1.12.1" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="appendix-B.4-1.13">
<div id="option--allow-local-file-access">
<code>--allow-local-file-access</code> </div>
<div id="option--skip-config-files">
<code>--skip-config-files</code> </div>
</dt>
<dd style="margin-left: 1.5em" id="appendix-B.4-1.14">
<p id="appendix-B.4-1.14.1">
Allow local file system references.<a href="#appendix-B.4-1.14.1" class="pilcrow">¶</a></p>
Ignore config file settings.<a href="#appendix-B.4-1.14.1" class="pilcrow">¶</a></p>
<p id="appendix-B.4-1.14.2">
Use this to ignore values in config files, even if there are config files in the search path. Somewhat ironically, this option can itself be set in a config file, and cause all other config file settings to be ignored.<a href="#appendix-B.4-1.14.2" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="appendix-B.4-1.15">
<div id="option--remove-pis">
<code>--remove-pis</code>, <code>-r</code> </div>
<div id="option--allow-local-file-access">
<code>--allow-local-file-access</code> </div>
</dt>
<dd style="margin-left: 1.5em" id="appendix-B.4-1.16">
<p id="appendix-B.4-1.16.1">
Remove XML processing instructions.<a href="#appendix-B.4-1.16.1" class="pilcrow">¶</a></p>
Allow local file system references.<a href="#appendix-B.4-1.16.1" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="appendix-B.4-1.17">
<div id="option--utf8">
<code>--utf8</code>, <code>-u</code> </div>
<div id="option--remove-pis">
<code>--remove-pis</code>, <code>-r</code> </div>
</dt>
<dd style="margin-left: 1.5em" id="appendix-B.4-1.18">
<p id="appendix-B.4-1.18.1">
Generate utf8 output.<a href="#appendix-B.4-1.18.1" class="pilcrow">¶</a></p>
Remove XML processing instructions.<a href="#appendix-B.4-1.18.1" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="appendix-B.4-1.19">
<div id="option--verbose">
<code>--verbose</code>, <code>-v</code> </div>
<div id="option--utf8">
<code>--utf8</code>, <code>-u</code> </div>
</dt>
<dd style="margin-left: 1.5em" id="appendix-B.4-1.20">
<p id="appendix-B.4-1.20.1">
Print extra information.<a href="#appendix-B.4-1.20.1" class="pilcrow">¶</a></p>
Generate utf8 output.<a href="#appendix-B.4-1.20.1" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
<dt id="appendix-B.4-1.21">
<div id="option--verbose">
<code>--verbose</code>, <code>-v</code> </div>
</dt>
<dd style="margin-left: 1.5em" id="appendix-B.4-1.22">
<p id="appendix-B.4-1.22.1">
Print extra information.<a href="#appendix-B.4-1.22.1" class="pilcrow">¶</a></p>
</dd>
<dd class="break"></dd>
</dl>
Expand Down Expand Up @@ -6351,7 +6360,7 @@ <h2 id="name-xml2rfc-documentation-templ">
<p id="appendix-D-1">

The following variables are available for use in an xml2rfc
manpage Jinja2 template, as of xml2rfc version 3.13.1:<a href="#appendix-D-1" class="pilcrow">¶</a></p>
manpage Jinja2 template, as of xml2rfc version 3.14.0:<a href="#appendix-D-1" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlNewline" id="appendix-D-2">
<dt id="appendix-D-2.1">{{ bare_latin_tags }}:</dt>
<dd style="margin-left: 1.5em" id="appendix-D-2.2"></dd>
Expand Down
8 changes: 4 additions & 4 deletions tests/valid/draft-miek-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
This version is adapted to work with "xml2rfc" version 2.x.

' name="description">
<meta content="xml2rfc 3.13.1" name="generator">
<meta content="xml2rfc 3.14.0" name="generator">
<meta content="RFC" name="keyword">
<meta content="Request for Comments" name="keyword">
<meta content="I-D" name="keyword">
Expand All @@ -26,8 +26,8 @@
<meta content="Extensible Markup Language" name="keyword">
<meta content="draft-gieben-writing-rfcs-pandoc-02" name="ietf.draft">
<!-- Generator version information:
xml2rfc 3.13.1
Python 3.9.13
xml2rfc 3.14.0
Python 3.10.4
appdirs 1.4.4
ConfigArgParse 1.5.3
google-i18n-address 2.5.2
Expand All @@ -40,7 +40,7 @@
pycountry 22.3.5
PyYAML 6.0
requests 2.28.1
setuptools 63.2.0
setuptools 63.4.1
six 1.16.0
weasyprint 56.1
-->
Expand Down
8 changes: 4 additions & 4 deletions tests/valid/draft-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
Insert an abstract: MANDATORY. This template is for creating an
Internet Draft.
" name="description">
<meta content="xml2rfc 3.13.1" name="generator">
<meta content="xml2rfc 3.14.0" name="generator">
<meta content="template" name="keyword">
<meta content="draft-ietf-xml2rfc-template-05" name="ietf.draft">
<!-- Generator version information:
xml2rfc 3.13.1
Python 3.9.13
xml2rfc 3.14.0
Python 3.10.4
appdirs 1.4.4
ConfigArgParse 1.5.3
google-i18n-address 2.5.2
Expand All @@ -29,7 +29,7 @@
pycountry 22.3.5
PyYAML 6.0
requests 2.28.1
setuptools 63.2.0
setuptools 63.4.1
six 1.16.0
weasyprint 56.1
-->
Expand Down
Loading