source: project/wiki/eggref/4/doctype @ 15350

Last change on this file since 15350 was 15350, checked in by sjamaan, 11 years ago

Document the doctype-rules

File size: 1.6 KB
Line 
1[[tags:eggs]]
2
3This is version 1.1 of the '''doctype''' extension library for Chicken Scheme.
4
5[[toc:]]
6
7== Description
8
9
10
11Provides [[http://htmlhelp.com/tools/validator/doctype.html|XML doctypes]] as strings
12
13
14== Documentation
15
16
17Exports strings corresponding to standard XML (XHTML, HTML) doctypes:
18
19<constant>xhtml-1.0-strict</constant>
20<constant>html-4.01-strict</constant>
21<constant>xhtml-1.0-transitional</constant>
22<constant>html-4.01-transitional</constant>
23<constant>xhtml-1.0-frameset</constant>
24<constant>html-4.01-frameset</constant>
25<constant>html-3.2</constant>
26<constant>html-2.0</constant>
27
28Also exports a handy "ruleset" for use with [[sxml-transforms]]:
29
30<constant>doctype-rules</constant>
31
32This ruleset contains preorder rules which should be appended/prepended
33to the {{universal-conversion-rules}} because they output raw text which
34should not be processed again.
35
36== Examples
37
38 #;1> (use doctype)
39 #;2> (print xhtml-1.0-strict)
40 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
41      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
42 #;3> (use sxml-transforms)
43 #;4> (SRV:send-reply
44        (pre-post-order
45          `((xhtml-1.0-strict)
46            (html (body "blah")))
47          (append doctype-rules universal-conversion-rules)))
48 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
49      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
50 <html>
51 <body>blah</body></html>
52
53== About this egg
54
55
56=== Author
57
58[[http://3e8.org/zb|Zbigniew]]
59=== Version history
60
61; 1.2 : Add {{doctype-rules}}
62; 1.1 : Fix typo in html-4.01-transitional
63; 1.0 : Initial release
64
65=== License
66
67
68Public domain.
69
Note: See TracBrowser for help on using the repository browser.