metanorma-ietf 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.hound.yml +3 -0
  4. data/.oss-guides.rubocop.yml +1077 -0
  5. data/.rspec +2 -0
  6. data/.rubocop.ribose.yml +65 -0
  7. data/.rubocop.tb.yml +650 -0
  8. data/.rubocop.yml +15 -0
  9. data/.travis.yml +23 -0
  10. data/CODE_OF_CONDUCT.md +74 -0
  11. data/Gemfile +4 -0
  12. data/Guardfile +22 -0
  13. data/LICENSE +25 -0
  14. data/README.adoc +1660 -0
  15. data/Rakefile +6 -0
  16. data/bin/asciidoctor-rfc2 +14 -0
  17. data/bin/asciidoctor-rfc3 +14 -0
  18. data/bin/console +14 -0
  19. data/bin/rspec +17 -0
  20. data/bin/setup +8 -0
  21. data/docs/installation.md +21 -0
  22. data/docs/navigation.md +10 -0
  23. data/docs/overview.md +5 -0
  24. data/lib/asciidoctor/rfc.rb +8 -0
  25. data/lib/asciidoctor/rfc/common/base.rb +531 -0
  26. data/lib/asciidoctor/rfc/common/front.rb +120 -0
  27. data/lib/asciidoctor/rfc/v2/base.rb +379 -0
  28. data/lib/asciidoctor/rfc/v2/blocks.rb +261 -0
  29. data/lib/asciidoctor/rfc/v2/converter.rb +60 -0
  30. data/lib/asciidoctor/rfc/v2/front.rb +69 -0
  31. data/lib/asciidoctor/rfc/v2/inline_anchor.rb +111 -0
  32. data/lib/asciidoctor/rfc/v2/lists.rb +135 -0
  33. data/lib/asciidoctor/rfc/v2/table.rb +114 -0
  34. data/lib/asciidoctor/rfc/v2/validate.rb +32 -0
  35. data/lib/asciidoctor/rfc/v2/validate2.rng +716 -0
  36. data/lib/asciidoctor/rfc/v3/base.rb +329 -0
  37. data/lib/asciidoctor/rfc/v3/blocks.rb +246 -0
  38. data/lib/asciidoctor/rfc/v3/converter.rb +62 -0
  39. data/lib/asciidoctor/rfc/v3/front.rb +122 -0
  40. data/lib/asciidoctor/rfc/v3/inline_anchor.rb +89 -0
  41. data/lib/asciidoctor/rfc/v3/lists.rb +176 -0
  42. data/lib/asciidoctor/rfc/v3/svg.rng +9081 -0
  43. data/lib/asciidoctor/rfc/v3/table.rb +65 -0
  44. data/lib/asciidoctor/rfc/v3/validate.rb +34 -0
  45. data/lib/asciidoctor/rfc/v3/validate.rng +2143 -0
  46. data/lib/metanorma-ietf.rb +7 -0
  47. data/lib/metanorma/ietf.rb +8 -0
  48. data/lib/metanorma/ietf/processor.rb +89 -0
  49. data/lib/metanorma/ietf/version.rb +5 -0
  50. data/metanorma-ietf.gemspec +51 -0
  51. data/rfc2629-other.ent +61 -0
  52. data/rfc2629-xhtml.ent +165 -0
  53. data/rfc2629.dtd +312 -0
  54. metadata +289 -0
@@ -0,0 +1,7 @@
1
+ require "asciidoctor" unless defined? Asciidoctor::Converter
2
+ require "metanorma"
3
+
4
+ require_relative "metanorma/ietf"
5
+ require_relative "asciidoctor/rfc"
6
+
7
+ Metanorma::Registry.instance.register(Metanorma::Ietf::Processor)
@@ -0,0 +1,8 @@
1
+ require_relative "ietf/processor"
2
+ require_relative "ietf/version"
3
+
4
+ module Metanorma
5
+ module Ietf
6
+
7
+ end
8
+ end
@@ -0,0 +1,89 @@
1
+ require "metanorma/processor"
2
+ require "tempfile"
3
+
4
+ module Metanorma
5
+ module Ietf
6
+ class Processor < Metanorma::Processor
7
+
8
+ def initialize
9
+ @short = :ietf
10
+ @input_format = :asciidoc
11
+ @asciidoctor_backend = :rfc2
12
+ end
13
+
14
+ def output_formats
15
+ {
16
+ xmlrfc2: "xml",
17
+ xmlrfc3: "v3.xml",
18
+ html: "html",
19
+ txt: "txt"
20
+ }
21
+ end
22
+
23
+ def version
24
+ "Metanorma::Ietf #{::Metanorma::Ietf::VERSION}"
25
+ end
26
+
27
+ def input_to_isodoc(file, filename)
28
+ # TODO: storing these two variables for xmlrfc2. Remove when we have IsoDoc
29
+ @file = file
30
+ @filename = filename
31
+
32
+ # This is XML RFC v3 output in text
33
+ Metanorma::Input::Asciidoc.new.process(file, filename, @asciidoctor_backend)
34
+ end
35
+
36
+ # TODO: we're not yet using IsoDoc here
37
+ def extract_options(isodocxml)
38
+ {}
39
+ end
40
+
41
+ # From mislav: https://stackoverflow.com/questions/2108727
42
+ # /which-in-ruby-checking-if-program-exists-in-path-from-ruby
43
+ def which(cmd)
44
+ exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
45
+ ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
46
+ exts.each { |ext|
47
+ exe = File.join(path, "#{cmd}#{ext}")
48
+ return exe if File.executable?(exe) && !File.directory?(exe)
49
+ }
50
+ end
51
+ nil
52
+ end
53
+
54
+ def output(isodoc_node, outname, format, options={})
55
+ case format
56
+ when :xmlrfc2
57
+ # TODO: we're using XML RFC v2 as the central format because our processor
58
+ # is not updated to the new schema
59
+
60
+ # xmlrfcdoc = Metanorma::Input::Asciidoc.new.process(@file, @filename, :rfc2)
61
+ # File.open(outname, 'w') { |f| f << xmlrfcdoc }
62
+
63
+ # TODO: When we have IsoDoc, we just translate IsoDoc to XML RFC v2
64
+ File.open(outname, 'w') { |f| f << isodoc_node }
65
+ when :xmlrfc3
66
+ # TODO: When we have IsoDoc, we just translate IsoDoc to XML RFC v3
67
+ xmlrfcdoc = Metanorma::Input::Asciidoc.new.process(@file, @filename, :rfc3)
68
+ File.open(outname, 'w') { |f| f << xmlrfcdoc }
69
+
70
+ when :txt, :html
71
+ Tempfile.open(outname) do |f|
72
+ f << isodoc_node
73
+
74
+ unless which("xml2rfc")
75
+ warn "[metanorma-ietf] Error: unable to generate #{format}, the command `xml2rfc` is not found in path."
76
+ return
77
+ end
78
+
79
+ # In xml2rfc, --text and --html are used
80
+ format = :text if format == :txt
81
+ # puts "xml2rfc --#{format} #{f.path} -o #{outname}"
82
+ system("xml2rfc --#{format} #{f.path} -o #{outname}")
83
+ end
84
+ end
85
+ end
86
+
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,5 @@
1
+ module Metanorma
2
+ module Ietf
3
+ VERSION = "1.0.0".freeze
4
+ end
5
+ end
@@ -0,0 +1,51 @@
1
+ # coding: utf-8
2
+
3
+ lib = File.expand_path("../lib", __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "metanorma/ietf/version"
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "metanorma-ietf"
9
+ spec.version = Metanorma::Ietf::VERSION
10
+ spec.authors = ["Ribose Inc."]
11
+ spec.email = ["open.source@ribose.com"]
12
+
13
+ spec.summary = "metanorma-ietf lets you write IETF documents, such as Internet-Drafts and RFCs, in AsciiDoc."
14
+ spec.description = <<~DESCRIPTION
15
+ metanorma-ietf lets you write IETF documents, such as Internet-Drafts and RFCs,
16
+ in native AsciiDoc syntax. This is part of the Metanorma publishing framework.
17
+
18
+ RFC XML ("xml2rfc" Vocabulary XML, RFC7322) is the XML-based language used for
19
+ writing Internet-Drafts and RFCs, but not everyone likes hand-crafting XML,
20
+ especially when the focus should be on the content.
21
+
22
+ This gem is in active development.
23
+
24
+ Formerly known as asciidoctor-ietf.
25
+ DESCRIPTION
26
+
27
+ spec.homepage = "https://github.com/riboseinc/metanorma-ietf"
28
+ spec.license = "BSD-2-Clause"
29
+
30
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
31
+ f.match(%r{^(test|spec|features)/})
32
+ end
33
+ spec.bindir = "exe"
34
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
35
+ spec.require_paths = ["lib"]
36
+
37
+ spec.add_dependency "metanorma-standoc", "~> 1.0.0"
38
+ spec.add_dependency "isodoc", "~> 0.9.6"
39
+
40
+ spec.add_development_dependency "bundler", "~> 1.15"
41
+ spec.add_development_dependency "byebug", "~> 9.1"
42
+ spec.add_development_dependency "equivalent-xml", "~> 0.6"
43
+ spec.add_development_dependency "guard", "~> 2.14"
44
+ spec.add_development_dependency "guard-rspec", "~> 4.7"
45
+ spec.add_development_dependency "rake", "~> 12.0"
46
+ spec.add_development_dependency "rspec", "~> 3.6"
47
+ spec.add_development_dependency "rubocop", "~> 0.50"
48
+ spec.add_development_dependency "simplecov", "~> 0.15"
49
+ spec.add_development_dependency "timecop", "~> 0.9"
50
+ spec.add_development_dependency "metanorma", "~> 0.3.0"
51
+ end
data/rfc2629-other.ent ADDED
@@ -0,0 +1,61 @@
1
+ <!-- rfc2629-other.ent
2
+
3
+ Character entity set for RFC-2629 source xml documents.
4
+ There is no need to invoke this directly from
5
+ the source document itself; just invoke the DTD.
6
+
7
+ These are unknown to (X)HTML, so any converter to these
8
+ formats must either substitute these entities
9
+ or invoke this file from the output file.
10
+
11
+ Conversion to txt or nroff format will replace
12
+ these entities by the parenthesized text.
13
+
14
+ Typical invocation:
15
+ <!ENTITY % rfc2629-other
16
+ PUBLIC "-//IETF//ENTITIES Other for RFC 2629//EN"
17
+ "http://xml.resource.org/authoring/rfc2629-other.ent">
18
+ %rfc2629-other;
19
+ -->
20
+
21
+ <!-- Magical -->
22
+ <!-- rfc.number (automatically expanded to content
23
+ of number="..." attribute
24
+ of <rfc> element, or to "XXXX") -->
25
+
26
+ <!-- ASCII -->
27
+ <!ENTITY excl "&#33;"><!-- U+0021 EXCLAMATION MARK ("!") -->
28
+ <!ENTITY num "&#35;"><!-- U+0023 NUMBER SIGN ("#") -->
29
+ <!ENTITY dollar "&#36;"><!-- U+0024 DOLLAR SIGN ("$") -->
30
+ <!ENTITY percnt "&#37;"><!-- U+0025 PERCENT SIGN ("%") -->
31
+ <!ENTITY lpar "&#40;"><!-- U+0028 LEFT PARENTHESIS ("(") -->
32
+ <!ENTITY rpar "&#41;"><!-- U+0029 RIGHT PARENTHESIS (")") -->
33
+ <!ENTITY ast "&#42;"><!-- U+002A ASTERISK ("*") -->
34
+ <!ENTITY plus "&#43;"><!-- U+002B PLUS SIGN ("+") -->
35
+ <!ENTITY comma "&#44;"><!-- U+002C COMMA (",") -->
36
+ <!ENTITY hyphen "&#45;"><!-- U+002D HYPHEN-MINUS ("-") -->
37
+ <!ENTITY period "&#46;"><!-- U+002E FULL STOP (".") -->
38
+ <!ENTITY sol "&#47;"><!-- U+002F SOLIDUS ("/") -->
39
+ <!ENTITY colon "&#58;"><!-- U+003A COLON (":") -->
40
+ <!ENTITY semi "&#59;"><!-- U+003B SEMICOLON (";") -->
41
+ <!ENTITY equals "&#61;"><!-- U+003D EQUALS SIGN ("=") -->
42
+ <!ENTITY quest "&#63;"><!-- U+003F QUESTION MARK ("?") -->
43
+ <!ENTITY commat "&#64;"><!-- U+0040 COMMERCIAL AT ("@") -->
44
+ <!ENTITY lsqb "&#91;"><!-- U+005B LEFT SQUARE BRACKET ("[") -->
45
+ <!ENTITY bsol "&#92;"><!-- U+005C REVERSE SOLIDUS ("\\") -->
46
+ <!ENTITY rsqb "&#93;"><!-- U+005D RIGHT SQUARE BRACKET ("]") -->
47
+ <!ENTITY circ "&#94;"><!-- U+005E CIRCUMFLEX ACCENT ("^") -->
48
+ <!ENTITY lowbar "&#95;"><!-- U+005F LOW LINE ("_") -->
49
+ <!ENTITY grave "&#96;"><!-- U+0060 GRAVE ACCENT ("`") -->
50
+ <!ENTITY lcub "&#123;"><!-- U+007B LEFT CURLY BRACKET ("{") -->
51
+ <!ENTITY verbar "&#124;"><!-- U+007C VERTICAL LINE ("|") -->
52
+ <!ENTITY rcub "&#125;"><!-- U+007D RIGHT CURLY BRACKET ("}") -->
53
+
54
+ <!-- Useful Unicode -->
55
+ <!ENTITY Zcaron "&#381;"><!-- U+017D LATIN CAPITAL LETTER Z WITH CARON ("Z") -->
56
+ <!ENTITY zcaron "&#382;"><!-- U+017E LATIN SMALL LETTER Z WITH CARON ("z") -->
57
+ <!ENTITY dash "&#8208;"><!-- U+2010 HYPHEN ("-") -->
58
+ <!ENTITY nbhy "&#8209;"><!-- U+2011 NON-BREAKING HYPHEN (special "-") -->
59
+ <!ENTITY wj "&#8288;"><!-- U+2060 WORD JOINER (special "") -->
60
+
61
+ <!-- EOF -->
data/rfc2629-xhtml.ent ADDED
@@ -0,0 +1,165 @@
1
+ <!-- rfc2629-xhtml.ent
2
+
3
+ Character entity set for RFC-2629 source xml documents.
4
+ There is no need to invoke this directly from
5
+ the source document itself; just invoke the DTD.
6
+
7
+ These are known to (X)HTML, so any converter to these
8
+ formats can just leave them as is without having
9
+ to invoke this file from the output file.
10
+
11
+ Conversion to txt or nroff format will replace
12
+ these entities by the parenthesized text.
13
+
14
+ Typical invocation:
15
+ <!ENTITY % rfc2629-xhtml
16
+ PUBLIC "-//IETF//ENTITIES XHTML subset for RFC 2629//EN"
17
+ "http://xml.resource.org/authoring/rfc2629-xhtml.ent">
18
+ %rfc2629-xhtml;
19
+ -->
20
+
21
+ <!-- All of ISO Latin 1 -->
22
+ <!ENTITY nbsp "&#160;"><!-- U+00A0 NO-BREAK SPACE (special " ") -->
23
+ <!ENTITY iexcl "&#161;"><!-- U+00A1 INVERTED EXCLAMATION MARK ("!") -->
24
+ <!ENTITY cent "&#162;"><!-- U+00A2 CENT SIGN ("[cents]") -->
25
+ <!ENTITY pound "&#163;"><!-- U+00A3 POUND SIGN ("GBP") -->
26
+ <!ENTITY curren "&#164;"><!-- U+00A4 CURRENCY SIGN ("[currency units]") -->
27
+ <!ENTITY yen "&#165;"><!-- U+00A5 YEN SIGN ("JPY") -->
28
+ <!ENTITY brvbar "&#166;"><!-- U+00A6 BROKEN BAR ("|") -->
29
+ <!ENTITY sect "&#167;"><!-- U+00A7 SECTION SIGN ("S.") -->
30
+ <!ENTITY uml "&#168;"><!-- U+00A8 DIAERESIS ('"') -->
31
+ <!ENTITY copy "&#169;"><!-- U+00A9 COPYRIGHT SIGN ("(C)") -->
32
+ <!ENTITY ordf "&#170;"><!-- U+00AA FEMININE ORDINAL INDICATOR ("a") -->
33
+ <!ENTITY laquo "&#171;"><!-- U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK ("<<") -->
34
+ <!ENTITY not "&#172;"><!-- U+00AC NOT SIGN ("[not]") -->
35
+ <!ENTITY shy "&#173;"><!-- U+00AD SOFT HYPHEN (ignored "") -->
36
+ <!ENTITY reg "&#174;"><!-- U+00AE REGISTERED SIGN ("(R)") -->
37
+ <!ENTITY macr "&#175;"><!-- U+00AF MACRON ("_") -->
38
+ <!ENTITY deg "&#176;"><!-- U+00B0 DEGREE SIGN ("o") -->
39
+ <!ENTITY plusmn "&#177;"><!-- U+00B1 PLUS-MINUS SIGN ("+/-") -->
40
+ <!ENTITY sup2 "&#178;"><!-- U+00B2 SUPERSCRIPT TWO ("^2") -->
41
+ <!ENTITY sup3 "&#179;"><!-- U+00B3 SUPERSCRIPT THREE ("^3") -->
42
+ <!ENTITY acute "&#180;"><!-- U+00B4 ACUTE ACCENT ("'") -->
43
+ <!ENTITY micro "&#181;"><!-- U+00B5 MICRO SIGN ("[micro]") -->
44
+ <!ENTITY para "&#182;"><!-- U+00B6 PILCROW SIGN ("P.") -->
45
+ <!ENTITY middot "&#183;"><!-- U+00B7 MIDDLE DOT (".") -->
46
+ <!ENTITY cedil "&#184;"><!-- U+00B8 CEDILLA (",") -->
47
+ <!ENTITY sup1 "&#185;"><!-- U+00B9 SUPERSCRIPT ONE ("^1") -->
48
+ <!ENTITY ordm "&#186;"><!-- U+00BA MASCULINE ORDINAL INDICATOR ("o") -->
49
+ <!ENTITY raquo "&#187;"><!-- U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK (">>") -->
50
+ <!ENTITY frac14 "&#188;"><!-- U+00BC VULGAR FRACTION ONE QUARTER ("1/4") -->
51
+ <!ENTITY frac12 "&#189;"><!-- U+00BD VULGAR FRACTION ONE HALF ("1/2") -->
52
+ <!ENTITY frac34 "&#190;"><!-- U+00BE VULGAR FRACTION THREE QUARTERS ("3/4") -->
53
+ <!ENTITY iquest "&#191;"><!-- U+00BF INVERTED QUESTION MARK ("?") -->
54
+ <!ENTITY Agrave "&#192;"><!-- U+00C0 LATIN CAPITAL LETTER A WITH GRAVE ("A") -->
55
+ <!ENTITY Aacute "&#193;"><!-- U+00C1 LATIN CAPITAL LETTER A WITH ACUTE ("A") -->
56
+ <!ENTITY Acirc "&#194;"><!-- U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX ("A") -->
57
+ <!ENTITY Atilde "&#195;"><!-- U+00C3 LATIN CAPITAL LETTER A WITH TILDE ("A") -->
58
+ <!ENTITY Auml "&#196;"><!-- U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS ("Ae") -->
59
+ <!ENTITY Aring "&#197;"><!-- U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE ("Ae") -->
60
+ <!ENTITY AElig "&#198;"><!-- U+00C6 LATIN CAPITAL LETTER AE ("AE") -->
61
+ <!ENTITY Ccedil "&#199;"><!-- U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA ("C") -->
62
+ <!ENTITY Egrave "&#200;"><!-- U+00C8 LATIN CAPITAL LETTER E WITH GRAVE ("E") -->
63
+ <!ENTITY Eacute "&#201;"><!-- U+00C9 LATIN CAPITAL LETTER E WITH ACUTE ("E") -->
64
+ <!ENTITY Ecirc "&#202;"><!-- U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX ("E") -->
65
+ <!ENTITY Euml "&#203;"><!-- U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS ("E") -->
66
+ <!ENTITY Igrave "&#204;"><!-- U+00CC LATIN CAPITAL LETTER I WITH GRAVE ("I") -->
67
+ <!ENTITY Iacute "&#205;"><!-- U+00CD LATIN CAPITAL LETTER I WITH ACUTE ("I") -->
68
+ <!ENTITY Icirc "&#206;"><!-- U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX ("I") -->
69
+ <!ENTITY Iuml "&#207;"><!-- U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS ("I") -->
70
+ <!ENTITY ETH "&#208;"><!-- U+00D0 LATIN CAPITAL LETTER ETH ("[ETH]") -->
71
+ <!ENTITY Ntilde "&#209;"><!-- U+00D1 LATIN CAPITAL LETTER N WITH TILDE ("N") -->
72
+ <!ENTITY Ograve "&#210;"><!-- U+00D2 LATIN CAPITAL LETTER O WITH GRAVE ("O") -->
73
+ <!ENTITY Oacute "&#211;"><!-- U+00D3 LATIN CAPITAL LETTER O WITH ACUTE ("O") -->
74
+ <!ENTITY Ocirc "&#212;"><!-- U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX ("O") -->
75
+ <!ENTITY Otilde "&#213;"><!-- U+00D5 LATIN CAPITAL LETTER O WITH TILDE ("O") -->
76
+ <!ENTITY Ouml "&#214;"><!-- U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS ("Oe") -->
77
+ <!ENTITY times "&#215;"><!-- U+00D7 MULTIPLICATION SIGN ("x") -->
78
+ <!ENTITY Oslash "&#216;"><!-- U+00D8 LATIN CAPITAL LETTER O WITH STROKE ("Oe") -->
79
+ <!ENTITY Ugrave "&#217;"><!-- U+00D9 LATIN CAPITAL LETTER U WITH GRAVE ("U") -->
80
+ <!ENTITY Uacute "&#218;"><!-- U+00DA LATIN CAPITAL LETTER U WITH ACUTE ("U") -->
81
+ <!ENTITY Ucirc "&#219;"><!-- U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX ("U") -->
82
+ <!ENTITY Uuml "&#220;"><!-- U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS ("Ue") -->
83
+ <!ENTITY Yacute "&#221;"><!-- U+00DD LATIN CAPITAL LETTER Y WITH ACUTE ("Y") -->
84
+ <!ENTITY THORN "&#222;"><!-- U+00DE LATIN CAPITAL LETTER THORN ("[THORN]") -->
85
+ <!ENTITY szlig "&#223;"><!-- U+00DF LATIN SMALL LETTER SHARP S ("ss") -->
86
+ <!ENTITY agrave "&#224;"><!-- U+00E0 LATIN SMALL LETTER A WITH GRAVE ("a") -->
87
+ <!ENTITY aacute "&#225;"><!-- U+00E1 LATIN SMALL LETTER A WITH ACUTE ("a") -->
88
+ <!ENTITY acirc "&#226;"><!-- U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX ("a") -->
89
+ <!ENTITY atilde "&#227;"><!-- U+00E3 LATIN SMALL LETTER A WITH TILDE ("a") -->
90
+ <!ENTITY auml "&#228;"><!-- U+00E4 LATIN SMALL LETTER A WITH DIAERESIS ("ae") -->
91
+ <!ENTITY aring "&#229;"><!-- U+00E5 LATIN SMALL LETTER A WITH RING ABOVE ("ae") -->
92
+ <!ENTITY aelig "&#230;"><!-- U+00E6 LATIN SMALL LETTER AE ("ae") -->
93
+ <!ENTITY ccedil "&#231;"><!-- U+00E7 LATIN SMALL LETTER C WITH CEDILLA ("c") -->
94
+ <!ENTITY egrave "&#232;"><!-- U+00E8 LATIN SMALL LETTER E WITH GRAVE ("e") -->
95
+ <!ENTITY eacute "&#233;"><!-- U+00E9 LATIN SMALL LETTER E WITH ACUTE ("e") -->
96
+ <!ENTITY ecirc "&#234;"><!-- U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX ("e") -->
97
+ <!ENTITY euml "&#235;"><!-- U+00EB LATIN SMALL LETTER E WITH DIAERESIS ("e") -->
98
+ <!ENTITY igrave "&#236;"><!-- U+00EC LATIN SMALL LETTER I WITH GRAVE ("i") -->
99
+ <!ENTITY iacute "&#237;"><!-- U+00ED LATIN SMALL LETTER I WITH ACUTE ("i") -->
100
+ <!ENTITY icirc "&#238;"><!-- U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX ("i") -->
101
+ <!ENTITY iuml "&#239;"><!-- U+00EF LATIN SMALL LETTER I WITH DIAERESIS ("i") -->
102
+ <!ENTITY eth "&#240;"><!-- U+00F0 LATIN SMALL LETTER ETH ("[eth]") -->
103
+ <!ENTITY ntilde "&#241;"><!-- U+00F1 LATIN SMALL LETTER N WITH TILDE ("n") -->
104
+ <!ENTITY ograve "&#242;"><!-- U+00F2 LATIN SMALL LETTER O WITH GRAVE ("o") -->
105
+ <!ENTITY oacute "&#243;"><!-- U+00F3 LATIN SMALL LETTER O WITH ACUTE ("o") -->
106
+ <!ENTITY ocirc "&#244;"><!-- U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX ("o") -->
107
+ <!ENTITY otilde "&#245;"><!-- U+00F5 LATIN SMALL LETTER O WITH TILDE ("o") -->
108
+ <!ENTITY ouml "&#246;"><!-- U+00F6 LATIN SMALL LETTER O WITH DIAERESIS ("oe") -->
109
+ <!ENTITY divide "&#247;"><!-- U+00F7 DIVISION SIGN ("/") -->
110
+ <!ENTITY oslash "&#248;"><!-- U+00F8 LATIN SMALL LETTER O WITH STROKE ("oe") -->
111
+ <!ENTITY ugrave "&#249;"><!-- U+00F9 LATIN SMALL LETTER U WITH GRAVE ("u") -->
112
+ <!ENTITY uacute "&#250;"><!-- U+00FA LATIN SMALL LETTER U WITH ACUTE ("u") -->
113
+ <!ENTITY ucirc "&#251;"><!-- U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX ("u") -->
114
+ <!ENTITY uuml "&#252;"><!-- U+00FC LATIN SMALL LETTER U WITH DIAERESIS ("ue") -->
115
+ <!ENTITY yacute "&#253;"><!-- U+00FD LATIN SMALL LETTER Y WITH ACUTE ("y") -->
116
+ <!ENTITY thorn "&#254;"><!-- U+00FE LATIN SMALL LETTER THORN ("[thorn]") -->
117
+ <!ENTITY yuml "&#255;"><!-- U+00FF LATIN SMALL LETTER Y WITH DIAERESIS ("y") -->
118
+
119
+ <!-- Some of ISO Latin 9 and 10 -->
120
+ <!ENTITY OElig "&#338;"><!-- U+0152 LATIN CAPITAL LIGATURE OE ("OE") -->
121
+ <!ENTITY oelig "&#339;"><!-- U+0153 LATIN SMALL LIGATURE OE ("oe") -->
122
+ <!ENTITY Scaron "&#352;"><!-- U+0160 LATIN CAPITAL LETTER S WITH CARON ("S") -->
123
+ <!ENTITY scaron "&#353;"><!-- U+0161 LATIN SMALL LETTER S WITH CARON ("s") -->
124
+ <!ENTITY Yuml "&#376;"><!-- U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS ("Y") -->
125
+
126
+ <!-- Other Unicode (including some characters from the windows-1252 repertoire) -->
127
+ <!ENTITY fnof "&#402;"><!-- U+0192 LATIN SMALL LETTER F WITH HOOK ("f") -->
128
+ <!ENTITY tilde "&#732;"><!-- U+02DC SMALL TILDE ("~") -->
129
+ <!ENTITY ensp "&#8194;"><!-- U+2002 EN SPACE (" ") -->
130
+ <!ENTITY emsp "&#8195;"><!-- U+2003 EM SPACE (" ") -->
131
+ <!ENTITY thinsp "&#8201;"><!-- U+2009 THIN SPACE (" ") -->
132
+ <!ENTITY ndash "&#8211;"><!-- U+2013 EN DASH ("-") -->
133
+ <!ENTITY mdash "&#8212;"><!-- U+2014 EM DASH ("-\u002D") -->
134
+ <!ENTITY lsquo "&#8216;"><!-- U+2018 LEFT SINGLE QUOTATION MARK ("'") -->
135
+ <!ENTITY rsquo "&#8217;"><!-- U+2019 RIGHT SINGLE QUOTATION MARK ("'") -->
136
+ <!ENTITY sbquo "&#8218;"><!-- U+201A SINGLE LOW-9 QUOTATION MARK ("'") -->
137
+ <!ENTITY ldquo "&#8220;"><!-- U+201C LEFT DOUBLE QUOTATION MARK ('"') -->
138
+ <!ENTITY rdquo "&#8221;"><!-- U+201D RIGHT DOUBLE QUOTATION MARK ('"') -->
139
+ <!ENTITY bdquo "&#8222;"><!-- U+201E DOUBLE LOW-9 QUOTATION MARK ('"') -->
140
+ <!ENTITY dagger "&#8224;"><!-- U+2020 DAGGER ("*!*") -->
141
+ <!ENTITY Dagger "&#8225;"><!-- U+2021 DOUBLE DAGGER ("*!!*") -->
142
+ <!ENTITY bull "&#8226;"><!-- U+2022 BULLET ("o") -->
143
+ <!ENTITY hellip "&#8230;"><!-- U+2026 HORIZONTAL ELLIPSIS ("...") -->
144
+ <!ENTITY permil "&#8242;"><!-- U+2030 PER MILLE SIGN ("[/1000]") -->
145
+ <!ENTITY prime "&#8242;"><!-- U+2032 PRIME ("'") -->
146
+ <!ENTITY Prime "&#8243;"><!-- U+2033 DOUBLE PRIME ('"') -->
147
+ <!ENTITY lsaquo "&#8249;"><!-- U+2039 SINGLE LEFT-POINTING ANGLE QUOTATION MARK ("<") -->
148
+ <!ENTITY rsaquo "&#8250;"><!-- U+203A SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (">") -->
149
+ <!ENTITY frasl "&#8260;"><!-- U+2044 FRACTION SLASH ("/") -->
150
+ <!ENTITY euro "&#8364;"><!-- U+20AC EURO SIGN ("EUR") -->
151
+ <!ENTITY trade "&#8482;"><!-- U+2122 TRADE MARK SIGN ("[TM]") -->
152
+ <!ENTITY larr "&#8592;"><!-- U+2190 LEFTWARDS ARROW ("<-\u002D") -->
153
+ <!ENTITY rarr "&#8594;"><!-- U+2192 RIGHTWARDS ARROW ("\u002D->") -->
154
+ <!ENTITY harr "&#8596;"><!-- U+2194 LEFT RIGHT ARROW ("<->") -->
155
+ <!ENTITY lArr "&#8656;"><!-- U+21D0 LEFTWARDS DOUBLE ARROW ("<==") -->
156
+ <!ENTITY rArr "&#8658;"><!-- U+21D2 RIGHTWARDS DOUBLE ARROW ("==>") -->
157
+ <!ENTITY hArr "&#8660;"><!-- U+21D4 LEFT RIGHT DOUBLE ARROW ("<=>") -->
158
+ <!ENTITY minus "&#8722;"><!-- U+2212 MINUS SIGN ("-") -->
159
+ <!ENTITY lowast "&#8727;"><!-- U+2217 ASTERISK OPERATOR ("*") -->
160
+ <!ENTITY le "&#8804;"><!-- U+2264 LESS-THAN OR EQUAL TO ("<=") -->
161
+ <!ENTITY ge "&#8805;"><!-- U+2265 GREATER-THAN OR EQUAL TO (">=") -->
162
+ <!ENTITY lang "&#9001;"><!-- U+2329 LEFT-POINTING ANGLE BRACKET ("<") -->
163
+ <!ENTITY rang "&#9002;"><!-- U+232A RIGHT-POINTING ANGLE BRACKET (">") -->
164
+
165
+ <!-- EOF -->
data/rfc2629.dtd ADDED
@@ -0,0 +1,312 @@
1
+ <!--
2
+ revised DTD for the RFC document series, draft of 2009-10-06
3
+ -->
4
+
5
+
6
+ <!--
7
+ Typical invocation:
8
+ <!DOCTYPE rfc PUBLIC "-//IETF//DTD RFC 2629//EN"
9
+ "http://xml.resource.org/authoring/rfc2629.dtd" [
10
+ ... dtd subset ...
11
+ ]>
12
+ or
13
+ <!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
14
+ ... dtd subset ...
15
+ ]>
16
+ -->
17
+
18
+
19
+ <!--
20
+ Contents
21
+
22
+ Character entities
23
+
24
+ DTD data types
25
+
26
+ The top-level
27
+
28
+ Front matter
29
+
30
+ The Body
31
+
32
+ Back matter
33
+ -->
34
+
35
+
36
+ <!--
37
+ Character entities
38
+ -->
39
+
40
+
41
+ <!ENTITY % rfc2629-xhtml
42
+ PUBLIC "-//IETF//ENTITIES XHTML subset for RFC 2629//EN"
43
+ "rfc2629-xhtml.ent">
44
+ %rfc2629-xhtml;
45
+
46
+ <!ENTITY % rfc2629-other
47
+ PUBLIC "-//IETF//ENTITIES Other for RFC 2629//EN"
48
+ "rfc2629-other.ent">
49
+ %rfc2629-other;
50
+
51
+
52
+ <!--
53
+ DTD data types:
54
+
55
+ entity description
56
+ ====== ===============================================
57
+ NUMBER [0-9]+
58
+ NUMBERS a comma-separated list of NUMBER
59
+
60
+ DAY the day of the month, e.g., "1"
61
+ MONTH the month of the year, e.g., "January"
62
+ YEAR a four-digit year, e.g., "1999"
63
+
64
+ URI e.g., "http://invisible.net/"
65
+
66
+ ATEXT/CTEXT printable ASCII text (no line-terminators)
67
+
68
+ TEXT character data
69
+ -->
70
+
71
+
72
+ <!ENTITY % NUMBER "CDATA">
73
+ <!ENTITY % NUMBERS "CDATA">
74
+
75
+ <!ENTITY % DAY "CDATA">
76
+ <!ENTITY % MONTH "CDATA">
77
+ <!ENTITY % YEAR "CDATA">
78
+
79
+ <!ENTITY % URI "CDATA">
80
+
81
+ <!ENTITY % ATEXT "CDATA">
82
+ <!ENTITY % CTEXT "#PCDATA">
83
+
84
+ <!ENTITY % TEXT "#PCDATA">
85
+
86
+ <!ENTITY rfc.number "XXXX">
87
+
88
+
89
+ <!--
90
+ The top-level
91
+ -->
92
+
93
+
94
+ <!--
95
+ attributes for the "rfc" element are supplied by the RFC
96
+ editor. when preparing drafts, authors should leave them blank.
97
+
98
+ the "seriesNo" attribute is used if the category is, e.g., BCP.
99
+ -->
100
+ <!ELEMENT rfc (front,middle,back?)>
101
+ <!ATTLIST rfc
102
+ number %NUMBER; #IMPLIED
103
+ obsoletes %NUMBERS; ""
104
+ updates %NUMBERS; ""
105
+ category (std|bcp|info|exp|historic)
106
+ #IMPLIED
107
+ consensus (no|yes) #IMPLIED
108
+ seriesNo %NUMBER; #IMPLIED
109
+ ipr (full2026|noDerivativeWorks2026|none
110
+ |full3667|noModification3667|noDerivatives3667
111
+ |full3978|noModification3978|noDerivatives3978
112
+ |trust200811|noModificationTrust200811|noDerivativesTrust200811
113
+ |trust200902|noModificationTrust200902|noDerivativesTrust200902
114
+ |pre5378Trust200902)
115
+ #IMPLIED
116
+ iprExtract IDREF #IMPLIED
117
+ submissionType
118
+ (IETF|IAB|IRTF|independent) "IETF"
119
+ docName %ATEXT; #IMPLIED
120
+ xml:lang %ATEXT; "en">
121
+
122
+
123
+ <!--
124
+ Front matter
125
+ -->
126
+
127
+
128
+ <!ELEMENT front (title,author+,date,area*,workgroup*,keyword*,
129
+ abstract?,note*)>
130
+
131
+ <!-- the "abbrev" attribute is used for headers, etc. -->
132
+ <!ELEMENT title (%CTEXT;)>
133
+ <!ATTLIST title
134
+ abbrev %ATEXT; #IMPLIED>
135
+
136
+ <!ELEMENT author (organization?,address?)>
137
+ <!ATTLIST author
138
+ initials %ATEXT; #IMPLIED
139
+ surname %ATEXT; #IMPLIED
140
+ fullname %ATEXT; #IMPLIED
141
+ role (editor) #IMPLIED>
142
+
143
+ <!ELEMENT organization
144
+ (%CTEXT;)>
145
+ <!ATTLIST organization
146
+ abbrev %ATEXT; #IMPLIED>
147
+
148
+ <!ELEMENT address (postal?,phone?,facsimile?,email?,uri?)>
149
+
150
+ <!-- this content model should be more strict:
151
+ at most one of each the city, region, code, and country
152
+ elements may be present -->
153
+ <!ELEMENT postal (street+,(city|region|code|country)*)>
154
+ <!ELEMENT street (%CTEXT;)>
155
+ <!ELEMENT city (%CTEXT;)>
156
+ <!ELEMENT region (%CTEXT;)>
157
+ <!ELEMENT code (%CTEXT;)>
158
+ <!ELEMENT country (%CTEXT;)>
159
+ <!ELEMENT phone (%CTEXT;)>
160
+ <!ELEMENT facsimile (%CTEXT;)>
161
+ <!ELEMENT email (%CTEXT;)>
162
+ <!ELEMENT uri (%CTEXT;)>
163
+
164
+ <!ELEMENT date EMPTY>
165
+ <!ATTLIST date
166
+ day %DAY; #IMPLIED
167
+ month %MONTH; #IMPLIED
168
+ year %YEAR; #IMPLIED>
169
+
170
+ <!-- meta-data... -->
171
+ <!ELEMENT area (%CTEXT;)>
172
+ <!ELEMENT workgroup (%CTEXT;)>
173
+ <!ELEMENT keyword (%CTEXT;)>
174
+
175
+ <!ELEMENT abstract (t)+>
176
+ <!ELEMENT note (t)+>
177
+ <!ATTLIST note
178
+ title %ATEXT; #REQUIRED>
179
+
180
+
181
+ <!--
182
+ The body
183
+ -->
184
+
185
+
186
+ <!ELEMENT middle (section+)>
187
+
188
+ <!ELEMENT section ((t|figure|texttable|iref)*,section*)>
189
+ <!ATTLIST section
190
+ anchor ID #IMPLIED
191
+ title %ATEXT; #REQUIRED
192
+ toc (include|exclude|default)
193
+ "default">
194
+
195
+ <!-- use of <appendix/> is deprecated...
196
+ <!ELEMENT appendix ((t|figure|texttable|iref)*,appendix*)>
197
+ <!ATTLIST appendix
198
+ anchor ID #IMPLIED
199
+ title %ATEXT; #REQUIRED
200
+ toc (include|exclude|default)
201
+ "default">
202
+ -->
203
+
204
+ <!-- use of <figure/> is deprecated... -->
205
+ <!ELEMENT t (%TEXT;|list|figure|xref|eref|iref|cref|spanx|vspace)*>
206
+ <!ATTLIST t
207
+ anchor ID #IMPLIED
208
+ hangText %ATEXT; #IMPLIED>
209
+
210
+ <!-- the value of the style attribute is inherited from the closest
211
+ parent -->
212
+ <!ELEMENT list (t+)>
213
+ <!ATTLIST list
214
+ style %ATEXT; #IMPLIED
215
+ hangIndent %NUMBER; #IMPLIED
216
+ counter %ATEXT; #IMPLIED>
217
+
218
+ <!ELEMENT xref (%CTEXT;)>
219
+ <!ATTLIST xref
220
+ target IDREF #REQUIRED
221
+ pageno (true|false) "false"
222
+ format (counter|title|none|default)
223
+ "default">
224
+
225
+ <!ELEMENT eref (%CTEXT;)>
226
+ <!ATTLIST eref
227
+ target %URI; #REQUIRED>
228
+
229
+ <!ELEMENT iref EMPTY>
230
+ <!ATTLIST iref
231
+ item %ATEXT; #REQUIRED
232
+ subitem %ATEXT; ""
233
+ primary (true|false) "false">
234
+
235
+ <!ELEMENT cref (%CTEXT;)>
236
+ <!ATTLIST cref
237
+ anchor ID #IMPLIED
238
+ source %ATEXT; #IMPLIED>
239
+
240
+ <!ELEMENT spanx (%CTEXT;)>
241
+ <!ATTLIST spanx
242
+ xml:space (default|preserve) "preserve"
243
+ style %ATEXT; "emph">
244
+
245
+ <!ELEMENT vspace EMPTY>
246
+ <!ATTLIST vspace
247
+ blankLines %NUMBER; "0">
248
+
249
+ <!ELEMENT figure (iref*,preamble?,artwork,postamble?)>
250
+ <!ATTLIST figure
251
+ anchor ID #IMPLIED
252
+ title %ATEXT; ""
253
+ suppress-title (true|false) "false"
254
+ src %URI; #IMPLIED
255
+ align (left|center|right) "left"
256
+ alt %ATEXT; ""
257
+ width %ATEXT; ""
258
+ height %ATEXT; "">
259
+
260
+ <!ELEMENT preamble (%TEXT;|xref|eref|iref|cref|spanx)*>
261
+ <!ELEMENT artwork (%TEXT;)*>
262
+ <!ATTLIST artwork
263
+ xml:space (default|preserve) "preserve"
264
+ name %ATEXT; ""
265
+ type %ATEXT; ""
266
+ src %URI; #IMPLIED
267
+ align (left|center|right) "left"
268
+ alt %ATEXT; ""
269
+ width %ATEXT; ""
270
+ height %ATEXT; "">
271
+
272
+ <!ELEMENT postamble (%TEXT;|xref|eref|iref|cref|spanx)*>
273
+
274
+ <!ELEMENT texttable (preamble?,ttcol+,c*,postamble?)>
275
+ <!ATTLIST texttable
276
+ anchor ID #IMPLIED
277
+ title %ATEXT; ""
278
+ suppress-title (true|false) "false"
279
+ align (left|center|right) "center"
280
+ style (all|none|headers|full) "full">
281
+ <!ELEMENT ttcol (%CTEXT;)>
282
+ <!ATTLIST ttcol
283
+ width %ATEXT; #IMPLIED
284
+ align (left|center|right) "left">
285
+ <!ELEMENT c (%TEXT;|xref|eref|iref|cref|spanx)*>
286
+
287
+
288
+ <!--
289
+ Back matter
290
+ -->
291
+
292
+
293
+ <!-- sections, if present, are appendices -->
294
+ <!ELEMENT back (references*,section*)>
295
+
296
+ <!ELEMENT references (reference+)>
297
+ <!ATTLIST references
298
+ title %ATEXT; "References">
299
+ <!ELEMENT reference (front,seriesInfo*,format*,annotation*)>
300
+ <!ATTLIST reference
301
+ anchor ID #IMPLIED
302
+ target %URI; #IMPLIED>
303
+ <!ELEMENT seriesInfo EMPTY>
304
+ <!ATTLIST seriesInfo
305
+ name %ATEXT; #REQUIRED
306
+ value %ATEXT; #REQUIRED>
307
+ <!ELEMENT format EMPTY>
308
+ <!ATTLIST format
309
+ target %URI; #IMPLIED
310
+ type %ATEXT; #REQUIRED
311
+ octets %NUMBER; #IMPLIED>
312
+ <!ELEMENT annotation (%TEXT;|xref|eref|iref|cref|spanx)*>