From 17dfdf2288418a9f571e1a74bdd09766ed9d4338 Mon Sep 17 00:00:00 2001 From: David Lichteblau Date: Sat, 21 Apr 2007 14:54:17 +0200 Subject: [PATCH] Dokumentation --- GNUmakefile | 9 + doc/GNUmakefile | 4 + doc/doc.css | 146 +++++++++++++++ doc/html.xsl | 548 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/logo.png | Bin 0 -> 2902 bytes index.css | 154 ++++++++++++++++ index.html | 91 ++++++++++ index.xsl | 118 ++++++++++++ package.lisp | 27 ++- 9 files changed, 1095 insertions(+), 2 deletions(-) create mode 100644 GNUmakefile create mode 100644 doc/GNUmakefile create mode 100644 doc/doc.css create mode 100644 doc/html.xsl create mode 100644 doc/logo.png create mode 100644 index.css create mode 100644 index.html create mode 100644 index.xsl diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..0dd2376 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,9 @@ +all: index.html doc + +.PHONY: index.html +index.html: + echo '' | xsltproc index.xsl - >index.html + +.PHONY: doc +doc: + cd doc && make diff --git a/doc/GNUmakefile b/doc/GNUmakefile new file mode 100644 index 0000000..e071876 --- /dev/null +++ b/doc/GNUmakefile @@ -0,0 +1,4 @@ +.PHONY: index.html + +index.html: doc.xml + xsltproc html.xsl doc.xml >index.html diff --git a/doc/doc.css b/doc/doc.css new file mode 100644 index 0000000..4d157ce --- /dev/null +++ b/doc/doc.css @@ -0,0 +1,146 @@ +div.sidebar { + float: right; + min-width: 15%; + padding: 0pt 5pt 5pt 5pt; + font-family: verdana, arial; +} + +a { + text-decoration: none; + color: #000000; + border-bottom: 1px dotted black; + border-top: 1px solid white; + border-left: 1px solid white; + border-right: 1px solid white; +} + +.sidebar a { + border-top: 1px solid #eeeeee; + border-left: 1px solid #eeeeee; + border-right: 1px solid #eeeeee; +} + +a:hover { + color: #000000; + border: 1px solid black; +} + +div.sidebar-title { + font-weight: bold; + color: #ffffff; + background-color: #000000; /* #0000aa */ + border: solid #000000; /* #0000aa */ + border-top-width: 1px; + border-bottom-width: 0px; + border-left-width: 4px; + border-right-width: 0px; + margin: 0em 2pt 1px 2em; +} + +div.sidebar-title a { + color: #ffffff; +} + +div.sidebar-main { + background-color: #eeeeee; + border: solid #000000; /* #0000aa */ + border-top-width: 0px; + border-bottom-width: 0px; + border-left-width: 4px; + border-right-width: 0px; + margin: 0em 2pt 1em 2em; + padding-top: 2px; + padding-left: 2px; +} + +div.sidebar ul { + list-style-type: square; + padding: 0pt 0pt 0pt 1em; + margin: 0 0 1em; +} + +div.sidebar ul.sub { + list-style-type: disc; + padding: 0pt 0pt 0pt 1em; + margin: 0 0 1em; +} + +body { + color: #000000; + background-color: #ffffff; + margin-right: 0pt; + margin-bottom: 10%; + font-family: verdana, arial; +// background-image: url(bg.png); +// background-position: top left; +// background-attachment: fixed; +// background-repeat: no-repeat; +} + +.main { + margin-top: 20px; + margin-left: 40px; + padding-left: 30px; +} + +h1,h2 { + margin-left: -30px; +} + +.code { + border: solid 1px #d0d0d0; + padding: 1em; + margin-right: 10%; +} + +.def { +// background-color: #ffcd87; +// background-color: #ffb247; +// background-color: #e0a655; + border-bottom: 1px solid black; + padding: 1px 1px 1px 1px; + margin-bottom: 1px; + font-weight: bold; + margin-right: 40px; +} + +.def:hover { +// background-color: #ffcd87; +// background-color: #ffb247; + background-color: #e0a655; +} + +.def a { + text-decoration: none; + color: #000000; + border-bottom: 0px solid white; + border-top: 0px solid white; + border-left: 0px solid white; + border-right: 0px solid white; +} + +.def a:hover { + background-color: #e0a655; + color: #000000; + text-decoration: none; + border-bottom: 0px solid white; + border-top: 0px solid white; + border-left: 0px solid white; + border-right: 0px solid white; +} + +.nomargin { + margin-bottom: 0; + margin-top: 0; +} + +.noindent { + margin-left: -30px; +} + +#header { + margin-right: 22px; + border-bottom: 1px solid black; + font-family: verdana, arial; + font-size: 12pt; +} diff --git a/doc/html.xsl b/doc/html.xsl new file mode 100644 index 0000000..9ddf336 --- /dev/null +++ b/doc/html.xsl @@ -0,0 +1,548 @@ + + + + + + + + <xsl:value-of select="@title"/> + + + + + + +
+ Index of packages: + +
+ + +
+ + + +

Arguments

+
    + +
+
+ + +

Details

+ +
+ +

+ No documentation string. Possibly unimplemented or incomplete. +

+
+
+ +

Implementation notes

+ +
+ +

See also

+ +
+
+ + +

+ + Package + + +

+
+ +
+ + + + + <xsl:text>Package </xsl:text> + <xsl:value-of select="@name"/> + + + + + + +
+

+ Up: + + + +

+

+ Package + +

+ + +

Contents

+ +
+ + Index + + +
+

Index

+ +
+ + +
+ + + + + + + + + + + + + + + , class + +
+ + + + + + <xsl:text>Class </xsl:text> + <xsl:value-of select="@name"/> + + + + + + +
+

+ Package: + + + +

+ +
+ + +
+
+ + + + + + , function + +
+ + + + + + <xsl:text>Function </xsl:text> + <xsl:value-of select="@name"/> + + + + + + +
+

+ Package: + + + +

+ +
+ + +
+
+ + + + + + , macro + +
+ + + + + + <xsl:text>Macro </xsl:text> + <xsl:value-of select="@name"/> + + + + + + +
+

+ Package: + + + +

+ +
+ + +
+
+ + + +   + + (undocumented) + + + + + + + + + , variable + +
+ + + + + + <xsl:text>Variable </xsl:text> + <xsl:value-of select="@name"/> + + + + + + +
+

+ Package: + + + +

+ +
+ + +
+
+ + +

+ Class + +

+ +
+ + +

+ Function + +

+ + +

Returns

+ +
+ +
+ + +

+ Macro + +

+ + +
+ + +

+ Variable + +

+ +
+ + + + ( + + ) + + + + +   + + + + + + + + + + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
+
+ + +
  • + +
  • +
    + + + + + + + + + + + + +
    +
    + + +
  • + + + + -- + +
  • +
    + + + + + + + + + + +

    +
    + + + + +

    + + +

    + +
    + + + + + +
    +
    + + + + +
    + + + + + + ... + + + + + + +
    +
    +
    + + + + + + +
    + + + + + + ... + + + + + + +
    +
    +
    + + + + + + + + + + + +
    diff --git a/doc/logo.png b/doc/logo.png new file mode 100644 index 0000000000000000000000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- /dev/null +++ b/index.css @@ -0,0 +1,154 @@ +div.sidebar { + float: right; + min-width: 15%; + padding: 0pt 5pt 5pt 5pt; + font-family: verdana, arial; +} + +.sidebar a { + border-top: 1px solid #eeeeee; + border-left: 1px solid #eeeeee; + border-right: 1px solid #eeeeee; +} + +#homepage a { + text-decoration: none; + color: black; + border-bottom: 1px solid #ff9500; + border-top: 1px solid white; + border-left: 1px solid white; + border-right: 1px solid white; +} + +#homepage a:hover { + color: #ff9500; + border-bottom: 1px solid #aaaaaa; +} + +div.sidebar-title { + font-weight: bold; + color: #ffffff; + background-color: #000000; /* #0000aa */ + border: solid #000000; /* #0000aa */ + border-top-width: 1px; + border-bottom-width: 0px; + border-left-width: 4px; + border-right-width: 0px; + margin: 0em 2pt 1px 2em; +} + +div.sidebar-title a { + color: #ffffff; +} + +div.sidebar-main { + background-color: #eeeeee; + border: solid #000000; /* #0000aa */ + border-top-width: 0px; + border-bottom-width: 0px; + border-left-width: 4px; + border-right-width: 0px; + margin: 0em 2pt 1em 2em; + padding-top: 2px; + padding-left: 2px; +} + +div.sidebar ul { + list-style-type: square; + padding: 0pt 0pt 0pt 1em; + margin: 0 0 1em; +} + +div.sidebar ul.sub { + list-style-type: disc; + padding: 0pt 0pt 0pt 1em; + margin: 0 0 1em; +} + +body { + color: #000000; + background-color: #ffffff; + margin-right: 0pt; + margin-bottom: 10%; + font-family: verdana, arial; +// background-image: url(bg.png); +// background-position: top left; +// background-attachment: fixed; +// background-repeat: no-repeat; +} + +.main { + margin-top: 20px; + margin-left: 40px; + padding-left: 30px; +} + +h1,h2,h3 { + margin-top: 2em; + margin-left: -30px; +} + +.code { + border: solid 1px #d0d0d0; + padding: 1em; + margin-right: 10%; +} + +.def { +// background-color: #ffcd87; +// background-color: #ffb247; +// background-color: #e0a655; + border-bottom: 1px solid black; + padding: 1px 1px 1px 1px; + margin-bottom: 1px; + font-weight: bold; + margin-right: 40px; +} + +.def:hover { +// background-color: #ffcd87; +// background-color: #ffb247; + background-color: #e0a655; +} + +.def a { + text-decoration: none; + color: #000000; + border-bottom: 0px solid white; + border-top: 0px solid white; + border-left: 0px solid white; + border-right: 0px solid white; +} + +.def a:hover { + background-color: #e0a655; + color: #000000; + text-decoration: none; + border-bottom: 0px solid white; + border-top: 0px solid white; + border-left: 0px solid white; + border-right: 0px solid white; +} + +.nomargin { + margin-bottom: 0; + margin-top: 0; +} + +.noindent { + margin-left: -30px; +} + +#header { + margin-right: 22px; + border-bottom: 1px solid black; + font-family: verdana, arial; + font-size: 12pt; +} + +.code { + background-color: #eeeeee; + border: solid 1px #d0d0d0; + padding: 1em; + margin-right: 10%; +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..bd0b18e --- /dev/null +++ b/index.html @@ -0,0 +1,91 @@ + + + + + + cxml-rng: Relax NG for Closure XML + + + + + +
    +

    + An implementation + of Relax + NG schema validation + written in Common Lisp. +

    +

    + cxml-rng was written + by David + Lichteblau and is designed as an add-on library for + Closure XML. + It is available under an X11-style license. +

    +

    + Please send bug reports + to + cxml-devel@common-lisp.net + (list information). +

    +

    Download and Installation

    +

    + Download + cxml-rng tarballs + or get it from + git: http://www.lichteblau.com/git/cxml-rng.git

    +

    + cxml-rng + needs Closure + XML and CL-PPCE. + ASDF is used for + compilation. Register the .asd file, e.g. by symlinking it, + then compile cxml-rng using asdf:operate. +

    +
    $ ln -sf `pwd`/cxml-rng.asd /path/to/your/registry/
    +* (asdf:operate 'asdf:load-op :cxml-rng)
    +

    Implementation-specific notes

    +

    + At this point, cxml-rng is written to use Lisp strings (as opposed + to runes), and as meant to be used on Lisp implementations + with Unicode support. +

    +

    Example

    +

    + Use cxml-rng:parse-relax-ng + to parse a Relax NG schema file. The + resulting parsed-grammar + object is a representation of a simplified schema using Lisp + objects, which has gone through most stages of simplification as + described the Relax NG + specification. cxml-rng:serialize-grammar + can be used to write a Relax NG file in XML syntax for this + grammar. +

    +

    + In order to validate XML against a schema, create a + validation handler for the grammar + using cxml-rng:make-validator. + The validation + handler processes SAX events and can be used with any + function generating such events, in particular + with cxml:parse-file. +

    +
    (cxml:parse-file "test.xml"
    +                 (cxml-rng:make-validator
    +                  (cxml-rng:parse-relax-ng #p"test.rng")))
    +

    Documentation

    +

    + Detailed API documentation + is available. +

    +
    + + diff --git a/index.xsl b/index.xsl new file mode 100644 index 0000000..94734bf --- /dev/null +++ b/index.xsl @@ -0,0 +1,118 @@ + + + + + + + + cxml-rng: Relax NG for Closure XML + + + + + + +
    +

    + An implementation + of Relax + NG schema validation + written in Common Lisp. +

    +

    + cxml-rng was written + by David + Lichteblau and is designed as an add-on library for + Closure XML. + It is available under an X11-style license. +

    +

    + Please send bug reports + to + cxml-devel@common-lisp.net + (list information). +

    + +

    Download and Installation

    + +

    + Download + cxml-rng tarballs + or get it from + git: http://www.lichteblau.com/git/cxml-rng.git +

    +

    + cxml-rng + needs Closure + XML and CL-PPCE. + ASDF is used for + compilation. Register the .asd file, e.g. by symlinking it, + then compile cxml-rng using asdf:operate. +

    +
    $ ln -sf `pwd`/cxml-rng.asd /path/to/your/registry/
    +* (asdf:operate 'asdf:load-op :cxml-rng)
    + +

    Implementation-specific notes

    +

    + At this point, cxml-rng is written to use Lisp strings (as opposed + to runes), and as meant to be used on Lisp implementations + with Unicode support. +

    + +

    Example

    +

    + Use cxml-rng:parse-relax-ng + to parse a Relax NG schema file. The + resulting parsed-grammar + object is a representation of a simplified schema using Lisp + objects, which has gone through most stages of simplification as + described the Relax NG + specification. cxml-rng:serialize-grammar + can be used to write a Relax NG file in XML syntax for this + grammar. +

    +

    + In order to validate XML against a schema, create a + validation handler for the grammar + using cxml-rng:make-validator. + The validation + handler processes SAX events and can be used with any + function generating such events, in particular + with cxml:parse-file. +

    +
    (cxml:parse-file "test.xml"
    +                 (cxml-rng:make-validator
    +                  (cxml-rng:parse-relax-ng #p"test.rng")))
    + +

    Documentation

    +

    + Detailed API documentation + is available. +

    +
    + + +
    + + + + +
    diff --git a/package.lisp b/package.lisp index 04d745e..e0d87dc 100644 --- a/package.lisp +++ b/package.lisp @@ -1,4 +1,27 @@ (defpackage :cxml-rng (:use :cl) - (:export #:parse-relax-ng - #:make-validator)) + (:export #:rng-error + #:parsed-grammar + #:parse-relax-ng + #:serialize-grammar + #:make-validator) + (:documentation + "@code{cxml-rng} implements @a[http://relaxng.org/spec-20011203.html]{ + Relax NG} schema validation for Closure XML. + + @begin[Example]{section} + @begin{code} + (cxml:parse-file \"test.xml\" + (cxml-rng:make-validator + (cxml-rng:parse-relax-ng #p\"test.rng\"))) + @end{code} + @end{section} + @begin[Classes]{section} + @aboutclass{parsed-grammar} + @aboutclass{rng-error} + @end{section} + @begin[Parsing and validating]{section} + @aboutfun{parse-relax-ng} + @aboutfun{make-validator} + @aboutfun{serialize-grammar} + @end{section}")) -- 2.11.4.GIT