Changeset 15350 in project for wiki


Ignore:
Timestamp:
08/07/09 13:47:49 (10 years ago)
Author:
sjamaan
Message:

Document the doctype-rules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/doctype

    r12166 r15350  
    1515
    1616
    17 Exports strings corresponding to standard XML (XHTML, HTML) doctypes.
     17Exports strings corresponding to standard XML (XHTML, HTML) doctypes:
    1818
    19  '''string:''' doctype:xhtml-1.0-strict
    20  '''string:''' doctype:html-4.01-strict
    21  '''string:''' doctype:xhtml-1.0-transitional
    22  '''string:''' doctype:html-4.01-transitional
    23  '''string:''' doctype:xhtml-1.0-frameset
    24  '''string:''' doctype:html-4.01-frameset
    25  '''string:''' doctype:html-3.2
    26  '''string:''' doctype:html-2.0
     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>
    2727
     28Also exports a handy "ruleset" for use with [[sxml-transforms]]:
    2829
     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.
    2935
    3036== Examples
    3137
    3238 #;1> (use doctype)
    33  #;2> (print doctype:xhtml-1.0-strict)
     39 #;2> (print xhtml-1.0-strict)
    3440 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    3541      "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>
    3652
    3753== About this egg
     
    4359=== Version history
    4460
     61; 1.2 : Add {{doctype-rules}}
    4562; 1.1 : Fix typo in html-4.01-transitional
    4663; 1.0 : Initial release
Note: See TracChangeset for help on using the changeset viewer.