RFC2629 test casesJ. F. Reschke
greenbytes
December 2007

Test cases for RFC2629 formatting


Table of Contents


1. Lists

1.1 hanging list

Name:
timeout
Namespace:
DAV:
Purpose:
The timeout associated with a lock
Value:
TimeType ;Defined in section 9.8

1.2 numbered list

A numbered list:

  1. one
  2. two
  3. three

1.3 ordered list (letters)

An ordered list using letters:

  1. one
  2. two
  3. three
  4. one
  5. two
  6. three
  7. one
  8. two
  9. three
  10. one
  11. two
  12. three
  13. one
  14. two
  15. three
  16. one
  17. two
  18. three
  19. one
  20. two
  21. three
  22. one
  23. two
  24. three
  25. one
  26. two
  27. three
  28. one
  29. two
  30. three

1.4 no explicit counters

Example for numbered list with user-defined-format:

R1:
R1
R2:
R2

Another list:

S1:
S1
S2:
S2

Next list should continue counting R's:

R3:
R3
R4:
R4

Same with character-based numbering:

c-a:
c-a
c-b:
c-b

1.5 with explicit counters

A few requirements:

R1:
req R1
R2:
req R2

More requirements:

R3:
req R3
R4:
req R4

A few rules:

R1:
rule R1
R2:
rule R2
R3:
rule R3

Explicit counter with name matching it's format string:

c-c:
c-c
c-d:
c-d

Same, without counter:

c-e:
c-e
c-f:
c-f

1.6 Nested list

  1. One
  2. Two
    1. 17
    2. 42
  3. Three

1.7 list without style

One
Two
Three

1.8 list with multiple paragraphs in a single list item

  1. Simple list item.

  2. This one has two paragraphs. This is the first one.

    This one has two paragraphs. This is the second one.

  3. Another simple list item.


2. spanx

This is default.

This is emph(asized).

This is strong.

This is verb(atim).

Here is a carriage return inside a spanx element.


3. Tables

The list of valid keywords are:

keyworddefaultmeaningnot aligned
strictnotry to enforce the ID-nits conventions and DTD validitya
iprnotifiednoinclude boilerplate from Section 10.4(d) of [RFC2026]bb bb
compactnowhen producing a txt/nroff file, try to conserve vertical whitespaceccc ccc ccc
subcompactcompactif compact is "yes", then setting this to "no" will make things a little less compactdddd dddd dddd dddd
needLinesn/aan integer hint indicating how many contiguous lines are needed at this point in the outputeeeee eeeee eeeee eeeee eeeee
here come empty cells

Remember, that as with everything else in XML, keywords and values are case-sensitive.

3.1 no borders

The table below should appear with no borders.

C1C2
1112
2122

Table 1: a table with no borders

3.2 borders around headers

The table below should appear with borders just around the headers.

C1C2
1112
2122

3.3 referencing tables

Table 1 shows a table with no borders.

The table above shows a table with no borders.


4. Figures

4.1 with preamble, no title...

with preamble, no title...

  +--+
  |  |
  +--+

4.2 with postamble and title...

  +--+
  |  |
  +--+

with postamble and title...

Figure 1: another figure

The figure above has the title "another figure".

4.3 Whitespace handling

Para...

Leading whitespace

test test (leading ws)

Para...

Trailing whitespace

test test (trailing ws)
   

Para...

No whitespace

test test (no ws)

Para...

4.4 Whitespace around figures

spacing paragraph

ART

spacing paragraph

preamble, then

ART

spacing paragraph

ART

then postamble

spacing paragraph


5. References

5.1 xref with no content

We are in Section 5.

5.2 xref with no content

Section 5 is the parent section.

5.3 xref to named <t> element

See first sentence of previous section.

5.4 xref to named <t> element inside list

See last entry in Section 1.3.

5.5 xref with no auto-formatting

So far we have sections 1 ("Lists") through 5 ("References").

5.6 xref with content and auto-formatting

This is a subsection of References (Section 5).

5.7 xref with content and no formatting

This is a subsection of References. Here we are referring to RFC 2026, without emitting extra formatting.

5.8 xref with no content and anchor formatting

See [RFC2026, RFC2396].

5.9 eref with no content

See also <http://greenbytes.de/tech/webdav>. Here's another one that is quite long: <http://greenbytes.de/tech/webdav/draft-reschke-rfc3744bis-issues.html#5.7_inherited-acl-set-protected>. Does it break properly?

5.10 eref with content

See also greenbytes WebDAV resources.


6. Paragraph formatting

This is the first sentence of the paragraph. This is the second sentence of the paragraph (with two leading blanks). Here's another sentence that was started on a separate line in the input file.

This is the second paragraph.


7. Sections

7.1 Subsection with TOC entry

7.2 Subsection without TOC entry

7.2.1 Sub-subsection with TOC entry


8. Comments

This line contains a few comments. [rfc.comment.1] This line contains a few comments. [comment1] This line contains a few comments. [comment2] This line contains a few comments. [rfc.comment.2] This line contains a few comments.


9. Artwork width

This should fit (69 characters plus three spaces of indentation in text output).

012345678901234567890123456789012345678901234567890123456789012345678

This shouldn't.

0123456789012345678901234567890123456789012345678901234567890123456789

10. Extensions

These are tests for extensions done in rfc2629.xslt. Do not expect them to work out-of-the-box in xml2rfc.

10.1 Markup in figure/artwork

Internal References: a test reference to [RFC2396]

External References: a test reference to <http://xml.resource.org>

a test index entry inside a figure

Styling: <spanx> inside artwork

10.2 Quotations

Here's a quote: This is a Quote.

Here's a block level quote:

Here's a quote.

More text.

10.3 Subsections

Foo

The line above should be marked up similar to a subsection heading.

10.4 Box Drawing

The figure below should use box drawing characters instead of "+", "-" and "|".

  ┌────────────────┐
  │ This is a Box. │
  └────────────────┘
  

10.5 Computed Reference Targets

Referring to this section by anchor name indirectly through the references: Section 10.5 of [TSTCS].

(default formatting): Section 10.5 of [TSTCS].

  Default inside a figure: [TSTCS], Section 10.5

With a broken anchor: Section ERROR: Anchor 'a-target-that-isnt-defined' not found in testcase.xml. of [TSTCS].


11. Blank Lines

Just a forced
line break.

One

blank line.

Seven







blank lines.

12. References

[RFC2026]Bradner, S., “The Internet Standards Process -- Revision 3”, BCP 9, RFC 2026, October 1996.
[RFC2396]Berners-Lee, T., Fielding, R.T., and L. Masinter, “Uniform Resource Identifiers (URI): Generic Syntax”, RFC 2396, August 1998.
This RFC will soon be updated, check <http://cvs.apache.org/viewcvs.cgi/*checkout*/ietf-uri/rev-2002/rfc2396bis.html> for the latest draft.
The issues list is at <http://cvs.apache.org/viewcvs.cgi/*checkout*/ietf-uri/rev-2002/issues.html>.
[TSTCS]Reschke, J. F., “Test cases for RFC2629 formatting”, October 2007.

Editorial Comments

[rfc.comment.1]
No anchor, source given. --JRE
[comment1]
Anchor given, no source.
[comment2]
Both specified. --JRE
[rfc.comment.2]
No anchor, no source.

Author's Address

Julian F. Reschkegreenbytes GmbHHafenweg 16Muenster, NW 48155GermanyPhone: +49 251 2807760Fax: +49 251 2807761EMail: URI: http://greenbytes.de/tech/webdav/

Index

R T