summaryrefslogtreecommitdiffstats
path: root/slib.info
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:40 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:40 -0800
commit4684239efa63dc1b2c1cbe37ef7d3062029f5532 (patch)
tree606a687e9279e9bf6048925878968df9875a4973 /slib.info
parent64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34 (diff)
downloadslib-187d39f09ca275e1869687576ece440afd9d5b51.tar.gz
slib-187d39f09ca275e1869687576ece440afd9d5b51.zip
Import Upstream version 3b1upstream/3b1
Diffstat (limited to 'slib.info')
-rw-r--r--slib.info2812
1 files changed, 1448 insertions, 1364 deletions
diff --git a/slib.info b/slib.info
index 6535625..d4c570a 100644
--- a/slib.info
+++ b/slib.info
@@ -1,17 +1,17 @@
This is slib.info, produced by makeinfo version 4.8 from slib.texi.
-This manual is for SLIB (version 3a5, November 2007), the portable |
+This manual is for SLIB (version 3b1, February 2008), the portable |
Scheme library.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. |
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software
- Foundation; with no Invariant Sections, no Front-Cover Texts, and |
- no Back-Cover Texts. A copy of the license is included in the |
- section entitled "GNU Free Documentation License." |
+ Foundation; with no Invariant Sections, no Front-Cover Texts, and
+ no Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License."
INFO-DIR-SECTION The Algorithmic Language Scheme
START-INFO-DIR-ENTRY
@@ -24,18 +24,18 @@ File: slib.info, Node: Top, Next: The Library System, Prev: (dir), Up: (dir)
SLIB
****
-This manual is for SLIB (version 3a5, November 2007), the portable |
+This manual is for SLIB (version 3b1, February 2008), the portable |
Scheme library.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. |
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software
- Foundation; with no Invariant Sections, no Front-Cover Texts, and |
- no Back-Cover Texts. A copy of the license is included in the |
- section entitled "GNU Free Documentation License." |
+ Foundation; with no Invariant Sections, no Front-Cover Texts, and
+ no Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License."
* Menu:
@@ -139,8 +139,8 @@ The generalization of `provided?' for arbitrary features and catalog is
(1) scheme-implementation-type is the name symbol of the running
Scheme implementation (RScheme, |STk|, Bigloo, chez, Elk, gambit,
-guile, JScheme, kawa, MacScheme, MITScheme, Pocket-Scheme, Scheme48, |
-Scheme->C, Scheme48, Scsh, SISC, T, umb-scheme, or Vscm). Dependence on |
+guile, JScheme, kawa, MacScheme, MITScheme, Pocket-Scheme, Scheme48,
+Scheme->C, Scheme48, Scsh, SISC, T, umb-scheme, or Vscm). Dependence on
scheme-implementation-type is almost always the wrong way to do things.

@@ -862,7 +862,7 @@ implementations.
implementation and the name of the operating system. An
unspecified value is returned.
- (slib:report-version) => slib "3a5" on scm "5b1" on unix |
+ (slib:report-version) => slib "3b1" on scm "5b1" on unix |
-- Function: slib:report
Displays the information of `(slib:report-version)' followed by
@@ -877,7 +877,7 @@ implementations.
(slib:report)
=>
- slib "3a5" on scm "5b1" on unix |
+ slib "3b1" on scm "5b1" on unix |
(implementation-vicinity) is "/usr/local/lib/scm/"
(library-vicinity) is "/usr/local/lib/slib/"
(scheme-file-suffix) is ".scm"
@@ -980,19 +980,19 @@ These procedures are provided by all implementations.
omitted, in which case it defaults to the value returned by
`(current-output-port)'.
- -- Function: file-position port |
- -- Function: file-position port #f |
- PORT must be open to a file. `file-position' returns the current |
- position of the character in PORT which will next be read or |
- written. If the implementation does not support file-position, |
- then `#f' is returned. |
- |
- -- Function: file-position port k |
- PORT must be open to a file. `file-position' sets the current |
- position in PORT which will next be read or written. If |
- successful, `#f' is returned; otherwise `file-position' returns |
- `#f'. |
- |
+ -- Function: file-position port
+ -- Function: file-position port #f
+ PORT must be open to a file. `file-position' returns the current
+ position of the character in PORT which will next be read or
+ written. If the implementation does not support file-position,
+ then `#f' is returned.
+
+ -- Function: file-position port k
+ PORT must be open to a file. `file-position' sets the current
+ position in PORT which will next be read or written. If
+ successful, `#f' is returned; otherwise `file-position' returns
+ `#f'.
+
-- Function: output-port-width
-- Function: output-port-width port
Returns the width of PORT, which defaults to
@@ -1061,21 +1061,21 @@ These procedures are provided by all implementations.
If N is omitted or `#t', a success status is returned to the
system (if possible). If N is `#f' a failure is returned to the
system (if possible). If N is an integer, then N is returned to
- the system (if possible). If the Scheme session cannot exit, then |
- an unspecified value is returned from `slib:exit'. |
+ the system (if possible). If the Scheme session cannot exit, then
+ an unspecified value is returned from `slib:exit'.
-- Function: browse-url url
Web browsers have become so ubiquitous that programming languagues
should support a uniform interface to them.
- If a browser is running, `browse-url' causes the browser to |
- display the page specified by string URL and returns `#t'. |
+ If a browser is running, `browse-url' causes the browser to
+ display the page specified by string URL and returns `#t'.
If the browser is not running, `browse-url' starts a browser
displaying the argument URL. If the browser starts as a
- background job, `browse-url' returns `#t' immediately; if the |
- browser starts as a foreground job, then `browse-url' returns `#t' |
- when the browser exits; otherwise (if no browser) it returns `#f'. |
+ background job, `browse-url' returns `#t' immediately; if the
+ browser starts as a foreground job, then `browse-url' returns `#t'
+ when the browser exits; otherwise (if no browser) it returns `#f'.

File: slib.info, Node: Miscellany, Prev: System, Up: Universal SLIB Procedures
@@ -1095,7 +1095,7 @@ These procedures are provided by all implementations.
=> (foo bar)
(map identity LST)
== (copy-list LST)
- |
+
2.5.1 Mutual Exclusion
----------------------
@@ -2135,12 +2135,12 @@ File: slib.info, Node: Binding to multiple values, Next: Guarded LET* special
-- Special Form: receive formals expression body ...
`http://srfi.schemers.org/srfi-8/srfi-8.html'
- `(require 'let-values)' or `(require 'srfi-11)' |
- |
- -- Special Form: let-values ((formals expression) ...) body ... |
- -- Special Form: let-values* ((formals expression) ...) body ... |
- `http://srfi.schemers.org/srfi-11/srfi-11.html' |
- |
+ `(require 'let-values)' or `(require 'srfi-11)'
+
+ -- Special Form: let-values ((formals expression) ...) body ...
+ -- Special Form: let-values* ((formals expression) ...) body ...
+ `http://srfi.schemers.org/srfi-11/srfi-11.html'
+

File: slib.info, Node: Guarded LET* special form, Next: Guarded COND Clause, Prev: Binding to multiple values, Up: Scheme Syntax Extension Packages
@@ -2966,7 +2966,7 @@ File: slib.info, Node: Format, Next: Standard Formatted I/O, Prev: Precedence
4.2 Format (version 3.1)
========================
-`(require 'format)' or `(require 'srfi-28)' |
+`(require 'format)' or `(require 'srfi-28)'
* Menu:
@@ -3850,7 +3850,7 @@ File: slib.info, Node: Programs and Arguments, Next: HTML, Prev: Standard For
* Command Line:: A command line reader for Scheme shells
* Parameter lists:: 'parameters
* Getopt Parameter lists:: 'getopt-parameters
-* Filenames:: 'glob or 'filename
+* Filenames:: 'filename
* Batch:: 'batch

@@ -3952,9 +3952,9 @@ replaced them with a global variable:
Example:
#! /usr/local/bin/scm
- ;;;This code is SCM specific.
- (define argv (program-arguments))
+ (require 'program-arguments) |
(require 'getopt)
+ (define argv (program-arguments)) |
(define opts ":a:b:cd")
(let loop ((opt (getopt (length argv) argv opts)))
@@ -4272,7 +4272,7 @@ File: slib.info, Node: Filenames, Next: Batch, Prev: Getopt Parameter lists,
4.4.6 Filenames
---------------
-`(require 'filename)' or `(require 'glob)'
+`(require 'filename)' |
-- Function: filename:match?? pattern
-- Function: filename:match-ci?? pattern
@@ -4385,9 +4385,9 @@ currently uses 2 of these:
* *unknown*
-The `batch' module uses 2 enhanced relational tables (*note Using |
-Databases::) to store information linking the names of |
-`operating-system's to `batch-dialect'es. |
+The `batch' module uses 2 enhanced relational tables (*note Using
+Databases::) to store information linking the names of
+`operating-system's to `batch-dialect'es.
-- Function: batch:initialize! database
Defines `operating-system' and `batch-dialect' tables and adds the
@@ -4501,7 +4501,7 @@ Here is an example of the use of most of batch's procedures:
(require 'databases)
(require 'parameters)
(require 'batch)
- (require 'glob)
+ (require 'filename) |
(define batch (create-database #f 'alist-table))
(batch:initialize! batch)
@@ -5075,7 +5075,7 @@ File: slib.info, Node: Parsing HTML, Next: URI, Prev: HTTP and CGI, Up: Text

File: slib.info, Node: URI, Next: Parsing XML, Prev: Parsing HTML, Up: Textual Conversion Packages
- |
+
4.10 URI
========
@@ -5205,819 +5205,819 @@ purpose.

File: slib.info, Node: Parsing XML, Next: Printing Scheme, Prev: URI, Up: Textual Conversion Packages
- |
-4.11 Parsing XML |
-================ |
- |
-`(require 'xml-parse)' or `(require 'ssax)' |
- |
-The XML standard document referred to in this module is |
-`http://www.w3.org/TR/1998/REC-xml-19980210.html'. |
- |
-The present frameworks fully supports the XML Namespaces Recommendation |
-`http://www.w3.org/TR/REC-xml-names'. |
- |
-4.11.1 String Glue |
------------------- |
- |
- -- Function: ssax:reverse-collect-str list-of-frags |
- Given the list of fragments (some of which are text strings), |
- reverse the list and concatenate adjacent text strings. If |
- LIST-OF-FRAGS has zero or one element, the result of the procedure |
- is `equal?' to its argument. |
- |
- -- Function: ssax:reverse-collect-str-drop-ws list-of-frags |
- Given the list of fragments (some of which are text strings), |
- reverse the list and concatenate adjacent text strings while |
- dropping "unsignificant" whitespace, that is, whitespace in front, |
- behind and between elements. The whitespace that is included in |
- character data is not affected. |
- |
- Use this procedure to "intelligently" drop "insignificant" |
- whitespace in the parsed SXML. If the strict compliance with the |
- XML Recommendation regarding the whitespace is desired, use the |
- `ssax:reverse-collect-str' procedure instead. |
- |
-4.11.2 Character and Token Functions |
------------------------------------- |
- |
-The following functions either skip, or build and return tokens, |
-according to inclusion or delimiting semantics. The list of characters |
-to expect, include, or to break at may vary from one invocation of a |
-function to another. This allows the functions to easily parse even |
-context-sensitive languages. |
- |
- Exceptions are mentioned specifically. The list of expected |
-characters (characters to skip until, or break-characters) may include |
-an EOF "character", which is coded as symbol *eof* |
- |
- The input stream to parse is specified as a PORT, which is the last |
-argument. |
- |
- -- Function: ssax:assert-current-char char-list string port |
- Reads a character from the PORT and looks it up in the CHAR-LIST |
- of expected characters. If the read character was found among |
- expected, it is returned. Otherwise, the procedure writes a |
- message using STRING as a comment and quits. |
- |
- -- Function: ssax:skip-while char-list port |
- Reads characters from the PORT and disregards them, as long as they |
- are mentioned in the CHAR-LIST. The first character (which may be |
- EOF) peeked from the stream that is _not_ a member of the |
- CHAR-LIST is returned. |
- |
- -- Function: ssax:init-buffer |
- Returns an initial buffer for `ssax:next-token*' procedures. |
- `ssax:init-buffer' may allocate a new buffer at each invocation. |
- |
- -- Function: ssax:next-token prefix-char-list break-char-list |
- comment-string port |
- Skips any number of the prefix characters (members of the |
- PREFIX-CHAR-LIST), if any, and reads the sequence of characters up |
- to (but not including) a break character, one of the |
- BREAK-CHAR-LIST. |
- |
- The string of characters thus read is returned. The break |
- character is left on the input stream. BREAK-CHAR-LIST may |
- include the symbol `*eof*'; otherwise, EOF is fatal, generating an |
- error message including a specified COMMENT-STRING. |
- |
-`ssax:next-token-of' is similar to `ssax:next-token' except that it |
-implements an inclusion rather than delimiting semantics. |
- |
- -- Function: ssax:next-token-of inc-charset port |
- Reads characters from the PORT that belong to the list of |
- characters INC-CHARSET. The reading stops at the first character |
- which is not a member of the set. This character is left on the |
- stream. All the read characters are returned in a string. |
- |
- -- Function: ssax:next-token-of pred port |
- Reads characters from the PORT for which PRED (a procedure of one |
- argument) returns non-#f. The reading stops at the first |
- character for which PRED returns #f. That character is left on |
- the stream. All the results of evaluating of PRED up to #f are |
- returned in a string. |
- |
- PRED is a procedure that takes one argument (a character or the |
- EOF object) and returns a character or #f. The returned character |
- does not have to be the same as the input argument to the PRED. |
- For example, |
- |
- (ssax:next-token-of (lambda (c) |
- (cond ((eof-object? c) #f) |
+
+4.11 Parsing XML
+================
+
+`(require 'xml-parse)' or `(require 'ssax)'
+
+The XML standard document referred to in this module is
+`http://www.w3.org/TR/1998/REC-xml-19980210.html'.
+
+The present frameworks fully supports the XML Namespaces Recommendation
+`http://www.w3.org/TR/REC-xml-names'.
+
+4.11.1 String Glue
+------------------
+
+ -- Function: ssax:reverse-collect-str list-of-frags
+ Given the list of fragments (some of which are text strings),
+ reverse the list and concatenate adjacent text strings. If
+ LIST-OF-FRAGS has zero or one element, the result of the procedure
+ is `equal?' to its argument.
+
+ -- Function: ssax:reverse-collect-str-drop-ws list-of-frags
+ Given the list of fragments (some of which are text strings),
+ reverse the list and concatenate adjacent text strings while
+ dropping "unsignificant" whitespace, that is, whitespace in front,
+ behind and between elements. The whitespace that is included in
+ character data is not affected.
+
+ Use this procedure to "intelligently" drop "insignificant"
+ whitespace in the parsed SXML. If the strict compliance with the
+ XML Recommendation regarding the whitespace is desired, use the
+ `ssax:reverse-collect-str' procedure instead.
+
+4.11.2 Character and Token Functions
+------------------------------------
+
+The following functions either skip, or build and return tokens,
+according to inclusion or delimiting semantics. The list of characters
+to expect, include, or to break at may vary from one invocation of a
+function to another. This allows the functions to easily parse even
+context-sensitive languages.
+
+ Exceptions are mentioned specifically. The list of expected
+characters (characters to skip until, or break-characters) may include
+an EOF "character", which is coded as symbol *eof*
+
+ The input stream to parse is specified as a PORT, which is the last
+argument.
+
+ -- Function: ssax:assert-current-char char-list string port
+ Reads a character from the PORT and looks it up in the CHAR-LIST
+ of expected characters. If the read character was found among
+ expected, it is returned. Otherwise, the procedure writes a
+ message using STRING as a comment and quits.
+
+ -- Function: ssax:skip-while char-list port
+ Reads characters from the PORT and disregards them, as long as they
+ are mentioned in the CHAR-LIST. The first character (which may be
+ EOF) peeked from the stream that is _not_ a member of the
+ CHAR-LIST is returned.
+
+ -- Function: ssax:init-buffer
+ Returns an initial buffer for `ssax:next-token*' procedures.
+ `ssax:init-buffer' may allocate a new buffer at each invocation.
+
+ -- Function: ssax:next-token prefix-char-list break-char-list
+ comment-string port
+ Skips any number of the prefix characters (members of the
+ PREFIX-CHAR-LIST), if any, and reads the sequence of characters up
+ to (but not including) a break character, one of the
+ BREAK-CHAR-LIST.
+
+ The string of characters thus read is returned. The break
+ character is left on the input stream. BREAK-CHAR-LIST may
+ include the symbol `*eof*'; otherwise, EOF is fatal, generating an
+ error message including a specified COMMENT-STRING.
+
+`ssax:next-token-of' is similar to `ssax:next-token' except that it
+implements an inclusion rather than delimiting semantics.
+
+ -- Function: ssax:next-token-of inc-charset port
+ Reads characters from the PORT that belong to the list of
+ characters INC-CHARSET. The reading stops at the first character
+ which is not a member of the set. This character is left on the
+ stream. All the read characters are returned in a string.
+
+ -- Function: ssax:next-token-of pred port
+ Reads characters from the PORT for which PRED (a procedure of one
+ argument) returns non-#f. The reading stops at the first
+ character for which PRED returns #f. That character is left on
+ the stream. All the results of evaluating of PRED up to #f are
+ returned in a string.
+
+ PRED is a procedure that takes one argument (a character or the
+ EOF object) and returns a character or #f. The returned character
+ does not have to be the same as the input argument to the PRED.
+ For example,
+
+ (ssax:next-token-of (lambda (c)
+ (cond ((eof-object? c) #f)
((char-alphabetic? c) (char-downcase c))
- (else #f))) |
- (current-input-port)) |
- |
- will try to read an alphabetic token from the current input port, |
- and return it in lower case. |
- |
- -- Function: ssax:read-string len port |
- Reads LEN characters from the PORT, and returns them in a string. |
- If EOF is encountered before LEN characters are read, a shorter |
- string will be returned. |
- |
-4.11.3 Data Types |
------------------ |
- |
-`TAG-KIND' |
- A symbol `START', `END', `PI', `DECL', `COMMENT', `CDSECT', or |
- `ENTITY-REF' that identifies a markup token |
- |
-`UNRES-NAME' |
- a name (called GI in the XML Recommendation) as given in an XML |
- document for a markup token: start-tag, PI target, attribute name. |
- If a GI is an NCName, UNRES-NAME is this NCName converted into a |
- Scheme symbol. If a GI is a QName, `UNRES-NAME' is a pair of |
- symbols: `(PREFIX . LOCALPART)'. |
- |
-`RES-NAME' |
- An expanded name, a resolved version of an `UNRES-NAME'. For an |
- element or an attribute name with a non-empty namespace URI, |
- `RES-NAME' is a pair of symbols, `(URI-SYMB . LOCALPART)'. |
- Otherwise, it's a single symbol. |
- |
-`ELEM-CONTENT-MODEL' |
- A symbol: |
- `ANY' |
- anything goes, expect an END tag. |
- |
- `EMPTY-TAG' |
- no content, and no END-tag is coming |
- |
- `EMPTY' |
- no content, expect the END-tag as the next token |
- |
- `PCDATA' |
- expect character data only, and no children elements |
- |
- `MIXED' |
- |
- `ELEM-CONTENT' |
- |
-`URI-SYMB' |
- A symbol representing a namespace URI - or other symbol chosen by |
- the user to represent URI. In the former case, `URI-SYMB' is |
- created by %-quoting of bad URI characters and converting the |
- resulting string into a symbol. |
- |
-`NAMESPACES' |
- A list representing namespaces in effect. An element of the list |
- has one of the following forms: |
- |
- `(PREFIX URI-SYMB . URI-SYMB) or' |
- |
- `(PREFIX USER-PREFIX . URI-SYMB)' |
- USER-PREFIX is a symbol chosen by the user to represent the |
- URI. |
- |
- `(#f USER-PREFIX . URI-SYMB)' |
- Specification of the user-chosen prefix and a URI-SYMBOL. |
- |
- `(*DEFAULT* USER-PREFIX . URI-SYMB)' |
- Declaration of the default namespace |
- |
- `(*DEFAULT* #f . #f)' |
- Un-declaration of the default namespace. This notation |
- represents overriding of the previous declaration |
- |
- |
- A NAMESPACES list may contain several elements for the same PREFIX. |
- The one closest to the beginning of the list takes effect. |
- |
-`ATTLIST' |
- An ordered collection of (NAME . VALUE) pairs, where NAME is a |
- RES-NAME or an UNRES-NAME. The collection is an ADT. |
- |
-`STR-HANDLER' |
- A procedure of three arguments: STRING1 STRING2 SEED returning a |
- new SEED. The procedure is supposed to handle a chunk of |
- character data STRING1 followed by a chunk of character data |
- STRING2. STRING2 is a short string, often `"\n"' and even `""'. |
- |
-`ENTITIES' |
- An assoc list of pairs: |
- (NAMED-ENTITY-NAME . NAMED-ENTITY-BODY) |
- |
- where NAMED-ENTITY-NAME is a symbol under which the entity was |
- declared, NAMED-ENTITY-BODY is either a string, or (for an |
- external entity) a thunk that will return an input port (from which |
- the entity can be read). NAMED-ENTITY-BODY may also be #f. This |
- is an indication that a NAMED-ENTITY-NAME is currently being |
- expanded. A reference to this NAMED-ENTITY-NAME will be an error: |
- violation of the WFC nonrecursion. |
- |
-`XML-TOKEN' |
- This record represents a markup, which is, according to the XML |
- Recommendation, "takes the form of start-tags, end-tags, |
- empty-element tags, entity references, character references, |
- comments, CDATA section delimiters, document type declarations, and |
- processing instructions." |
- |
- kind |
- a TAG-KIND |
- |
- head |
- an UNRES-NAME. For XML-TOKENs of kinds 'COMMENT and 'CDSECT, |
- the head is #f. |
- |
- For example, |
- <P> => kind=START, head=P |
- </P> => kind=END, head=P |
- <BR/> => kind=EMPTY-EL, head=BR |
- <!DOCTYPE OMF ...> => kind=DECL, head=DOCTYPE |
- <?xml version="1.0"?> => kind=PI, head=xml |
- &my-ent; => kind=ENTITY-REF, head=my-ent |
- |
- Character references are not represented by xml-tokens as these |
- references are transparently resolved into the corresponding |
- characters. |
- |
-`XML-DECL' |
- The record represents a datatype of an XML document: the list of |
- declared elements and their attributes, declared notations, list of |
- replacement strings or loading procedures for parsed general |
- entities, etc. Normally an XML-DECL record is created from a DTD |
- or an XML Schema, although it can be created and filled in in many |
- other ways (e.g., loaded from a file). |
- |
- ELEMS |
- an (assoc) list of decl-elem or #f. The latter instructs the |
- parser to do no validation of elements and attributes. |
- |
- DECL-ELEM |
- declaration of one element: |
- |
- `(ELEM-NAME ELEM-CONTENT DECL-ATTRS)' |
- |
- ELEM-NAME is an UNRES-NAME for the element. |
- |
- ELEM-CONTENT is an ELEM-CONTENT-MODEL. |
- |
- DECL-ATTRS is an `ATTLIST', of `(ATTR-NAME . VALUE)' |
- associations. |
- |
- This element can declare a user procedure to handle parsing |
- of an element (e.g., to do a custom validation, or to build a |
- hash of IDs as they're encountered). |
- |
- DECL-ATTR |
- an element of an `ATTLIST', declaration of one attribute: |
- |
- `(ATTR-NAME CONTENT-TYPE USE-TYPE DEFAULT-VALUE)' |
- |
- ATTR-NAME is an UNRES-NAME for the declared attribute. |
- |
- CONTENT-TYPE is a symbol: `CDATA', `NMTOKEN', `NMTOKENS', ... |
- or a list of strings for the enumerated type. |
- |
- USE-TYPE is a symbol: `REQUIRED', `IMPLIED', or `FIXED'. |
- |
- DEFAULT-VALUE is a string for the default value, or #f if not |
- given. |
- |
- |
- |
-4.11.4 Low-Level Parsers and Scanners |
-------------------------------------- |
- |
-These procedures deal with primitive lexical units (Names, whitespaces, |
-tags) and with pieces of more generic productions. Most of these |
-parsers must be called in appropriate context. For example, |
-`ssax:complete-start-tag' must be called only when the start-tag has |
-been detected and its GI has been read. |
- |
- -- Function: ssax:skip-s port |
- Skip the S (whitespace) production as defined by |
- [3] S ::= (#x20 | #x09 | #x0D | #x0A) |
- |
- `ssax:skip-s' returns the first not-whitespace character it |
- encounters while scanning the PORT. This character is left on the |
- input stream. |
- |
- -- Function: ssax:read-ncname port |
- Read a NCName starting from the current position in the PORT and |
- return it as a symbol. |
- |
- [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
- | CombiningChar | Extender |
- [5] Name ::= (Letter | '_' | ':') (NameChar)* |
- |
- This code supports the XML Namespace Recommendation REC-xml-names, |
- which modifies the above productions as follows: |
- |
- [4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' |
- | CombiningChar | Extender |
- [5] NCName ::= (Letter | '_') (NCNameChar)* |
- |
- As the Rec-xml-names says, |
- |
- "An XML document conforms to this specification if all other |
- tokens [other than element types and attribute names] in the |
- document which are required, for XML conformance, to match |
- the XML production for Name, match this specification's |
- production for NCName." |
- |
- Element types and attribute names must match the production QName, |
- defined below. |
- |
- -- Function: ssax:read-qname port |
- Read a (namespace-) Qualified Name, QName, from the current |
- position in PORT; and return an UNRES-NAME. |
- |
- From REC-xml-names: |
- [6] QName ::= (Prefix ':')? LocalPart |
- [7] Prefix ::= NCName |
- [8] LocalPart ::= NCName |
- |
- -- Function: ssax:read-markup-token port |
- This procedure starts parsing of a markup token. The current |
- position in the stream must be `<'. This procedure scans enough |
- of the input stream to figure out what kind of a markup token it |
- is seeing. The procedure returns an XML-TOKEN structure |
- describing the token. Note, generally reading of the current |
- markup is not finished! In particular, no attributes of the |
- start-tag token are scanned. |
- |
- Here's a detailed break out of the return values and the position |
- in the PORT when that particular value is returned: |
- |
- PI-token |
- only PI-target is read. To finish the Processing-Instruction |
- and disregard it, call `ssax:skip-pi'. `ssax:read-attributes' |
- may be useful as well (for PIs whose content is |
- attribute-value pairs). |
- |
- END-token |
- The end tag is read completely; the current position is right |
- after the terminating `>' character. |
- |
- COMMENT |
- is read and skipped completely. The current position is |
- right after `-->' that terminates the comment. |
- |
- CDSECT |
- The current position is right after `<!CDATA['. Use |
- `ssax:read-cdata-body' to read the rest. |
- |
- DECL |
- We have read the keyword (the one that follows `<!') |
- identifying this declaration markup. The current position is |
- after the keyword (usually a whitespace character) |
- |
- START-token |
- We have read the keyword (GI) of this start tag. No |
- attributes are scanned yet. We don't know if this tag has an |
- empty content either. Use `ssax:complete-start-tag' to |
- finish parsing of the token. |
- |
- |
- -- Function: ssax:skip-pi port |
- The current position is inside a PI. Skip till the rest of the PI |
- |
- -- Function: ssax:read-pi-body-as-string port |
- The current position is right after reading the PITarget. We read |
- the body of PI and return is as a string. The port will point to |
- the character right after `?>' combination that terminates PI. |
- |
- [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>' |
- |
- -- Function: ssax:skip-internal-dtd port |
- The current pos in the port is inside an internal DTD subset (e.g., |
- after reading `#\[' that begins an internal DTD subset) Skip until |
- the `]>' combination that terminates this DTD. |
- |
- -- Function: ssax:read-cdata-body port str-handler seed |
- This procedure must be called after we have read a string |
- `<![CDATA[' that begins a CDATA section. The current position |
- must be the first position of the CDATA body. This function reads |
- _lines_ of the CDATA body and passes them to a STR-HANDLER, a |
- character data consumer. |
- |
- STR-HANDLER is a procedure taking arguments: STRING1, STRING2, and |
- SEED. The first STRING1 argument to STR-HANDLER never contains a |
- newline; the second STRING2 argument often will. On the first |
- invocation of STR-HANDLER, SEED is the one passed to |
- `ssax:read-cdata-body' as the third argument. The result of this |
- first invocation will be passed as the SEED argument to the second |
- invocation of the line consumer, and so on. The result of the |
- last invocation of the STR-HANDLER is returned by the |
- `ssax:read-cdata-body'. Note a similarity to the fundamental |
- "fold" iterator. |
- |
- Within a CDATA section all characters are taken at their face |
- value, with three exceptions: |
- * CR, LF, and CRLF are treated as line delimiters, and passed |
- as a single `#\newline' to STR-HANDLER |
- |
- * `]]>' combination is the end of the CDATA section. `&gt;' is |
- treated as an embedded `>' character. |
- |
- * `&lt;' and `&amp;' are not specially recognized (and are not |
- expanded)! |
- |
- |
- -- Function: ssax:read-char-ref port |
- [66] CharRef ::= '&#' [0-9]+ ';' |
- | '&#x' [0-9a-fA-F]+ ';' |
- |
- This procedure must be called after we we have read `&#' that |
- introduces a char reference. The procedure reads this reference |
- and returns the corresponding char. The current position in PORT |
- will be after the `;' that terminates the char reference. |
- |
- Faults detected: |
- WFC: XML-Spec.html#wf-Legalchar |
- |
- According to Section `4.1 Character and Entity References' of the |
- XML Recommendation: |
- |
- "[Definition: A character reference refers to a specific |
- character in the ISO/IEC 10646 character set, for example one |
- not directly accessible from available input devices.]" |
- |
- |
- -- Function: ssax:handle-parsed-entity port name entities |
- content-handler str-handler seed |
- Expands and handles a parsed-entity reference. |
- |
- NAME is a symbol, the name of the parsed entity to expand. |
- CONTENT-HANDLER is a procedure of arguments PORT, ENTITIES, and |
- SEED that returns a seed. STR-HANDLER is called if the entity in |
- question is a pre-declared entity. |
- |
- `ssax:handle-parsed-entity' returns the result returned by |
- CONTENT-HANDLER or STR-HANDLER. |
- |
- Faults detected: |
- WFC: XML-Spec.html#wf-entdeclared |
- WFC: XML-Spec.html#norecursion |
- |
- -- Function: attlist-add attlist name-value |
- Add a NAME-VALUE pair to the existing ATTLIST, preserving its |
- sorted ascending order; and return the new list. Return #f if a |
- pair with the same name already exists in ATTLIST |
- |
- -- Function: attlist-remove-top attlist |
- Given an non-null ATTLIST, return a pair of values: the top and |
- the rest. |
- |
- -- Function: ssax:read-attributes port entities |
- This procedure reads and parses a production "Attribute". |
- |
- [41] Attribute ::= Name Eq AttValue |
- [10] AttValue ::= '"' ([^<&"] | Reference)* '"' |
- | "'" ([^<&'] | Reference)* "'" |
- [25] Eq ::= S? '=' S? |
- |
- The procedure returns an ATTLIST, of Name (as UNRES-NAME), Value |
- (as string) pairs. The current character on the PORT is a |
- non-whitespace character that is not an NCName-starting character. |
- |
- Note the following rules to keep in mind when reading an |
- "AttValue": |
- |
- Before the value of an attribute is passed to the application |
- or checked for validity, the XML processor must normalize it |
- as follows: |
- |
- * A character reference is processed by appending the |
- referenced character to the attribute value. |
- |
- * An entity reference is processed by recursively |
- processing the replacement text of the entity. The |
- named entities `amp', `lt', `gt', `quot', and `apos' are |
- pre-declared. |
- |
- * A whitespace character (#x20, #x0D, #x0A, #x09) is |
- processed by appending #x20 to the normalized value, |
- except that only a single #x20 is appended for a |
- "#x0D#x0A" sequence that is part of an external parsed |
- entity or the literal entity value of an internal parsed |
- entity. |
- |
- * Other characters are processed by appending them to the |
- normalized value. |
- |
- |
- |
- Faults detected: |
- WFC: XML-Spec.html#CleanAttrVals |
- WFC: XML-Spec.html#uniqattspec |
- |
- -- Function: ssax:resolve-name port unres-name namespaces |
- apply-default-ns? |
- Convert an UNRES-NAME to a RES-NAME, given the appropriate |
- NAMESPACES declarations. The last parameter, APPLY-DEFAULT-NS?, |
- determines if the default namespace applies (for instance, it does |
- not for attribute names). |
- |
- Per REC-xml-names/#nsc-NSDeclared, the "xml" prefix is considered |
- pre-declared and bound to the namespace name |
- "http://www.w3.org/XML/1998/namespace". |
- |
- `ssax:resolve-name' tests for the namespace constraints: |
- `http://www.w3.org/TR/REC-xml-names/#nsc-NSDeclared' |
- |
- -- Function: ssax:complete-start-tag tag port elems entities namespaces |
- Complete parsing of a start-tag markup. `ssax:complete-start-tag' |
- must be called after the start tag token has been read. TAG is an |
- UNRES-NAME. ELEMS is an instance of the ELEMS slot of XML-DECL; |
- it can be #f to tell the function to do _no_ validation of |
- elements and their attributes. |
- |
- `ssax:complete-start-tag' returns several values: |
- * ELEM-GI: a RES-NAME. |
- |
- * ATTRIBUTES: element's attributes, an ATTLIST of (RES-NAME . |
- STRING) pairs. The list does NOT include xmlns attributes. |
- |
- * NAMESPACES: the input list of namespaces amended with |
- namespace (re-)declarations contained within the start-tag |
- under parsing |
- |
- * ELEM-CONTENT-MODEL |
- |
- On exit, the current position in PORT will be the first character |
- after `>' that terminates the start-tag markup. |
- |
- Faults detected: |
- VC: XML-Spec.html#enum |
- VC: XML-Spec.html#RequiredAttr |
- VC: XML-Spec.html#FixedAttr |
- VC: XML-Spec.html#ValueType |
- WFC: XML-Spec.html#uniqattspec (after namespaces prefixes are |
- resolved) |
- VC: XML-Spec.html#elementvalid |
- WFC: REC-xml-names/#dt-NSName |
- |
- _Note_: although XML Recommendation does not explicitly say it, |
- xmlns and xmlns: attributes don't have to be declared (although |
- they can be declared, to specify their default value). |
- |
- -- Function: ssax:read-external-id port |
- Parses an ExternalID production: |
- |
- [75] ExternalID ::= 'SYSTEM' S SystemLiteral |
- | 'PUBLIC' S PubidLiteral S SystemLiteral |
- [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'") |
- [12] PubidLiteral ::= '"' PubidChar* '"' |
- | "'" (PubidChar - "'")* "'" |
- [13] PubidChar ::= #x20 | #x0D | #x0A | [a-zA-Z0-9] |
- | [-'()+,./:=?;!*#@$_%] |
- |
- Call `ssax:read-external-id' when an ExternalID is expected; that |
- is, the current character must be either #\S or #\P that starts |
- correspondingly a SYSTEM or PUBLIC token. `ssax:read-external-id' |
- returns the SYSTEMLITERAL as a string. A PUBIDLITERAL is |
- disregarded if present. |
- |
-4.11.5 Mid-Level Parsers and Scanners |
-------------------------------------- |
- |
-These procedures parse productions corresponding to the whole |
-(document) entity or its higher-level pieces (prolog, root element, |
-etc). |
- |
- -- Function: ssax:scan-misc port |
- Scan the Misc production in the context: |
- |
- [1] document ::= prolog element Misc* |
- [22] prolog ::= XMLDecl? Misc* (doctypedec l Misc*)? |
- [27] Misc ::= Comment | PI | S |
- |
- Call `ssax:scan-misc' in the prolog or epilog contexts. In these |
- contexts, whitespaces are completely ignored. The return value |
- from `ssax:scan-misc' is either a PI-token, a DECL-token, a START |
- token, or *EOF*. Comments are ignored and not reported. |
- |
- -- Function: ssax:read-char-data port expect-eof? str-handler iseed |
- Read the character content of an XML document or an XML element. |
- |
- [43] content ::= |
- (element | CharData | Reference | CDSect | PI | Comment)* |
- |
- To be more precise, `ssax:read-char-data' reads CharData, expands |
- CDSect and character entities, and skips comments. |
- `ssax:read-char-data' stops at a named reference, EOF, at the |
- beginning of a PI, or a start/end tag. |
- |
- EXPECT-EOF? is a boolean indicating if EOF is normal; i.e., the |
- character data may be terminated by the EOF. EOF is normal while |
- processing a parsed entity. |
- |
- ISEED is an argument passed to the first invocation of STR-HANDLER. |
- |
- `ssax:read-char-data' returns two results: SEED and TOKEN. The |
- SEED is the result of the last invocation of STR-HANDLER, or the |
- original ISEED if STR-HANDLER was never called. |
- |
- TOKEN can be either an eof-object (this can happen only if |
- EXPECT-EOF? was #t), or: |
- * an xml-token describing a START tag or an END-tag; For a |
- start token, the caller has to finish reading it. |
- |
- * an xml-token describing the beginning of a PI. It's up to an |
- application to read or skip through the rest of this PI; |
- |
- * an xml-token describing a named entity reference. |
- |
- |
- CDATA sections and character references are expanded inline and |
- never returned. Comments are silently disregarded. |
- |
- As the XML Recommendation requires, all whitespace in character |
- data must be preserved. However, a CR character (#x0D) must be |
- disregarded if it appears before a LF character (#x0A), or replaced |
- by a #x0A character otherwise. See Secs. 2.10 and 2.11 of the XML |
- Recommendation. See also the canonical XML Recommendation. |
- |
- -- Function: ssax:assert-token token kind gi error-cont |
- Make sure that TOKEN is of anticipated KIND and has anticipated |
- GI. Note that the GI argument may actually be a pair of two |
- symbols, Namespace-URI or the prefix, and of the localname. If |
- the assertion fails, ERROR-CONT is evaluated by passing it three |
- arguments: TOKEN KIND GI. The result of ERROR-CONT is returned. |
- |
-4.11.6 High-level Parsers |
-------------------------- |
- |
-These procedures are to instantiate a SSAX parser. A user can |
-instantiate the parser to do the full validation, or no validation, or |
-any particular validation. The user specifies which PI he wants to be |
-notified about. The user tells what to do with the parsed character |
-and element data. The latter handlers determine if the parsing follows |
-a SAX or a DOM model. |
- |
- -- Function: ssax:make-pi-parser my-pi-handlers |
- Create a parser to parse and process one Processing Element (PI). |
- |
- MY-PI-HANDLERS is an association list of pairs `(PI-TAG . |
- PI-HANDLER)' where PI-TAG is an NCName symbol, the PI target; and |
- PI-HANDLER is a procedure taking arguments PORT, PI-TAG, and SEED. |
- |
- PI-HANDLER should read the rest of the PI up to and including the |
- combination `?>' that terminates the PI. The handler should |
- return a new seed. One of the PI-TAGs may be the symbol |
- `*DEFAULT*'. The corresponding handler will handle PIs that no |
- other handler will. If the *DEFAULT* PI-TAG is not specified, |
- `ssax:make-pi-parser' will assume the default handler that skips |
- the body of the PI. |
- |
- `ssax:make-pi-parser' returns a procedure of arguments PORT, |
- PI-TAG, and SEED; that will parse the current PI according to |
- MY-PI-HANDLERS. |
- |
- -- Function: ssax:make-elem-parser my-new-level-seed my-finish-element |
- my-char-data-handler my-pi-handlers |
- Create a parser to parse and process one element, including its |
- character content or children elements. The parser is typically |
- applied to the root element of a document. |
- |
- MY-NEW-LEVEL-SEED |
- is a procedure taking arguments: |
- |
- ELEM-GI ATTRIBUTES NAMESPACES EXPECTED-CONTENT SEED |
- |
- where ELEM-GI is a RES-NAME of the element about to be |
- processed. |
- |
- MY-NEW-LEVEL-SEED is to generate the seed to be passed to |
- handlers that process the content of the element. |
- |
- MY-FINISH-ELEMENT |
- is a procedure taking arguments: |
- |
- ELEM-GI ATTRIBUTES NAMESPACES PARENT-SEED SEED |
- |
- MY-FINISH-ELEMENT is called when parsing of ELEM-GI is |
- finished. The SEED is the result from the last content |
- parser (or from MY-NEW-LEVEL-SEED if the element has the |
- empty content). PARENT-SEED is the same seed as was passed |
- to MY-NEW-LEVEL-SEED. MY-FINISH-ELEMENT is to generate a |
- seed that will be the result of the element parser. |
- |
- MY-CHAR-DATA-HANDLER |
- is a STR-HANDLER as described in Data Types above. |
- |
- MY-PI-HANDLERS |
- is as described for `ssax:make-pi-handler' above. |
- |
- |
- The generated parser is a procedure taking arguments: |
- |
- START-TAG-HEAD PORT ELEMS ENTITIES NAMESPACES PRESERVE-WS? SEED |
- |
- The procedure must be called after the start tag token has been |
- read. START-TAG-HEAD is an UNRES-NAME from the start-element tag. |
- ELEMS is an instance of ELEMS slot of XML-DECL. |
- |
- Faults detected: |
- VC: XML-Spec.html#elementvalid |
- WFC: XML-Spec.html#GIMatch |
- |
- -- Function: ssax:make-parser user-handler-tag user-handler ... |
- Create an XML parser, an instance of the XML parsing framework. |
- This will be a SAX, a DOM, or a specialized parser depending on the |
- supplied user-handlers. |
- |
- `ssax:make-parser' takes an even number of arguments; |
- USER-HANDLER-TAG is a symbol that identifies a procedure (or |
- association list for `PROCESSING-INSTRUCTIONS') (USER-HANDLER) |
- that follows the tag. Given below are tags and signatures of the |
- corresponding procedures. Not all tags have to be specified. If |
- some are omitted, reasonable defaults will apply. |
- |
- `DOCTYPE' |
- handler-procedure: PORT DOCNAME SYSTEMID INTERNAL-SUBSET? SEED |
- |
- If INTERNAL-SUBSET? is #t, the current position in the port is |
- right after we have read `[' that begins the internal DTD |
- subset. We must finish reading of this subset before we |
- return (or must call `skip-internal-dtd' if we aren't |
- interested in reading it). PORT at exit must be at the first |
- symbol after the whole DOCTYPE declaration. |
- |
- The handler-procedure must generate four values: |
- |
- ELEMS ENTITIES NAMESPACES SEED |
- |
- ELEMS is as defined for the ELEMS slot of XML-DECL. It may be |
- #f to switch off validation. NAMESPACES will typically |
- contain USER-PREFIXes for selected URI-SYMBs. The default |
- handler-procedure skips the internal subset, if any, and |
- returns `(values #f '() '() seed)'. |
- |
- `UNDECL-ROOT' |
- procedure: ELEM-GI SEED |
- |
- where ELEM-GI is an UNRES-NAME of the root element. This |
- procedure is called when an XML document under parsing |
- contains _no_ DOCTYPE declaration. |
- |
- The handler-procedure, as a DOCTYPE handler procedure above, |
- must generate four values: |
- |
- ELEMS ENTITIES NAMESPACES SEED |
- |
- The default handler-procedure returns (values #f '() '() seed) |
- |
- `DECL-ROOT' |
- procedure: ELEM-GI SEED |
- |
- where ELEM-GI is an UNRES-NAME of the root element. This |
- procedure is called when an XML document under parsing does |
- contains the DOCTYPE declaration. The handler-procedure must |
- generate a new SEED (and verify that the name of the root |
- element matches the doctype, if the handler so wishes). The |
- default handler-procedure is the identity function. |
- |
- `NEW-LEVEL-SEED' |
- procedure: see ssax:make-elem-parser, my-new-level-seed |
- |
- `FINISH-ELEMENT' |
- procedure: see ssax:make-elem-parser, my-finish-element |
- |
- `CHAR-DATA-HANDLER' |
- procedure: see ssax:make-elem-parser, my-char-data-handler |
- |
- `PROCESSING-INSTRUCTIONS' |
- association list as is passed to `ssax:make-pi-parser'. The |
- default value is '() |
- |
- |
- The generated parser is a procedure of arguments PORT and SEED. |
- |
- This procedure parses the document prolog and then exits to an |
- element parser (created by `ssax:make-elem-parser') to handle the |
- rest. |
- |
- [1] document ::= prolog element Misc* |
- [22] prolog ::= XMLDecl? Misc* (doctypedec | Misc*)? |
- [27] Misc ::= Comment | PI | S |
- [28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? |
- ('[' (markupdecl | PEReference | S)* ']' S?)? '>' |
- [29] markupdecl ::= elementdecl | AttlistDecl |
- | EntityDecl |
- | NotationDecl | PI |
- | Comment |
- |
-4.11.7 Parsing XML to SXML |
--------------------------- |
- |
- -- Function: ssax:xml->sxml port namespace-prefix-assig |
- This is an instance of the SSAX parser that returns an SXML |
- representation of the XML document to be read from PORT. |
- NAMESPACE-PREFIX-ASSIG is a list of `(USER-PREFIX . URI-STRING)' |
- that assigns USER-PREFIXes to certain namespaces identified by |
- particular URI-STRINGs. It may be an empty list. |
- `ssax:xml->sxml' returns an SXML tree. The port points out to the |
- first character after the root element. |
- |
+ (else #f)))
+ (current-input-port))
+
+ will try to read an alphabetic token from the current input port,
+ and return it in lower case.
+
+ -- Function: ssax:read-string len port
+ Reads LEN characters from the PORT, and returns them in a string.
+ If EOF is encountered before LEN characters are read, a shorter
+ string will be returned.
+
+4.11.3 Data Types
+-----------------
+
+`TAG-KIND'
+ A symbol `START', `END', `PI', `DECL', `COMMENT', `CDSECT', or
+ `ENTITY-REF' that identifies a markup token
+
+`UNRES-NAME'
+ a name (called GI in the XML Recommendation) as given in an XML
+ document for a markup token: start-tag, PI target, attribute name.
+ If a GI is an NCName, UNRES-NAME is this NCName converted into a
+ Scheme symbol. If a GI is a QName, `UNRES-NAME' is a pair of
+ symbols: `(PREFIX . LOCALPART)'.
+
+`RES-NAME'
+ An expanded name, a resolved version of an `UNRES-NAME'. For an
+ element or an attribute name with a non-empty namespace URI,
+ `RES-NAME' is a pair of symbols, `(URI-SYMB . LOCALPART)'.
+ Otherwise, it's a single symbol.
+
+`ELEM-CONTENT-MODEL'
+ A symbol:
+ `ANY'
+ anything goes, expect an END tag.
+
+ `EMPTY-TAG'
+ no content, and no END-tag is coming
+
+ `EMPTY'
+ no content, expect the END-tag as the next token
+
+ `PCDATA'
+ expect character data only, and no children elements
+
+ `MIXED'
+
+ `ELEM-CONTENT'
+
+`URI-SYMB'
+ A symbol representing a namespace URI - or other symbol chosen by
+ the user to represent URI. In the former case, `URI-SYMB' is
+ created by %-quoting of bad URI characters and converting the
+ resulting string into a symbol.
+
+`NAMESPACES'
+ A list representing namespaces in effect. An element of the list
+ has one of the following forms:
+
+ `(PREFIX URI-SYMB . URI-SYMB) or'
+
+ `(PREFIX USER-PREFIX . URI-SYMB)'
+ USER-PREFIX is a symbol chosen by the user to represent the
+ URI.
+
+ `(#f USER-PREFIX . URI-SYMB)'
+ Specification of the user-chosen prefix and a URI-SYMBOL.
+
+ `(*DEFAULT* USER-PREFIX . URI-SYMB)'
+ Declaration of the default namespace
+
+ `(*DEFAULT* #f . #f)'
+ Un-declaration of the default namespace. This notation
+ represents overriding of the previous declaration
+
+
+ A NAMESPACES list may contain several elements for the same PREFIX.
+ The one closest to the beginning of the list takes effect.
+
+`ATTLIST'
+ An ordered collection of (NAME . VALUE) pairs, where NAME is a
+ RES-NAME or an UNRES-NAME. The collection is an ADT.
+
+`STR-HANDLER'
+ A procedure of three arguments: STRING1 STRING2 SEED returning a
+ new SEED. The procedure is supposed to handle a chunk of
+ character data STRING1 followed by a chunk of character data
+ STRING2. STRING2 is a short string, often `"\n"' and even `""'.
+
+`ENTITIES'
+ An assoc list of pairs:
+ (NAMED-ENTITY-NAME . NAMED-ENTITY-BODY)
+
+ where NAMED-ENTITY-NAME is a symbol under which the entity was
+ declared, NAMED-ENTITY-BODY is either a string, or (for an
+ external entity) a thunk that will return an input port (from which
+ the entity can be read). NAMED-ENTITY-BODY may also be #f. This
+ is an indication that a NAMED-ENTITY-NAME is currently being
+ expanded. A reference to this NAMED-ENTITY-NAME will be an error:
+ violation of the WFC nonrecursion.
+
+`XML-TOKEN'
+ This record represents a markup, which is, according to the XML
+ Recommendation, "takes the form of start-tags, end-tags,
+ empty-element tags, entity references, character references,
+ comments, CDATA section delimiters, document type declarations, and
+ processing instructions."
+
+ kind
+ a TAG-KIND
+
+ head
+ an UNRES-NAME. For XML-TOKENs of kinds 'COMMENT and 'CDSECT,
+ the head is #f.
+
+ For example,
+ <P> => kind=START, head=P
+ </P> => kind=END, head=P
+ <BR/> => kind=EMPTY-EL, head=BR
+ <!DOCTYPE OMF ...> => kind=DECL, head=DOCTYPE
+ <?xml version="1.0"?> => kind=PI, head=xml
+ &my-ent; => kind=ENTITY-REF, head=my-ent
+
+ Character references are not represented by xml-tokens as these
+ references are transparently resolved into the corresponding
+ characters.
+
+`XML-DECL'
+ The record represents a datatype of an XML document: the list of
+ declared elements and their attributes, declared notations, list of
+ replacement strings or loading procedures for parsed general
+ entities, etc. Normally an XML-DECL record is created from a DTD
+ or an XML Schema, although it can be created and filled in in many
+ other ways (e.g., loaded from a file).
+
+ ELEMS
+ an (assoc) list of decl-elem or #f. The latter instructs the
+ parser to do no validation of elements and attributes.
+
+ DECL-ELEM
+ declaration of one element:
+
+ `(ELEM-NAME ELEM-CONTENT DECL-ATTRS)'
+
+ ELEM-NAME is an UNRES-NAME for the element.
+
+ ELEM-CONTENT is an ELEM-CONTENT-MODEL.
+
+ DECL-ATTRS is an `ATTLIST', of `(ATTR-NAME . VALUE)'
+ associations.
+
+ This element can declare a user procedure to handle parsing
+ of an element (e.g., to do a custom validation, or to build a
+ hash of IDs as they're encountered).
+
+ DECL-ATTR
+ an element of an `ATTLIST', declaration of one attribute:
+
+ `(ATTR-NAME CONTENT-TYPE USE-TYPE DEFAULT-VALUE)'
+
+ ATTR-NAME is an UNRES-NAME for the declared attribute.
+
+ CONTENT-TYPE is a symbol: `CDATA', `NMTOKEN', `NMTOKENS', ...
+ or a list of strings for the enumerated type.
+
+ USE-TYPE is a symbol: `REQUIRED', `IMPLIED', or `FIXED'.
+
+ DEFAULT-VALUE is a string for the default value, or #f if not
+ given.
+
+
+
+4.11.4 Low-Level Parsers and Scanners
+-------------------------------------
+
+These procedures deal with primitive lexical units (Names, whitespaces,
+tags) and with pieces of more generic productions. Most of these
+parsers must be called in appropriate context. For example,
+`ssax:complete-start-tag' must be called only when the start-tag has
+been detected and its GI has been read.
+
+ -- Function: ssax:skip-s port
+ Skip the S (whitespace) production as defined by
+ [3] S ::= (#x20 | #x09 | #x0D | #x0A)
+
+ `ssax:skip-s' returns the first not-whitespace character it
+ encounters while scanning the PORT. This character is left on the
+ input stream.
+
+ -- Function: ssax:read-ncname port
+ Read a NCName starting from the current position in the PORT and
+ return it as a symbol.
+
+ [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':'
+ | CombiningChar | Extender
+ [5] Name ::= (Letter | '_' | ':') (NameChar)*
+
+ This code supports the XML Namespace Recommendation REC-xml-names,
+ which modifies the above productions as follows:
+
+ [4] NCNameChar ::= Letter | Digit | '.' | '-' | '_'
+ | CombiningChar | Extender
+ [5] NCName ::= (Letter | '_') (NCNameChar)*
+
+ As the Rec-xml-names says,
+
+ "An XML document conforms to this specification if all other
+ tokens [other than element types and attribute names] in the
+ document which are required, for XML conformance, to match
+ the XML production for Name, match this specification's
+ production for NCName."
+
+ Element types and attribute names must match the production QName,
+ defined below.
+
+ -- Function: ssax:read-qname port
+ Read a (namespace-) Qualified Name, QName, from the current
+ position in PORT; and return an UNRES-NAME.
+
+ From REC-xml-names:
+ [6] QName ::= (Prefix ':')? LocalPart
+ [7] Prefix ::= NCName
+ [8] LocalPart ::= NCName
+
+ -- Function: ssax:read-markup-token port
+ This procedure starts parsing of a markup token. The current
+ position in the stream must be `<'. This procedure scans enough
+ of the input stream to figure out what kind of a markup token it
+ is seeing. The procedure returns an XML-TOKEN structure
+ describing the token. Note, generally reading of the current
+ markup is not finished! In particular, no attributes of the
+ start-tag token are scanned.
+
+ Here's a detailed break out of the return values and the position
+ in the PORT when that particular value is returned:
+
+ PI-token
+ only PI-target is read. To finish the Processing-Instruction
+ and disregard it, call `ssax:skip-pi'. `ssax:read-attributes'
+ may be useful as well (for PIs whose content is
+ attribute-value pairs).
+
+ END-token
+ The end tag is read completely; the current position is right
+ after the terminating `>' character.
+
+ COMMENT
+ is read and skipped completely. The current position is
+ right after `-->' that terminates the comment.
+
+ CDSECT
+ The current position is right after `<!CDATA['. Use
+ `ssax:read-cdata-body' to read the rest.
+
+ DECL
+ We have read the keyword (the one that follows `<!')
+ identifying this declaration markup. The current position is
+ after the keyword (usually a whitespace character)
+
+ START-token
+ We have read the keyword (GI) of this start tag. No
+ attributes are scanned yet. We don't know if this tag has an
+ empty content either. Use `ssax:complete-start-tag' to
+ finish parsing of the token.
+
+
+ -- Function: ssax:skip-pi port
+ The current position is inside a PI. Skip till the rest of the PI
+
+ -- Function: ssax:read-pi-body-as-string port
+ The current position is right after reading the PITarget. We read
+ the body of PI and return is as a string. The port will point to
+ the character right after `?>' combination that terminates PI.
+
+ [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
+
+ -- Function: ssax:skip-internal-dtd port
+ The current pos in the port is inside an internal DTD subset (e.g.,
+ after reading `#\[' that begins an internal DTD subset) Skip until
+ the `]>' combination that terminates this DTD.
+
+ -- Function: ssax:read-cdata-body port str-handler seed
+ This procedure must be called after we have read a string
+ `<![CDATA[' that begins a CDATA section. The current position
+ must be the first position of the CDATA body. This function reads
+ _lines_ of the CDATA body and passes them to a STR-HANDLER, a
+ character data consumer.
+
+ STR-HANDLER is a procedure taking arguments: STRING1, STRING2, and
+ SEED. The first STRING1 argument to STR-HANDLER never contains a
+ newline; the second STRING2 argument often will. On the first
+ invocation of STR-HANDLER, SEED is the one passed to
+ `ssax:read-cdata-body' as the third argument. The result of this
+ first invocation will be passed as the SEED argument to the second
+ invocation of the line consumer, and so on. The result of the
+ last invocation of the STR-HANDLER is returned by the
+ `ssax:read-cdata-body'. Note a similarity to the fundamental
+ "fold" iterator.
+
+ Within a CDATA section all characters are taken at their face
+ value, with three exceptions:
+ * CR, LF, and CRLF are treated as line delimiters, and passed
+ as a single `#\newline' to STR-HANDLER
+
+ * `]]>' combination is the end of the CDATA section. `&gt;' is
+ treated as an embedded `>' character.
+
+ * `&lt;' and `&amp;' are not specially recognized (and are not
+ expanded)!
+
+
+ -- Function: ssax:read-char-ref port
+ [66] CharRef ::= '&#' [0-9]+ ';'
+ | '&#x' [0-9a-fA-F]+ ';'
+
+ This procedure must be called after we we have read `&#' that
+ introduces a char reference. The procedure reads this reference
+ and returns the corresponding char. The current position in PORT
+ will be after the `;' that terminates the char reference.
+
+ Faults detected:
+ WFC: XML-Spec.html#wf-Legalchar
+
+ According to Section `4.1 Character and Entity References' of the
+ XML Recommendation:
+
+ "[Definition: A character reference refers to a specific
+ character in the ISO/IEC 10646 character set, for example one
+ not directly accessible from available input devices.]"
+
+
+ -- Function: ssax:handle-parsed-entity port name entities
+ content-handler str-handler seed
+ Expands and handles a parsed-entity reference.
+
+ NAME is a symbol, the name of the parsed entity to expand.
+ CONTENT-HANDLER is a procedure of arguments PORT, ENTITIES, and
+ SEED that returns a seed. STR-HANDLER is called if the entity in
+ question is a pre-declared entity.
+
+ `ssax:handle-parsed-entity' returns the result returned by
+ CONTENT-HANDLER or STR-HANDLER.
+
+ Faults detected:
+ WFC: XML-Spec.html#wf-entdeclared
+ WFC: XML-Spec.html#norecursion
+
+ -- Function: attlist-add attlist name-value
+ Add a NAME-VALUE pair to the existing ATTLIST, preserving its
+ sorted ascending order; and return the new list. Return #f if a
+ pair with the same name already exists in ATTLIST
+
+ -- Function: attlist-remove-top attlist
+ Given an non-null ATTLIST, return a pair of values: the top and
+ the rest.
+
+ -- Function: ssax:read-attributes port entities
+ This procedure reads and parses a production "Attribute".
+
+ [41] Attribute ::= Name Eq AttValue
+ [10] AttValue ::= '"' ([^<&"] | Reference)* '"'
+ | "'" ([^<&'] | Reference)* "'"
+ [25] Eq ::= S? '=' S?
+
+ The procedure returns an ATTLIST, of Name (as UNRES-NAME), Value
+ (as string) pairs. The current character on the PORT is a
+ non-whitespace character that is not an NCName-starting character.
+
+ Note the following rules to keep in mind when reading an
+ "AttValue":
+
+ Before the value of an attribute is passed to the application
+ or checked for validity, the XML processor must normalize it
+ as follows:
+
+ * A character reference is processed by appending the
+ referenced character to the attribute value.
+
+ * An entity reference is processed by recursively
+ processing the replacement text of the entity. The
+ named entities `amp', `lt', `gt', `quot', and `apos' are
+ pre-declared.
+
+ * A whitespace character (#x20, #x0D, #x0A, #x09) is
+ processed by appending #x20 to the normalized value,
+ except that only a single #x20 is appended for a
+ "#x0D#x0A" sequence that is part of an external parsed
+ entity or the literal entity value of an internal parsed
+ entity.
+
+ * Other characters are processed by appending them to the
+ normalized value.
+
+
+
+ Faults detected:
+ WFC: XML-Spec.html#CleanAttrVals
+ WFC: XML-Spec.html#uniqattspec
+
+ -- Function: ssax:resolve-name port unres-name namespaces
+ apply-default-ns?
+ Convert an UNRES-NAME to a RES-NAME, given the appropriate
+ NAMESPACES declarations. The last parameter, APPLY-DEFAULT-NS?,
+ determines if the default namespace applies (for instance, it does
+ not for attribute names).
+
+ Per REC-xml-names/#nsc-NSDeclared, the "xml" prefix is considered
+ pre-declared and bound to the namespace name
+ "http://www.w3.org/XML/1998/namespace".
+
+ `ssax:resolve-name' tests for the namespace constraints:
+ `http://www.w3.org/TR/REC-xml-names/#nsc-NSDeclared'
+
+ -- Function: ssax:complete-start-tag tag port elems entities namespaces
+ Complete parsing of a start-tag markup. `ssax:complete-start-tag'
+ must be called after the start tag token has been read. TAG is an
+ UNRES-NAME. ELEMS is an instance of the ELEMS slot of XML-DECL;
+ it can be #f to tell the function to do _no_ validation of
+ elements and their attributes.
+
+ `ssax:complete-start-tag' returns several values:
+ * ELEM-GI: a RES-NAME.
+
+ * ATTRIBUTES: element's attributes, an ATTLIST of (RES-NAME .
+ STRING) pairs. The list does NOT include xmlns attributes.
+
+ * NAMESPACES: the input list of namespaces amended with
+ namespace (re-)declarations contained within the start-tag
+ under parsing
+
+ * ELEM-CONTENT-MODEL
+
+ On exit, the current position in PORT will be the first character
+ after `>' that terminates the start-tag markup.
+
+ Faults detected:
+ VC: XML-Spec.html#enum
+ VC: XML-Spec.html#RequiredAttr
+ VC: XML-Spec.html#FixedAttr
+ VC: XML-Spec.html#ValueType
+ WFC: XML-Spec.html#uniqattspec (after namespaces prefixes are
+ resolved)
+ VC: XML-Spec.html#elementvalid
+ WFC: REC-xml-names/#dt-NSName
+
+ _Note_: although XML Recommendation does not explicitly say it,
+ xmlns and xmlns: attributes don't have to be declared (although
+ they can be declared, to specify their default value).
+
+ -- Function: ssax:read-external-id port
+ Parses an ExternalID production:
+
+ [75] ExternalID ::= 'SYSTEM' S SystemLiteral
+ | 'PUBLIC' S PubidLiteral S SystemLiteral
+ [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")
+ [12] PubidLiteral ::= '"' PubidChar* '"'
+ | "'" (PubidChar - "'")* "'"
+ [13] PubidChar ::= #x20 | #x0D | #x0A | [a-zA-Z0-9]
+ | [-'()+,./:=?;!*#@$_%]
+
+ Call `ssax:read-external-id' when an ExternalID is expected; that
+ is, the current character must be either #\S or #\P that starts
+ correspondingly a SYSTEM or PUBLIC token. `ssax:read-external-id'
+ returns the SYSTEMLITERAL as a string. A PUBIDLITERAL is
+ disregarded if present.
+
+4.11.5 Mid-Level Parsers and Scanners
+-------------------------------------
+
+These procedures parse productions corresponding to the whole
+(document) entity or its higher-level pieces (prolog, root element,
+etc).
+
+ -- Function: ssax:scan-misc port
+ Scan the Misc production in the context:
+
+ [1] document ::= prolog element Misc*
+ [22] prolog ::= XMLDecl? Misc* (doctypedec l Misc*)?
+ [27] Misc ::= Comment | PI | S
+
+ Call `ssax:scan-misc' in the prolog or epilog contexts. In these
+ contexts, whitespaces are completely ignored. The return value
+ from `ssax:scan-misc' is either a PI-token, a DECL-token, a START
+ token, or *EOF*. Comments are ignored and not reported.
+
+ -- Function: ssax:read-char-data port expect-eof? str-handler iseed
+ Read the character content of an XML document or an XML element.
+
+ [43] content ::=
+ (element | CharData | Reference | CDSect | PI | Comment)*
+
+ To be more precise, `ssax:read-char-data' reads CharData, expands
+ CDSect and character entities, and skips comments.
+ `ssax:read-char-data' stops at a named reference, EOF, at the
+ beginning of a PI, or a start/end tag.
+
+ EXPECT-EOF? is a boolean indicating if EOF is normal; i.e., the
+ character data may be terminated by the EOF. EOF is normal while
+ processing a parsed entity.
+
+ ISEED is an argument passed to the first invocation of STR-HANDLER.
+
+ `ssax:read-char-data' returns two results: SEED and TOKEN. The
+ SEED is the result of the last invocation of STR-HANDLER, or the
+ original ISEED if STR-HANDLER was never called.
+
+ TOKEN can be either an eof-object (this can happen only if
+ EXPECT-EOF? was #t), or:
+ * an xml-token describing a START tag or an END-tag; For a
+ start token, the caller has to finish reading it.
+
+ * an xml-token describing the beginning of a PI. It's up to an
+ application to read or skip through the rest of this PI;
+
+ * an xml-token describing a named entity reference.
+
+
+ CDATA sections and character references are expanded inline and
+ never returned. Comments are silently disregarded.
+
+ As the XML Recommendation requires, all whitespace in character
+ data must be preserved. However, a CR character (#x0D) must be
+ disregarded if it appears before a LF character (#x0A), or replaced
+ by a #x0A character otherwise. See Secs. 2.10 and 2.11 of the XML
+ Recommendation. See also the canonical XML Recommendation.
+
+ -- Function: ssax:assert-token token kind gi error-cont
+ Make sure that TOKEN is of anticipated KIND and has anticipated
+ GI. Note that the GI argument may actually be a pair of two
+ symbols, Namespace-URI or the prefix, and of the localname. If
+ the assertion fails, ERROR-CONT is evaluated by passing it three
+ arguments: TOKEN KIND GI. The result of ERROR-CONT is returned.
+
+4.11.6 High-level Parsers
+-------------------------
+
+These procedures are to instantiate a SSAX parser. A user can
+instantiate the parser to do the full validation, or no validation, or
+any particular validation. The user specifies which PI he wants to be
+notified about. The user tells what to do with the parsed character
+and element data. The latter handlers determine if the parsing follows
+a SAX or a DOM model.
+
+ -- Function: ssax:make-pi-parser my-pi-handlers
+ Create a parser to parse and process one Processing Element (PI).
+
+ MY-PI-HANDLERS is an association list of pairs `(PI-TAG .
+ PI-HANDLER)' where PI-TAG is an NCName symbol, the PI target; and
+ PI-HANDLER is a procedure taking arguments PORT, PI-TAG, and SEED.
+
+ PI-HANDLER should read the rest of the PI up to and including the
+ combination `?>' that terminates the PI. The handler should
+ return a new seed. One of the PI-TAGs may be the symbol
+ `*DEFAULT*'. The corresponding handler will handle PIs that no
+ other handler will. If the *DEFAULT* PI-TAG is not specified,
+ `ssax:make-pi-parser' will assume the default handler that skips
+ the body of the PI.
+
+ `ssax:make-pi-parser' returns a procedure of arguments PORT,
+ PI-TAG, and SEED; that will parse the current PI according to
+ MY-PI-HANDLERS.
+
+ -- Function: ssax:make-elem-parser my-new-level-seed my-finish-element
+ my-char-data-handler my-pi-handlers
+ Create a parser to parse and process one element, including its
+ character content or children elements. The parser is typically
+ applied to the root element of a document.
+
+ MY-NEW-LEVEL-SEED
+ is a procedure taking arguments:
+
+ ELEM-GI ATTRIBUTES NAMESPACES EXPECTED-CONTENT SEED
+
+ where ELEM-GI is a RES-NAME of the element about to be
+ processed.
+
+ MY-NEW-LEVEL-SEED is to generate the seed to be passed to
+ handlers that process the content of the element.
+
+ MY-FINISH-ELEMENT
+ is a procedure taking arguments:
+
+ ELEM-GI ATTRIBUTES NAMESPACES PARENT-SEED SEED
+
+ MY-FINISH-ELEMENT is called when parsing of ELEM-GI is
+ finished. The SEED is the result from the last content
+ parser (or from MY-NEW-LEVEL-SEED if the element has the
+ empty content). PARENT-SEED is the same seed as was passed
+ to MY-NEW-LEVEL-SEED. MY-FINISH-ELEMENT is to generate a
+ seed that will be the result of the element parser.
+
+ MY-CHAR-DATA-HANDLER
+ is a STR-HANDLER as described in Data Types above.
+
+ MY-PI-HANDLERS
+ is as described for `ssax:make-pi-handler' above.
+
+
+ The generated parser is a procedure taking arguments:
+
+ START-TAG-HEAD PORT ELEMS ENTITIES NAMESPACES PRESERVE-WS? SEED
+
+ The procedure must be called after the start tag token has been
+ read. START-TAG-HEAD is an UNRES-NAME from the start-element tag.
+ ELEMS is an instance of ELEMS slot of XML-DECL.
+
+ Faults detected:
+ VC: XML-Spec.html#elementvalid
+ WFC: XML-Spec.html#GIMatch
+
+ -- Function: ssax:make-parser user-handler-tag user-handler ...
+ Create an XML parser, an instance of the XML parsing framework.
+ This will be a SAX, a DOM, or a specialized parser depending on the
+ supplied user-handlers.
+
+ `ssax:make-parser' takes an even number of arguments;
+ USER-HANDLER-TAG is a symbol that identifies a procedure (or
+ association list for `PROCESSING-INSTRUCTIONS') (USER-HANDLER)
+ that follows the tag. Given below are tags and signatures of the
+ corresponding procedures. Not all tags have to be specified. If
+ some are omitted, reasonable defaults will apply.
+
+ `DOCTYPE'
+ handler-procedure: PORT DOCNAME SYSTEMID INTERNAL-SUBSET? SEED
+
+ If INTERNAL-SUBSET? is #t, the current position in the port is
+ right after we have read `[' that begins the internal DTD
+ subset. We must finish reading of this subset before we
+ return (or must call `skip-internal-dtd' if we aren't
+ interested in reading it). PORT at exit must be at the first
+ symbol after the whole DOCTYPE declaration.
+
+ The handler-procedure must generate four values:
+
+ ELEMS ENTITIES NAMESPACES SEED
+
+ ELEMS is as defined for the ELEMS slot of XML-DECL. It may be
+ #f to switch off validation. NAMESPACES will typically
+ contain USER-PREFIXes for selected URI-SYMBs. The default
+ handler-procedure skips the internal subset, if any, and
+ returns `(values #f '() '() seed)'.
+
+ `UNDECL-ROOT'
+ procedure: ELEM-GI SEED
+
+ where ELEM-GI is an UNRES-NAME of the root element. This
+ procedure is called when an XML document under parsing
+ contains _no_ DOCTYPE declaration.
+
+ The handler-procedure, as a DOCTYPE handler procedure above,
+ must generate four values:
+
+ ELEMS ENTITIES NAMESPACES SEED
+
+ The default handler-procedure returns (values #f '() '() seed)
+
+ `DECL-ROOT'
+ procedure: ELEM-GI SEED
+
+ where ELEM-GI is an UNRES-NAME of the root element. This
+ procedure is called when an XML document under parsing does
+ contains the DOCTYPE declaration. The handler-procedure must
+ generate a new SEED (and verify that the name of the root
+ element matches the doctype, if the handler so wishes). The
+ default handler-procedure is the identity function.
+
+ `NEW-LEVEL-SEED'
+ procedure: see ssax:make-elem-parser, my-new-level-seed
+
+ `FINISH-ELEMENT'
+ procedure: see ssax:make-elem-parser, my-finish-element
+
+ `CHAR-DATA-HANDLER'
+ procedure: see ssax:make-elem-parser, my-char-data-handler
+
+ `PROCESSING-INSTRUCTIONS'
+ association list as is passed to `ssax:make-pi-parser'. The
+ default value is '()
+
+
+ The generated parser is a procedure of arguments PORT and SEED.
+
+ This procedure parses the document prolog and then exits to an
+ element parser (created by `ssax:make-elem-parser') to handle the
+ rest.
+
+ [1] document ::= prolog element Misc*
+ [22] prolog ::= XMLDecl? Misc* (doctypedec | Misc*)?
+ [27] Misc ::= Comment | PI | S
+ [28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S?
+ ('[' (markupdecl | PEReference | S)* ']' S?)? '>'
+ [29] markupdecl ::= elementdecl | AttlistDecl
+ | EntityDecl
+ | NotationDecl | PI
+ | Comment
+
+4.11.7 Parsing XML to SXML
+--------------------------
+
+ -- Function: ssax:xml->sxml port namespace-prefix-assig
+ This is an instance of the SSAX parser that returns an SXML
+ representation of the XML document to be read from PORT.
+ NAMESPACE-PREFIX-ASSIG is a list of `(USER-PREFIX . URI-STRING)'
+ that assigns USER-PREFIXes to certain namespaces identified by
+ particular URI-STRINGs. It may be an empty list.
+ `ssax:xml->sxml' returns an SXML tree. The port points out to the
+ first character after the root element.
+

File: slib.info, Node: Printing Scheme, Next: Time and Date, Prev: Parsing XML, Up: Textual Conversion Packages
- |
-4.12 Printing Scheme |
+
+4.12 Printing Scheme
====================
* Menu:
@@ -6029,7 +6029,7 @@ File: slib.info, Node: Printing Scheme, Next: Time and Date, Prev: Parsing XM

File: slib.info, Node: Generic-Write, Next: Object-To-String, Prev: Printing Scheme, Up: Printing Scheme
-4.12.1 Generic-Write |
+4.12.1 Generic-Write
--------------------
`(require 'generic-write)'
@@ -6072,7 +6072,7 @@ printing, output to a string and truncated output.

File: slib.info, Node: Object-To-String, Next: Pretty-Print, Prev: Generic-Write, Up: Printing Scheme
-4.12.2 Object-To-String |
+4.12.2 Object-To-String
-----------------------
`(require 'object->string)'
@@ -6087,7 +6087,7 @@ File: slib.info, Node: Object-To-String, Next: Pretty-Print, Prev: Generic-Wr

File: slib.info, Node: Pretty-Print, Prev: Object-To-String, Up: Printing Scheme
-4.12.3 Pretty-Print |
+4.12.3 Pretty-Print
-------------------
`(require 'pretty-print)'
@@ -6178,7 +6178,7 @@ thus can reduce loading time. The following will write into

File: slib.info, Node: Time and Date, Next: NCBI-DNA, Prev: Printing Scheme, Up: Textual Conversion Packages
-4.13 Time and Date |
+4.13 Time and Date
==================
* Menu:
@@ -6211,7 +6211,7 @@ Scheme datatypes.

File: slib.info, Node: Time Zone, Next: Posix Time, Prev: Time and Date, Up: Time and Date
-4.13.1 Time Zone |
+4.13.1 Time Zone
----------------
(require 'time-zone)
@@ -6338,7 +6338,7 @@ compatability. Because of shared state they are not thread-safe.

File: slib.info, Node: Posix Time, Next: Common-Lisp Time, Prev: Time Zone, Up: Time and Date
-4.13.2 Posix Time |
+4.13.2 Posix Time
-----------------
(require 'posix-time)
@@ -6410,7 +6410,7 @@ File: slib.info, Node: Posix Time, Next: Common-Lisp Time, Prev: Time Zone,

File: slib.info, Node: Common-Lisp Time, Next: Time Infrastructure, Prev: Posix Time, Up: Time and Date
-4.13.3 Common-Lisp Time |
+4.13.3 Common-Lisp Time
-----------------------
-- Function: get-decoded-time
@@ -6460,7 +6460,7 @@ File: slib.info, Node: Common-Lisp Time, Next: Time Infrastructure, Prev: Pos

File: slib.info, Node: Time Infrastructure, Prev: Common-Lisp Time, Up: Time and Date
-4.13.4 Time Infrastructure |
+4.13.4 Time Infrastructure
--------------------------
`(require 'time-core)'
@@ -6476,11 +6476,11 @@ File: slib.info, Node: Time Infrastructure, Prev: Common-Lisp Time, Up: Time

File: slib.info, Node: NCBI-DNA, Next: Schmooz, Prev: Time and Date, Up: Textual Conversion Packages
-4.14 NCBI-DNA |
+4.14 NCBI-DNA
=============
-`(require 'ncbi-dma)' |
- |
+`(require 'ncbi-dma)'
+
-- Function: ncbi:read-dna-sequence port
Reads the NCBI-format DNA sequence following the word `ORIGIN'
from PORT.
@@ -6519,7 +6519,7 @@ sequence with the `BASE COUNT' line preceding the sequence from NCBI.

File: slib.info, Node: Schmooz, Prev: NCBI-DNA, Up: Textual Conversion Packages
-4.15 Schmooz |
+4.15 Schmooz
============
"Schmooz" is a simple, lightweight markup language for interspersing
@@ -6712,7 +6712,7 @@ representation.
5.1.2 Integer Properties
------------------------
- -- Function: logcount n |
+ -- Function: logcount n
Returns the number of bits in integer N. If integer is positive,
the 1-bits in its binary representation are counted. If negative,
the 0-bits in its two's-complement binary representation are
@@ -6726,17 +6726,17 @@ representation.
(logcount -2)
=> 1
-On `discuss@r6rs.org' Ben Harris credits Simon Tatham with the idea to |
-have `bitwise-bit-count' return a negative count for negative inputs. |
-Alan Bawden came up with the succinct invariant. |
- |
- -- Function: bitwise-bit-count n |
- If N is non-negative, this procedure returns the number of 1 bits |
- in the two's-complement representation of N. Otherwise it returns |
- the result of the following computation: |
- |
- (bitwise-not (bitwise-bit-count (bitwise-not N))) |
- |
+On `discuss@r6rs.org' Ben Harris credits Simon Tatham with the idea to
+have `bitwise-bit-count' return a negative count for negative inputs.
+Alan Bawden came up with the succinct invariant.
+
+ -- Function: bitwise-bit-count n
+ If N is non-negative, this procedure returns the number of 1 bits
+ in the two's-complement representation of N. Otherwise it returns
+ the result of the following computation:
+
+ (bitwise-not (bitwise-bit-count (bitwise-not N)))
+
-- Function: integer-length n
Returns the number of bits neccessary to represent N.
@@ -8955,15 +8955,18 @@ and Z "Spectral Tristimulus Values". The files `cie1931.xyz' and
`cie1964.xyz' in the distribution contain these CIE-defined values.
-- Feature: cie1964
- Loads the Spectral Tristimulus Values defining `CIE 1964
- Supplementary Standard Colorimetric Observer'.
+ Loads the Spectral Tristimulus Values `CIE 1964 Supplementary |
+ Standard Colorimetric Observer', defining CIE:X-BAR, CIE:Y-BAR, |
+ and CIE:Z-BAR. |
-- Feature: cie1931
- Loads the Spectral Tristimulus Values defining `CIE 1931
- Supplementary Standard Colorimetric Observer'.
+ Loads the Spectral Tristimulus Values `CIE 1931 Supplementary |
+ Standard Colorimetric Observer', defining CIE:X-BAR, CIE:Y-BAR, |
+ and CIE:Z-BAR. |
-- Feature: ciexyz
- Requires Spectral Tristimulus Values, defaulting to cie1931.
+ Requires Spectral Tristimulus Values, defaulting to cie1931, |
+ defining CIE:X-BAR, CIE:Y-BAR, and CIE:Z-BAR. |
`(require 'cie1964)' or `(require 'cie1931)' will `load-ciexyz'
specific values used by the following spectrum conversion procedures.
@@ -9555,7 +9558,7 @@ File: slib.info, Node: Root Finding, Next: Minimizing, Prev: Color, Up: Math
=================
`(require 'root)'
- |
+
-- Function: newton:find-integer-root f df/dx x0
Given integer valued procedure F, its derivative (with respect to
its argument) DF/DX, and initial integer value X0 for which
@@ -10080,7 +10083,7 @@ linear-algebra texts, this package uses 0-based coordinates.
Returns the list-of-lists form of MATRIX.
-- Function: matrix->array matrix
- Returns the (ones-based) array form of MATRIX.
+ Returns the array form of MATRIX. |
-- Function: determinant matrix
MATRIX must be a square matrix. `determinant' returns the
@@ -10094,23 +10097,23 @@ linear-algebra texts, this package uses 0-based coordinates.
Returns a copy of MATRIX flipped over the diagonal containing the
1,1 element.
- -- Function: matrix:sum m1 m2 |
- Returns the element-wise sum of matricies M1 and M2. |
- |
- -- Function: matrix:difference m1 m2 |
- Returns the element-wise difference of matricies M1 and M2. |
- |
+ -- Function: matrix:sum m1 m2
+ Returns the element-wise sum of matricies M1 and M2.
+
+ -- Function: matrix:difference m1 m2
+ Returns the element-wise difference of matricies M1 and M2.
+
-- Function: matrix:product m1 m2
Returns the product of matrices M1 and M2.
- -- Function: matrix:product m1 z |
- Returns matrix M1 times scalar Z. |
- |
- -- Function: matrix:product z m1 |
- Returns matrix M1 times scalar Z. |
- |
+ -- Function: matrix:product m1 z
+ Returns matrix M1 times scalar Z.
+
+ -- Function: matrix:product z m1
+ Returns matrix M1 times scalar Z.
+
-- Function: matrix:inverse matrix
- MATRIX must be a square matrix. If MATRIX is singlar, then
+ MATRIX must be a square matrix. If MATRIX is singular, then |
`matrix:inverse' returns #f; otherwise `matrix:inverse' returns the
`matrix:product' inverse of MATRIX.
@@ -12438,95 +12441,95 @@ uniform-array type is supported by the implementation, then it is
returned; defaulting to the next larger precision type; resorting
finally to vector.
- -- Function: A:floC128b z |
- -- Function: A:floC128b |
+ -- Function: A:floC128b z
+ -- Function: A:floC128b
Returns an inexact 128.bit flonum complex uniform-array prototype.
- -- Function: A:floC64b z |
- -- Function: A:floC64b |
+ -- Function: A:floC64b z
+ -- Function: A:floC64b
Returns an inexact 64.bit flonum complex uniform-array prototype.
- -- Function: A:floC32b z |
- -- Function: A:floC32b |
+ -- Function: A:floC32b z
+ -- Function: A:floC32b
Returns an inexact 32.bit flonum complex uniform-array prototype.
- -- Function: A:floC16b z |
- -- Function: A:floC16b |
+ -- Function: A:floC16b z
+ -- Function: A:floC16b
Returns an inexact 16.bit flonum complex uniform-array prototype.
- -- Function: A:floR128b x |
- -- Function: A:floR128b |
+ -- Function: A:floR128b x
+ -- Function: A:floR128b
Returns an inexact 128.bit flonum real uniform-array prototype.
- -- Function: A:floR64b x |
- -- Function: A:floR64b |
+ -- Function: A:floR64b x
+ -- Function: A:floR64b
Returns an inexact 64.bit flonum real uniform-array prototype.
- -- Function: A:floR32b x |
- -- Function: A:floR32b |
+ -- Function: A:floR32b x
+ -- Function: A:floR32b
Returns an inexact 32.bit flonum real uniform-array prototype.
- -- Function: A:floR16b x |
- -- Function: A:floR16b |
+ -- Function: A:floR16b x
+ -- Function: A:floR16b
Returns an inexact 16.bit flonum real uniform-array prototype.
- -- Function: A:floR128d q |
- -- Function: A:floR128d |
+ -- Function: A:floR128d q
+ -- Function: A:floR128d
Returns an exact 128.bit decimal flonum rational uniform-array
prototype.
- -- Function: A:floR64d q |
- -- Function: A:floR64d |
+ -- Function: A:floR64d q
+ -- Function: A:floR64d
Returns an exact 64.bit decimal flonum rational uniform-array
prototype.
- -- Function: A:floR32d q |
- -- Function: A:floR32d |
+ -- Function: A:floR32d q
+ -- Function: A:floR32d
Returns an exact 32.bit decimal flonum rational uniform-array
prototype.
- -- Function: A:fixZ64b n |
- -- Function: A:fixZ64b |
+ -- Function: A:fixZ64b n
+ -- Function: A:fixZ64b
Returns an exact binary fixnum uniform-array prototype with at
least 64 bits of precision.
- -- Function: A:fixZ32b n |
- -- Function: A:fixZ32b |
+ -- Function: A:fixZ32b n
+ -- Function: A:fixZ32b
Returns an exact binary fixnum uniform-array prototype with at
least 32 bits of precision.
- -- Function: A:fixZ16b n |
- -- Function: A:fixZ16b |
+ -- Function: A:fixZ16b n
+ -- Function: A:fixZ16b
Returns an exact binary fixnum uniform-array prototype with at
least 16 bits of precision.
- -- Function: A:fixZ8b n |
- -- Function: A:fixZ8b |
+ -- Function: A:fixZ8b n
+ -- Function: A:fixZ8b
Returns an exact binary fixnum uniform-array prototype with at
least 8 bits of precision.
- -- Function: A:fixN64b k |
- -- Function: A:fixN64b |
+ -- Function: A:fixN64b k
+ -- Function: A:fixN64b
Returns an exact non-negative binary fixnum uniform-array
prototype with at least 64 bits of precision.
- -- Function: A:fixN32b k |
- -- Function: A:fixN32b |
+ -- Function: A:fixN32b k
+ -- Function: A:fixN32b
Returns an exact non-negative binary fixnum uniform-array
prototype with at least 32 bits of precision.
- -- Function: A:fixN16b k |
- -- Function: A:fixN16b |
+ -- Function: A:fixN16b k
+ -- Function: A:fixN16b
Returns an exact non-negative binary fixnum uniform-array
prototype with at least 16 bits of precision.
- -- Function: A:fixN8b k |
- -- Function: A:fixN8b |
+ -- Function: A:fixN8b k
+ -- Function: A:fixN8b
Returns an exact non-negative binary fixnum uniform-array
prototype with at least 8 bits of precision.
- -- Function: A:bool bool |
- -- Function: A:bool |
+ -- Function: A:bool bool
+ -- Function: A:bool
Returns a boolean uniform-array prototype.

@@ -12628,16 +12631,16 @@ File: slib.info, Node: Array Mapping, Next: Array Interpolation, Prev: Subarr
a list of indexes for which ARRAY is defined, (equal? LI (apply
array-ref (array-indexes ARRAY) LI)).
- -- Function: array-index-for-each array proc |
- applies PROC to the indices of each element of ARRAY in turn. The |
- value returned and the order of application are unspecified. |
- |
- One can implement ARRAY-INDEX-MAP! as |
- (define (array-index-map! ra fun) |
- (array-index-for-each |
- ra |
- (lambda is (apply array-set! ra (apply fun is) is)))) |
- |
+ -- Function: array-index-for-each array proc
+ applies PROC to the indices of each element of ARRAY in turn. The
+ value returned and the order of application are unspecified.
+
+ One can implement ARRAY-INDEX-MAP! as
+ (define (array-index-map! ra fun)
+ (array-index-for-each
+ ra
+ (lambda is (apply array-set! ra (apply fun is) is))))
+
-- Procedure: array-index-map! array proc
applies PROC to the indices of each element of ARRAY in turn,
storing the result in the corresponding element. The value
@@ -12781,18 +12784,28 @@ character sets. These functions abstract the notion of a "byte".
-- Function: bytes byte ...
Returns a newly allocated byte-array composed of the small
nonnegative arguments.
-
- -- Function: bytes->list bytes
- `bytes->list' returns a newly allocated list of the bytes that
- make up the given byte-array.
-
+ |
-- Function: list->bytes bytes
`list->bytes' returns a newly allocated byte-array formed from the
small nonnegative integers in the list BYTES.
+ -- Function: bytes->list bytes |
+ `bytes->list' returns a newly allocated list of the bytes that |
+ make up the given byte-array. |
+ |
`Bytes->list' and `list->bytes' are inverses so far as `equal?' is
concerned.
+ -- Function: bytes->string bytes |
+ Returns a new string formed from applying `integer->char' to each |
+ byte in `bytes->string'. Note that this may signal an error for |
+ bytes having values between 128 and 255. |
+ |
+ -- Function: string->bytes string |
+ Returns a new byte-array formed from applying `char->integer' to |
+ each character in `string->bytes'. Note that this may signal an |
+ error if an integer is larger than 255. |
+ |
-- Function: bytes-copy bytes
Returns a newly allocated copy of the given BYTES.
@@ -12848,8 +12861,8 @@ Byte/Number Conversions:: are always big-endian.
`read-bytes' returns a newly allocated bytes-array filled with
`(abs N)' bytes read from PORT. If N is positive, then the first
byte read is stored at index 0; otherwise the last byte read is
- stored at index 0. Note that the length of the returned string
- will be less than `(abs N)' if PORT reaches end-of-file.
+ stored at index 0. Note that the length of the returned |
+ byte-array will be less than `(abs N)' if PORT reaches end-of-file. |
PORT may be omitted, in which case it defaults to the value
returned by `current-input-port'.
@@ -12868,19 +12881,19 @@ Byte/Number Conversions:: are always big-endian.
for reading and writing blocks of bytes. The relative size of START
and END determines the order of writing.
- -- Procedure: subbytes-read! string start end port
- -- Procedure: subbytes-read! string start end
- Fills STRING with up to `(abs (- START END))' bytes read from
- PORT. The first byte read is stored at index STRING.
- `subbytes-read!' returns the number of bytes read.
+ -- Procedure: subbytes-read! bts start end port |
+ -- Procedure: subbytes-read! bts start end |
+ Fills BTS with up to `(abs (- START END))' bytes read from PORT. |
+ The first byte read is stored at index BTS. `subbytes-read!' |
+ returns the number of bytes read. |
PORT may be omitted, in which case it defaults to the value
returned by `current-input-port'.
- -- Function: subbytes-write string start end port
- -- Function: subbytes-write string start end
+ -- Function: subbytes-write bts start end port |
+ -- Function: subbytes-write bts start end |
`subbytes-write' writes `(abs (- START END))' bytes to output-port
- PORT. The first byte written is index START of STRING.
+ PORT. The first byte written is index START of BTS. |
`subbytes-write' returns the number of bytes written.
PORT may be omitted, in which case it defaults to the value
@@ -12944,7 +12957,7 @@ determines the signedness of the number.
(bytes->ieee-float (bytes #xff #x80 0 0)) => -inf.0
(bytes->ieee-float (bytes #x7f #x80 0 0)) => +inf.0
(bytes->ieee-float (bytes #x7f #x80 0 1)) => 0/0
- (bytes->ieee-float (bytes #x7f #xc0 0 0)) => 0/0 |
+ (bytes->ieee-float (bytes #x7f #xc0 0 0)) => 0/0
-- Function: bytes->ieee-double bytes
BYTES must be a 8-element byte-array. `bytes->ieee-double'
@@ -13034,7 +13047,7 @@ enables the full range of numbers as keys in
`ieee-byte-collate!' returns BYTE-VECTOR.
-- Procedure: ieee-byte-decollate! byte-vector
- Given BYTE-VECTOR modified by `ieee-byte-collate!', reverses the |
+ Given BYTE-VECTOR modified by `ieee-byte-collate!', reverses the
BYTE-VECTOR modifications.
-- Function: ieee-byte-collate byte-vector
@@ -13042,7 +13055,7 @@ enables the full range of numbers as keys in
IEEE floating-point byte-vectors matches numerical order.
-- Function: ieee-byte-decollate byte-vector
- Given BYTE-VECTOR returned by `ieee-byte-collate', reverses the |
+ Given BYTE-VECTOR returned by `ieee-byte-collate', reverses the
BYTE-VECTOR modifications.

@@ -13197,7 +13210,7 @@ operations.
-- Function: reduce proc seed collection1 ...
A generalization of the list-based `reduce-init' (*note Lists as
- sequences::) to collections. |
+ sequences::) to collections.
Examples:
(reduce + 0 (vector 1 2 3))
@@ -13205,9 +13218,9 @@ operations.
(reduce union '() '((a b c) (b c d) (d a)))
=> (c b d a).
- `Reduce' called with two arguments will work as does the procedure |
- of the same name from *Note Common List Functions::). |
- |
+ `Reduce' called with two arguments will work as does the procedure
+ of the same name from *Note Common List Functions::).
+
-- Function: any? pred collection1 ...
A generalization of the list-based `some' (*note Lists as
sequences::) to collections.
@@ -14439,12 +14452,12 @@ File: slib.info, Node: Sorting, Next: Topological Sort, Prev: Chapter Orderin
7.2.4 Sorting
-------------
-`(require 'sort)' or `(require 'srfi-95)' |
+`(require 'sort)' or `(require 'srfi-95)'
[by Richard A. O'Keefe, 1991]
- |
+
I am providing this source code with no restrictions at all on its use
-(but please retain D.H.D.Warren's credit for the original idea). |
+(but please retain D.H.D.Warren's credit for the original idea).
The code of `merge' and `merge!' could have been quite a bit simpler,
but they have been coded to reduce the amount of work done per
@@ -14456,7 +14469,7 @@ Common LISP's `stable-sort' is our `sort!'; merge sort is _fast_ as
well as stable!) so adapting CL code to Scheme takes a bit of work
anyway. I did, however, appeal to CL to determine the _order_ of the
arguments.
- |
+
The standard functions `<', `>', `char<?', `char>?', `char-ci<?',
`char-ci>?', `string<?', `string>?', `string-ci<?', and `string-ci>?'
are suitable for use as comparison functions. Think of `(less? x y)'
@@ -14465,13 +14478,13 @@ as saying when `x' must _not_ precede `y'.
[Addendum by Aubrey Jaffer, 2006]
These procedures are stable when called with predicates which return
-`#f' when applied to identical arguments. |
- |
- The `sorted?', `merge', and `merge!' procedures consume asymptotic |
-time and space no larger than O(N), where N is the sum of the lengths |
-of the sequence arguments. The `sort' and `sort!' procedures consume |
-asymptotic time and space no larger than O(N*log(N)), where N is the |
-length of the sequence argument. |
+`#f' when applied to identical arguments.
+
+ The `sorted?', `merge', and `merge!' procedures consume asymptotic
+time and space no larger than O(N), where N is the sum of the lengths
+of the sequence arguments. The `sort' and `sort!' procedures consume
+asymptotic time and space no larger than O(N*log(N)), where N is the
+length of the sequence argument.
All five functions take an optional KEY argument corresponding to a
CL-style `&key' argument. A LESS? predicate with a KEY argument
@@ -14479,9 +14492,9 @@ behaves like:
(lambda (x y) (LESS? (KEY x) (KEY y)))
- All five functions will call the KEY argument at most once per |
-element. |
- |
+ All five functions will call the KEY argument at most once per
+element.
+
The `!' variants sort in place; `sort!' returns its SEQUENCE argument.
-- Function: sorted? sequence less?
@@ -14502,7 +14515,7 @@ element. |
-- Function: merge! list1 list2 less?
-- Function: merge! list1 list2 less? key
Merges two sorted lists, re-using the pairs of LIST1 and LIST2 to
- build the result. The result will be either LIST1 or LIST2. |
+ build the result. The result will be either LIST1 or LIST2.
-- Function: sort sequence less?
-- Function: sort sequence less? key
@@ -14516,11 +14529,11 @@ element. |
-- Function: sort! sequence less?
-- Function: sort! sequence less? key
- Returns list, array, vector, or string SEQUENCE which has been |
- mutated to order its elements according to LESS?. Given valid |
- arguments, it is always the case that: |
- |
- (sorted? (sort! SEQUENCE LESS?) LESS?) => #t |
+ Returns list, array, vector, or string SEQUENCE which has been
+ mutated to order its elements according to LESS?. Given valid
+ arguments, it is always the case that:
+
+ (sorted? (sort! SEQUENCE LESS?) LESS?) => #t

File: slib.info, Node: Topological Sort, Next: Hashing, Prev: Sorting, Up: Sorting and Searching
@@ -15768,13 +15781,13 @@ Implements "Scheme Request For Implementation" (SRFI) as described at
* SRFI-9 *Note Define-Record-Type::
- * SRFI-11 *Note Binding to multiple values:: |
- |
+ * SRFI-11 *Note Binding to multiple values::
+
* SRFI-23 `(define error slib:error)'
- * SRFI-28 *Note Format:: |
+ * SRFI-28 *Note Format::
- * SRFI-47 *Note Arrays:: |
+ * SRFI-47 *Note Arrays::
* SRFI-59 *Note Vicinity::
@@ -15782,12 +15795,14 @@ Implements "Scheme Request For Implementation" (SRFI) as described at
* SRFI-61 *Note Guarded COND Clause::
- * SRFI-63 *Note Arrays:: |
- |
+ * SRFI-63 *Note Arrays::
+
* SRFI-94 *Note Irrational Integer Functions:: and *Note Irrational
- Real Functions:: |
- |
- * SRFI-95 *Note Sorting:: |
+ Real Functions::
+
+ * SRFI-95 *Note Sorting::
+
+ * SRFI-96 *Note Universal SLIB Procedures:: |
|

File: slib.info, Node: SRFI-1, Prev: SRFI, Up: SRFI
@@ -15907,7 +15922,7 @@ Fold and Unfold
-- Function: pair-fold-right kons knil clist1 clist2 ...
- -- Function: reduce arg ... |
+ -- Function: reduce arg ...
-- Procedure: map! f clist1 clist2 ...
@@ -16299,19 +16314,25 @@ File: slib.info, Node: System Interface, Next: Extra-SLIB Packages, Prev: Ses
7.6 System Interface
====================
-If `(provided? 'getenv)':
+If `(provided? 'getenv)':
-- Function: getenv name
Looks up NAME, a string, in the program environment. If NAME is
found a string of its value is returned. Otherwise, `#f' is
returned.
-If `(provided? 'system)':
+If `(provided? 'system)':
-- Function: system command-string
Executes the COMMAND-STRING on the computer and returns the
integer status code.
+If `(provided? 'program-arguments)': |
+ |
+ -- Function: program-arguments |
+ Returns a list of strings, the first of which is the program name |
+ followed by the command-line arguments. |
+ |
* Menu:
* Directories::
@@ -16429,6 +16450,18 @@ maintain and check both Emacs and Word certificates.
the locks and returns `#t'. Otherwise, `file-unlock!' leaves the
file system unaltered and returns `#f'.
+ -- Function: describe-file-lock path prefix |
+ -- Function: describe-file-lock path |
+ PATH must be a string naming a file. Optional argument PREFIX is |
+ a string printed before each line of the message. |
+ `describe-file-lock' prints to `(current-error-port)' that PATH is |
+ locked for writing and lists its lock-files. |
+ |
+ (describe-file-lock "my.txt" ">> ") |
+ -| |
+ >> "my.txt" is locked for writing by 'luser@no.com.4829:1200536423' |
+ >> (lock files are "~$my.txt" and ".#my.txt") |
+ |
File Transactions
.................
@@ -16555,9 +16588,9 @@ reasons why a package might not be included in the SLIB distribution:
* Because I have been too busy to integrate it.
Once an optional package is installed (and an entry added to
-`*catalog*', the `require' mechanism allows it to be called up and used
-as easily as any other SLIB package. Some optional packages (for which
-`*catalog*' already has entries) available from SLIB sites are:
+`*catalog*'), the `require' mechanism allows it to be called up and |
+used as easily as any other SLIB package. Some optional packages (for |
+which `*catalog*' already has entries) available from SLIB sites are: |
SLIB-PSD
is a portable debugger for Scheme (requires emacs editor).
@@ -16600,13 +16633,15 @@ File: slib.info, Node: About SLIB, Next: Index, Prev: Other Packages, Up: To
More people than I can name have contributed to SLIB. Thanks to all of
you!
- SLIB 3a5, released November 2007. |
+ SLIB 3b1, released February 2008. |
Aubrey Jaffer <agj @ alum.mit.edu>
Current information about SLIB can be found on SLIB's "WWW" home page:
`http://swiss.csail.mit.edu/~jaffer/SLIB'
+ SLIB is part of the GNU project. |
+ |
* Menu:
* Installation:: How to install SLIB on your system.
@@ -16628,8 +16663,8 @@ There are five parts to installation:
* Install documentation and `slib' script.
- * Configure the Scheme implementation(s) to locate the SLIB
- directory.
+ * Configure the Scheme implementation(s) to locate the SLIB directory |
+ and implementation directories. |
* Arrange for Scheme implementation to load its SLIB initialization
file.
@@ -16639,7 +16674,7 @@ There are five parts to installation:
8.1.1 Unpacking the SLIB Distribution
-------------------------------------
-If the SLIB distribution is a GNU/Linux RPM, it will create the SLIB |
+If the SLIB distribution is a GNU/Linux RPM, it will create the SLIB
directory `/usr/share/slib'.
If the SLIB distribution is a ZIP file, unzip the distribution to
@@ -16661,13 +16696,36 @@ please inform agj @ alum.mit.edu.
If the Scheme implementation supports `getenv', then the value of the
shell environment variable SCHEME_LIBRARY_PATH will be used for
-`(library-vicinity)' if it is defined. Currently, Chez, Elk,
-MITScheme, scheme->c, VSCM, and SCM support `getenv'. Scheme48
-supports `getenv' but does not use it for determining
-`library-vicinity'. (That is done from the Makefile.)
-
- The `(library-vicinity)' can also be specified from the SLIB
-initialization file or by implementation-specific means.
+`(library-vicinity)' if it is defined. Currently, Bigloo, Chez, Elk, |
+Gambit, Guile, Jscheme, Larceny, MITScheme, MzScheme, RScheme, STk, |
+VSCM, and SCM support `getenv'. Scheme48 supports `getenv' but does |
+not use it for determining `library-vicinity'. (That is done from the |
+Makefile.) |
+
+ The `(library-vicinity)' can also be set from the SLIB initialization |
+file or by implementation-specific means. |
+ |
+ Support for locating an implementation's auxiliary directory is uneven |
+among implementations. Also, the person installing SLIB may not have |
+write permission to some of these directories (necessary for writing |
+slibcat). Therefore, those implementations supporting `getenv' (except |
+SCM and Scheme48) provide a means for specifying the |
+`implementation-vicinity' through environment variables. Define the |
+indicated environment variable to the pathname (with trailing slash or |
+backslash) of the desired directory. Do not use `slib/' as an |
+implementation-vicinity! |
+ |
+Bigloo BIGLOO_IMPLEMENTATION_PATH |
+Chez CHEZ_IMPLEMENTATION_PATH |
+ELK ELK_IMPLEMENTATION_PATH |
+Gambit GAMBIT_IMPLEMENTATION_PATH |
+Guile GUILE_IMPLEMENTATION_PATH |
+Jscheme JSCHEME_IMPLEMENTATION_PATH |
+MIT-Scheme MITSCHEME_IMPLEMENTATION_PATH |
+MzScheme MZSCHEME_IMPLEMENTATION_PATH |
+RScheme RSCHEME_IMPLEMENTATION_PATH |
+STk STK_IMPLEMENTATION_PATH |
+Vscm VSCM_IMPLEMENTATION_PATH |
8.1.4 Loading SLIB Initialization File
--------------------------------------
@@ -16717,22 +16775,37 @@ above.
SLIB support is already built into SCM. See the documentation
with SCM for installation instructions.
+ -- Implementation: Larceny |
+ Starting with version 0.96, Larceny contains its own SLIB |
+ initialization file, loaded by `(require 'srfi-96)'. If |
+ SCHEME_LIBRARY_PATH is not set, then Larceny looks for an `slib' |
+ subdirectory of a directory in the list returned by |
+ `(current-require-path)' |
+ |
+ larceny -- -e "(require 'srfi-96)" |
+ |
+ -- Implementation: ELK |
+ elk -i -l ${SCHEME_LIBRARY_PATH}elk.init |
+ |
-- Implementation: PLT Scheme
-- Implementation: DrScheme
-- Implementation: MzScheme
The `init.ss' file in the _slibinit_ collection is an SLIB
- initialization file.
+ initialization file. To run SLIB in MzScheme: |
- To use SLIB in MzScheme, set the SCHEME_LIBRARY_PATH environment
- variable to the installed SLIB location; then invoke MzScheme thus:
-
- `mzscheme -f ${SCHEME_LIBRARY_PATH}DrScheme.init'
+ mzscheme -f ${SCHEME_LIBRARY_PATH}mzscheme.init |
-- Implementation: MIT Scheme
- `scheme -load ${SCHEME_LIBRARY_PATH}mitscheme.init'
+ scheme -load ${SCHEME_LIBRARY_PATH}mitscheme.init |
-- Implementation: Gambit-C 3.0
- `$command -:s ${SCHEME_LIBRARY_PATH}gambit.init -'
+ gsi -:s ${SCHEME_LIBRARY_PATH}gambit.init - |
+ |
+ -- Implementation: SISC |
+ sisc -e "(load \"${SCHEME_LIBRARY_PATH}sisc.init\")" -- |
+ |
+ -- Implementation: Kawa |
+ kawa -f ${SCHEME_LIBRARY_PATH}kawa.init -- |
-- Implementation: Guile
Guile versions 1.6 and earlier link to an archaic SLIB version. In
@@ -16750,7 +16823,7 @@ above.
Guile with SLIB can then be started thus:
- `guile -l ${SCHEME_LIBRARY_PATH}guile.init'
+ guile -l ${SCHEME_LIBRARY_PATH}guile.init |
-- Implementation: Scheme48
To make a Scheme48 image for an installation under `<prefix>',
@@ -16780,12 +16853,16 @@ above.
3. `(slib:dump "dumpfile")'
- 4. mv dumpfile place-where-vscm-standard-bootfile-resides e.g.
- mv dumpfile /usr/local/vscm/lib/scheme-boot (In this case
- vscm should have been compiled with flag
- -DDEFAULT_BOOTFILE='"/usr/local/vscm/lib/scheme-boot"'. See
- Makefile (definition of DDP) for details.)
+ 4. mv dumpfile place-where-vscm-standard-bootfile-resides. For |
+ example: |
+ `mv dumpfile /usr/local/vscm/lib/scheme-boot' |
+ |
+ In this case vscm should have been compiled with flag: |
+ |
+ -DDEFAULT_BOOTFILE='"/usr/local/vscm/lib/scheme-boot"' |
+ |
+ See Makefile (definition of DDP) for details. |

File: slib.info, Node: The SLIB script, Next: Porting, Prev: Installation, Up: About SLIB
@@ -16795,8 +16872,8 @@ File: slib.info, Node: The SLIB script, Next: Porting, Prev: Installation, U
SLIB comes with shell script for Unix platforms.
- slib [ scheme | scm | gsi | mzscheme | guile |
- | scheme48 | scmlit | elk | sisc | kawa ] |
+ slib [ scheme | scm | gsi | mzscheme | guile
+ | scheme48 | scmlit | elk | sisc | kawa ]
Starts an interactive Scheme-with-SLIB session.
@@ -16984,12 +17061,7 @@ File: slib.info, Node: About this manual, Prev: Copyrights, Up: About SLIB
8.6 About this manual
=====================
-
-* Menu:
-
-* Copying This Manual::
-* How to use this License for your documents::
-
+ |
* Entries that are labeled as Functions are called for their return
values. Entries that are labeled as Procedures are called
primarily for their side effects.
@@ -16997,20 +17069,24 @@ File: slib.info, Node: About this manual, Prev: Copyrights, Up: About SLIB
* Examples in this text were produced using the `scm' Scheme
implementation.
- * At the beginning of each section, there is a line that looks like `(require
- 'feature)'. Include this line in your code prior to using the
- package.
+ * At the beginning of each section, there is a line that looks like: |
+ (require 'feature) |
+ Include this line in your code prior to using the package. |
+ |
+* Menu:
+ |
+* GNU Free Documentation License::

-File: slib.info, Node: Copying This Manual, Next: How to use this License for your documents, Prev: About this manual, Up: About this manual
-
-8.6.1 Copying This Manual
--------------------------
+File: slib.info, Node: GNU Free Documentation License, Prev: About this manual, Up: About this manual
+ |
+8.6.1 GNU Free Documentation License |
+------------------------------------ |
Version 1.2, November 2002
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -17402,11 +17478,8 @@ File: slib.info, Node: Copying This Manual, Next: How to use this License for
you may choose any version ever published (not as a draft) by the
Free Software Foundation.
-
-File: slib.info, Node: How to use this License for your documents, Prev: Copying This Manual, Up: About this manual
-
-8.6.2 How to use this License for your documents
-------------------------------------------------
+ADDENDUM: How to use this License for your documents |
+==================================================== |
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and license
@@ -17561,7 +17634,7 @@ Procedure and Macro Index
* bitwise-merge: Bit-Twiddling. (line 57)
* bitwise-not: Bit-Twiddling. (line 46)
* bitwise-xor: Bit-Twiddling. (line 37)
-* blackbody-spectrum: Spectra. (line 125)
+* blackbody-spectrum: Spectra. (line 128)
* booleans->integer: Bit-Twiddling. (line 239)
* break <1>: Breakpoints. (line 28)
* break: SRFI-1. (line 151)
@@ -17577,16 +17650,17 @@ Procedure and Macro Index
* byte-set!: Byte. (line 18)
* bytes: Byte. (line 32)
* bytes->ieee-double: Byte/Number Conversions.
- (line 61) |
+ (line 61)
* bytes->ieee-float: Byte/Number Conversions.
(line 41)
* bytes->integer: Byte/Number Conversions.
(line 17)
-* bytes->list: Byte. (line 36)
-* bytes-copy: Byte. (line 47)
+* bytes->list: Byte. (line 40)
+* bytes->string: Byte. (line 47)
+* bytes-copy: Byte. (line 57)
* bytes-length: Byte. (line 29)
-* bytes-reverse: Byte. (line 63)
-* bytes-reverse!: Byte. (line 60)
+* bytes-reverse: Byte. (line 73)
+* bytes-reverse!: Byte. (line 70)
* call-with-dynamic-binding: Dynamic Data Type. (line 25)
* call-with-input-string: String Ports. (line 15)
* call-with-open-ports: Input/Output. (line 54)
@@ -17609,8 +17683,8 @@ Procedure and Macro Index
* chap:string>=?: Chapter Ordering. (line 26)
* chap:string>?: Chapter Ordering. (line 24)
* check-parameters: Parameter lists. (line 59)
-* chromaticity->CIEXYZ: Spectra. (line 169)
-* chromaticity->whitepoint: Spectra. (line 172)
+* chromaticity->CIEXYZ: Spectra. (line 172)
+* chromaticity->whitepoint: Spectra. (line 175)
* CIE:DE*: Color Difference Metrics.
(line 20)
* CIE:DE*94: Color Difference Metrics.
@@ -17708,10 +17782,10 @@ Procedure and Macro Index
* ctime: Posix Time. (line 68)
* current-directory: Directories. (line 9)
* current-error-port: Input/Output. (line 70)
-* current-input-port <1>: Byte. (line 84)
+* current-input-port <1>: Byte. (line 94)
* current-input-port: Ruleset Definition and Use.
(line 57)
-* current-output-port: Byte. (line 76)
+* current-output-port: Byte. (line 86)
* current-time: Time and Date. (line 20)
* cvs-directories: CVS. (line 14)
* cvs-files: CVS. (line 9)
@@ -17761,6 +17835,7 @@ Procedure and Macro Index
* delete-table on relational-database: Database Operations. (line 59)
* dequeue!: Queues. (line 28)
* dequeue-all!: Queues. (line 36)
+* describe-file-lock: Transactions. (line 70)
* determinant: Matrix Algebra. (line 18)
* dft: Discrete Fourier Transform.
(line 44)
@@ -17787,7 +17862,7 @@ Procedure and Macro Index
* e-sRGB->e-sRGB: Color Conversions. (line 68)
* e-sRGB->sRGB: Color Conversions. (line 60)
* eighth: SRFI-1. (line 64)
-* emacs:backup-name: Transactions. (line 73)
+* emacs:backup-name: Transactions. (line 85)
* empty?: Collections. (line 100)
* encode-universal-time: Common-Lisp Time. (line 40)
* enqueue!: Queues. (line 25)
@@ -17797,7 +17872,7 @@ Procedure and Macro Index
* every: Lists as sets. (line 91)
* every?: Collections. (line 92)
* exports<-info-index: Top-level Variable References.
- (line 35) |
+ (line 35)
* extended-euclid: Modular Arithmetic. (line 9)
* factor: Prime Numbers. (line 41)
* feature->export-alist: Module Manifests. (line 100)
@@ -17952,19 +18027,19 @@ Procedure and Macro Index
* identifier?: Syntactic Closures. (line 334)
* identity: Miscellany. (line 9)
* ieee-byte-collate: Byte/Number Conversions.
- (line 152) |
+ (line 152)
* ieee-byte-collate!: Byte/Number Conversions.
- (line 143) |
+ (line 143)
* ieee-byte-decollate: Byte/Number Conversions.
- (line 156) |
+ (line 156)
* ieee-byte-decollate!: Byte/Number Conversions.
- (line 148) |
+ (line 148)
* ieee-double->bytes: Byte/Number Conversions.
- (line 98) |
+ (line 98)
* ieee-float->bytes: Byte/Number Conversions.
- (line 80) |
-* illuminant-map: Spectra. (line 77)
-* illuminant-map->XYZ: Spectra. (line 82)
+ (line 80)
+* illuminant-map: Spectra. (line 80)
+* illuminant-map->XYZ: Spectra. (line 85)
* implementation-vicinity: Vicinity. (line 42)
* in-graphic-context: Graphics Context. (line 7)
* in-vicinity: Vicinity. (line 62)
@@ -17979,14 +18054,14 @@ Procedure and Macro Index
* integer->peano-coordinates: Peano Space-Filling Curve.
(line 19)
* integer-byte-collate: Byte/Number Conversions.
- (line 137) |
+ (line 137)
* integer-byte-collate!: Byte/Number Conversions.
- (line 131) |
+ (line 131)
* integer-expt: Irrational Integer Functions.
(line 9)
* integer-length: Bit-Twiddling. (line 98)
* integer-log: Irrational Integer Functions.
- (line 18) |
+ (line 18)
* integer-sqrt: Irrational Integer Functions.
(line 23)
* interaction-environment: Eval. (line 51)
@@ -18020,9 +18095,9 @@ Procedure and Macro Index
* last-pair: Miscellany. (line 64)
* length+: SRFI-1. (line 88)
* let-values: Binding to multiple values.
- (line 14) |
+ (line 14)
* let-values*: Binding to multiple values.
- (line 15) |
+ (line 15)
* library-vicinity: Vicinity. (line 39)
* light:ambient: Solid Modeling. (line 110)
* light:beam: Solid Modeling. (line 144)
@@ -18032,7 +18107,7 @@ Procedure and Macro Index
* limit: The Limit. (line 7)
* list*: List construction. (line 18)
* list->array: Arrays. (line 88)
-* list->bytes: Byte. (line 40)
+* list->bytes: Byte. (line 36)
* list->integer: Bit-Twiddling. (line 231)
* list-copy: SRFI-1. (line 24)
* list-index: SRFI-1. (line 157)
@@ -18045,7 +18120,7 @@ Procedure and Macro Index
* ln: Irrational Real Functions.
(line 77)
* load->path: Module Manifests. (line 63)
-* load-ciexyz: Spectra. (line 37)
+* load-ciexyz: Spectra. (line 40)
* load-color-dictionary: Color Names. (line 52)
* localtime: Posix Time. (line 39)
* log2-binary-factors: Bit-Twiddling. (line 109)
@@ -18205,7 +18280,7 @@ Procedure and Macro Index
* open-database on relational-system: Relational Database Objects.
(line 45)
* open-database!: Using Databases. (line 68)
-* open-file <1>: Byte. (line 67)
+* open-file <1>: Byte. (line 77)
* open-file: Input/Output. (line 18)
* open-table: Using Databases. (line 107)
* open-table on base-table: Base Tables. (line 16)
@@ -18296,6 +18371,7 @@ Procedure and Macro Index
* printf: Standard Formatted Output.
(line 9)
* process:schedule!: Multi-Processing. (line 20)
+* program-arguments: System Interface. (line 22)
* program-vicinity: Vicinity. (line 30)
* project-table on relational-database: Database Operations. (line 76)
* proper-list?: SRFI-1. (line 38)
@@ -18328,13 +18404,13 @@ Procedure and Macro Index
* random:uniform: Inexact Random Numbers.
(line 9)
* rationalize: Rationalize. (line 9)
-* read-byte: Byte. (line 79)
-* read-bytes: Byte. (line 97)
-* read-cie-illuminant: Spectra. (line 43)
+* read-byte: Byte. (line 89)
+* read-bytes: Byte. (line 107)
+* read-cie-illuminant: Spectra. (line 46)
* read-command: Command Line. (line 9)
* read-line: Line I/O. (line 9)
* read-line!: Line I/O. (line 18)
-* read-normalized-illuminant: Spectra. (line 54)
+* read-normalized-illuminant: Spectra. (line 57)
* read-options-file: Command Line. (line 65)
* real-acos: Irrational Real Functions.
(line 20)
@@ -18505,8 +18581,8 @@ Procedure and Macro Index
* soundex: Soundex. (line 9)
* span: SRFI-1. (line 147)
* span!: SRFI-1. (line 149)
-* spectrum->chromaticity: Spectra. (line 111)
-* spectrum->XYZ: Spectra. (line 85)
+* spectrum->chromaticity: Spectra. (line 114)
+* spectrum->XYZ: Spectra. (line 88)
* split-at: SRFI-1. (line 80)
* split-at!: SRFI-1. (line 81)
* sprintf: Standard Formatted Output.
@@ -18549,6 +18625,7 @@ Procedure and Macro Index
* stack: Trace. (line 49)
* stack-all: Debug. (line 27)
* stackf: Trace. (line 85)
+* string->bytes: Byte. (line 52)
* string->color: Color Data-Type. (line 98)
* string-capitalize: String-Case. (line 11)
* string-capitalize!: String-Case. (line 16)
@@ -18571,9 +18648,9 @@ Procedure and Macro Index
* StudlyCapsExpand: String-Case. (line 29)
* sub-vicinity: Vicinity. (line 73)
* subarray: Subarrays. (line 9)
-* subbytes: Byte. (line 50)
-* subbytes-read!: Byte. (line 122)
-* subbytes-write: Byte. (line 131)
+* subbytes: Byte. (line 60)
+* subbytes-read!: Byte. (line 132)
+* subbytes-write: Byte. (line 141)
* subset?: Lists as sets. (line 52)
* subst: Tree Operations. (line 11)
* substq: Tree Operations. (line 12)
@@ -18609,8 +18686,8 @@ Procedure and Macro Index
* take: SRFI-1. (line 71)
* take!: SRFI-1. (line 72)
* take-right: SRFI-1. (line 74)
-* temperature->chromaticity: Spectra. (line 150)
-* temperature->XYZ: Spectra. (line 135)
+* temperature->chromaticity: Spectra. (line 153)
+* temperature->XYZ: Spectra. (line 138)
* tenth: SRFI-1. (line 66)
* third: SRFI-1. (line 57)
* time-zone: Time Zone. (line 68)
@@ -18633,7 +18710,7 @@ Procedure and Macro Index
* track: Trace. (line 41)
* track-all: Debug. (line 23)
* trackf: Trace. (line 83)
-* transact-file-replacement: Transactions. (line 98)
+* transact-file-replacement: Transactions. (line 110)
* transcript-off: Transcripts. (line 10)
* transcript-on: Transcripts. (line 9)
* transformer: Syntactic Closures. (line 113)
@@ -18666,7 +18743,7 @@ Procedure and Macro Index
* uric:decode: URI. (line 81)
* uric:encode: URI. (line 76)
* url->color-dictionary: Color Names. (line 77)
-* user-email-address: Transactions. (line 133)
+* user-email-address: Transactions. (line 145)
* user-vicinity: Vicinity. (line 47)
* values: Values. (line 9)
* vector->array: Arrays. (line 111)
@@ -18677,8 +18754,8 @@ Procedure and Macro Index
* vrml: Solid Modeling. (line 12)
* vrml-append: Solid Modeling. (line 16)
* vrml-to-file: Solid Modeling. (line 20)
-* wavelength->chromaticity: Spectra. (line 120)
-* wavelength->XYZ: Spectra. (line 115)
+* wavelength->chromaticity: Spectra. (line 123)
+* wavelength->XYZ: Spectra. (line 118)
* whole-page <1>: Rectangles. (line 11)
* whole-page: PostScript Graphing. (line 37)
* with-input-from-file: With-File. (line 9)
@@ -18688,8 +18765,8 @@ Procedure and Macro Index
* world:info: Solid Modeling. (line 24)
* wrap-command-interface: Database Extension. (line 7)
* write-base on base-table: The Base. (line 43)
-* write-byte: Byte. (line 72)
-* write-bytes: Byte. (line 108)
+* write-byte: Byte. (line 82)
+* write-bytes: Byte. (line 118)
* write-database: Using Databases. (line 79)
* write-database on relational-database: Database Operations. (line 26)
* write-line: Line I/O. (line 29)
@@ -18751,10 +18828,10 @@ Procedure and Macro Index
* xRGB->CIEXYZ: Color Conversions. (line 51)
* xrgb->color: Color Spaces. (line 215)
* xRGB->sRGB: Color Conversions. (line 54)
-* xyY->XYZ: Spectra. (line 188)
-* xyY:normalize-colors: Spectra. (line 190)
-* XYZ->chromaticity: Spectra. (line 165)
-* XYZ->xyY: Spectra. (line 184)
+* xyY->XYZ: Spectra. (line 191)
+* xyY:normalize-colors: Spectra. (line 193)
+* XYZ->chromaticity: Spectra. (line 168)
+* XYZ->xyY: Spectra. (line 187)
* y-axis: Legending. (line 48)
* zenith-xyy: Daylight. (line 70)
* zip: SRFI-1. (line 98)
@@ -18873,7 +18950,7 @@ Concept and Feature Index
* base-table: Base Table. (line 6)
* batch: Batch. (line 6)
* bignum: Feature. (line 13)
-* binary: Byte. (line 66)
+* binary: Byte. (line 76)
* binary trees: Weight-Balanced Trees.
(line 8)
* binary trees, as discrete maps: Weight-Balanced Trees.
@@ -18899,9 +18976,9 @@ Concept and Feature Index
* chapter-order: Chapter Ordering. (line 6)
* charplot: Character Plotting. (line 6)
* Chroma: Color Spaces. (line 141)
-* cie1931: Spectra. (line 31)
+* cie1931: Spectra. (line 32)
* cie1964: Spectra. (line 27)
-* ciexyz: Spectra. (line 35)
+* ciexyz: Spectra. (line 37)
* CIEXYZ: Color Spaces. (line 18)
* cksum-string: Cyclic Checksum. (line 160)
* coerce: Type Coercion. (line 6)
@@ -18946,10 +19023,11 @@ Concept and Feature Index
(line 18)
* discrete maps, using binary trees: Weight-Balanced Trees.
(line 52)
-* DrScheme: Installation. (line 103)
+* DrScheme: Installation. (line 138)
* dynamic: Dynamic Data Type. (line 6)
* dynamic-wind: Dynamic-Wind. (line 6)
* e-sRGB: Color Spaces. (line 218)
+* ELK: Installation. (line 134)
* emacs: Transactions. (line 33)
* Encapsulated-PostScript: PostScript Graphing. (line 23)
* escaped: URI. (line 77)
@@ -18958,32 +19036,32 @@ Concept and Feature Index
* eval: Eval. (line 6)
* exchanger: Miscellany. (line 22)
* factor: Prime Numbers. (line 6)
-* FDL, GNU Free Documentation License: Copying This Manual. (line 6)
-* feature <1>: About this manual. (line 18)
+* feature <1>: About this manual. (line 13)
* feature <2>: Require. (line 18)
* feature: Feature. (line 6)
* File Transfer Protocol: URI. (line 113)
* file-lock: Transactions. (line 32)
+* filename <1>: Batch. (line 148)
* filename: Filenames. (line 6)
* fluid-let: Fluid-Let. (line 6)
* fold: Parsing XML. (line 400)
* form: HTML. (line 63)
* format: Format. (line 6)
-* Gambit-C: Installation. (line 116)
+* Gambit-C 3.0: Installation. (line 148)
* gamut: Color Spaces. (line 18)
* generic-write: Generic-Write. (line 6)
+* getenv: System Interface. (line 6)
* getit: URI. (line 118)
* getopt <1>: Command Example. (line 14)
* getopt: Getopt. (line 6)
* getopt-parameters <1>: Command Example. (line 12)
* getopt-parameters: Getopt Parameter lists.
- (line 6)
-* glob <1>: Batch. (line 148)
+ (line 6) |
* glob: Filenames. (line 6)
* Gray code: Hilbert Space-Filling Curve.
(line 52)
* guarded-cond-clause: Guarded COND Clause. (line 6)
-* Guile: Installation. (line 119)
+* Guile: Installation. (line 157)
* hash: Hashing. (line 6)
* hash-table: Hash Tables. (line 6)
* Hilbert: Hilbert Space-Filling Curve.
@@ -19002,7 +19080,7 @@ Concept and Feature Index
* ICC Profile: Color Spaces. (line 191)
* implcat: Catalog Vicinities. (line 23)
* indexed-sequential-access-method: Byte/Number Conversions.
- (line 128) |
+ (line 128)
* inexact: Feature. (line 13)
* infix: Rule Types. (line 19)
* Info: Top-level Variable References.
@@ -19016,15 +19094,17 @@ Concept and Feature Index
* Japanese: Extra-SLIB Packages. (line 53)
* JFILTER: Extra-SLIB Packages. (line 53)
* JIS: Extra-SLIB Packages. (line 53)
+* Kawa: Installation. (line 154)
* L*a*b*: Color Spaces. (line 68)
* L*C*h: Color Spaces. (line 135)
* L*u*v*: Color Spaces. (line 98)
* lamination: Hilbert Space-Filling Curve.
(line 88)
+* Larceny: Installation. (line 125)
* Left Denotation, led: Nud and Led Definition.
(line 13)
* let-values: Binding to multiple values.
- (line 11) |
+ (line 11)
* Lightness: Color Spaces. (line 71)
* line-i: Line I/O. (line 6)
* list-processing library: SRFI-1. (line 8)
@@ -19053,7 +19133,7 @@ Concept and Feature Index
* minimize: Minimizing. (line 6)
* minimum field width (printf): Standard Formatted Output.
(line 88)
-* MIT Scheme: Installation. (line 113)
+* MIT Scheme: Installation. (line 145)
* mkimpcat.scm: Catalog Vicinities. (line 28)
* mklibcat.scm: Catalog Vicinities. (line 16)
* modular: Modular Arithmetic. (line 6)
@@ -19061,7 +19141,7 @@ Concept and Feature Index
(line 6)
* multiarg-apply: Multi-argument Apply.
(line 6)
-* MzScheme: Installation. (line 104)
+* MzScheme: Installation. (line 139)
* nary: Rule Types. (line 23)
* ncbi-dma: NCBI-DNA. (line 6)
* new-catalog: Catalog Creation. (line 48)
@@ -19090,7 +19170,7 @@ Concept and Feature Index
* pgm-raw: Portable Image Files.
(line 26)
* plain-text: HTML. (line 14)
-* PLT Scheme: Installation. (line 102)
+* PLT Scheme: Installation. (line 137)
* pnm: Portable Image Files.
(line 6)
* portable bitmap graphics: Portable Image Files.
@@ -19115,6 +19195,8 @@ Concept and Feature Index
* priority-queue: Priority Queues. (line 6)
* PRNG: Random Numbers. (line 6)
* process: Multi-Processing. (line 6)
+* program-arguments <1>: System Interface. (line 19)
+* program-arguments: Getopt. (line 102)
* Prolog: Extra-SLIB Packages. (line 49)
* promise: Promises. (line 6)
* PSD: Extra-SLIB Packages. (line 26)
@@ -19163,9 +19245,9 @@ Concept and Feature Index
* SCHELOG: Extra-SLIB Packages. (line 49)
* scheme: URI. (line 99)
* Scheme Request For Implementation: SRFI. (line 8)
-* Scheme48: Installation. (line 137)
+* Scheme48: Installation. (line 175)
* schmooz: Schmooz. (line 6)
-* SCM: Installation. (line 97)
+* SCM: Installation. (line 120)
* script: Installation. (line 37)
* self-set: Commutative Rings. (line 17)
* Sequence Comparison: Sequence Comparison. (line 6)
@@ -19175,6 +19257,7 @@ Concept and Feature Index
(line 52)
* shell: Command Line. (line 12)
* sierpinski: Sierpinski Curve. (line 6)
+* SISC: Installation. (line 151)
* sitecat: Catalog Vicinities. (line 19)
* sky: Daylight. (line 6)
* slib: Installation. (line 37)
@@ -19195,7 +19278,7 @@ Concept and Feature Index
* srfi-1: SRFI-1. (line 6)
* srfi-11 <1>: SRFI. (line 37)
* srfi-11: Binding to multiple values.
- (line 11) |
+ (line 11)
* srfi-2 <1>: SRFI. (line 33)
* srfi-2: Guarded LET* special form.
(line 6)
@@ -19216,6 +19299,7 @@ Concept and Feature Index
* srfi-94: SRFI. (line 53)
* srfi-95 <1>: SRFI. (line 56)
* srfi-95: Sorting. (line 6)
+* srfi-96: SRFI. (line 58)
* sRGB: Color Spaces. (line 189)
* stdio: Standard Formatted I/O.
(line 14)
@@ -19232,6 +19316,7 @@ Concept and Feature Index
(line 32)
* syntax-case <1>: Syntax-Case Macros. (line 6)
* syntax-case: Library Catalogs. (line 43)
+* system: System Interface. (line 13)
* time: Time and Date. (line 16)
* time-zone: Time Zone. (line 63)
* top-level variable references: Top-level Variable References.
@@ -19262,7 +19347,7 @@ Concept and Feature Index
* variable references: Top-level Variable References.
(line 6)
* vet: Module Analysis. (line 6)
-* VSCM: Installation. (line 148)
+* VSCM: Installation. (line 186)
* WB: Base Table. (line 34)
* wb-table: Base Table. (line 32)
* weight-balanced binary trees: Weight-Balanced Trees.
@@ -19275,249 +19360,248 @@ Concept and Feature Index
* wt-tree: Weight-Balanced Trees.
(line 6)
* xRGB: Color Spaces. (line 204)
-* xyY: Spectra. (line 175)
+* xyY: Spectra. (line 178)
* yasos: Yasos. (line 6)

Tag Table:
-Node: Top889
-Node: The Library System2001
-Node: Feature2668
-Ref: Feature-Footnote-14767
-Node: Require5277
-Node: Library Catalogs7690
-Node: Catalog Creation9121
-Node: Catalog Vicinities11496
-Node: Compiling Scheme14256
-Node: Module Conventions14906
-Ref: Module Conventions-Footnote-116211
-Node: Module Manifests16577
-Node: Module Semantics22049
-Node: Top-level Variable References23667
-Ref: Top-level Variable References-Footnote-125626
-Node: Module Analysis26067
-Node: Universal SLIB Procedures27172
-Node: Vicinity27787
-Node: Configuration31642
-Node: Input/Output34614
-Node: System39059
-Node: Miscellany42321
-Node: Scheme Syntax Extension Packages44303
-Node: Defmacro45241
-Node: R4RS Macros47217
-Node: Macro by Example48481
-Node: Macros That Work51379
-Node: Syntactic Closures57373
-Node: Syntax-Case Macros74901
-Node: Define-Structure78832
-Node: Define-Record-Type80808
-Node: Fluid-Let81441
-Node: Binding to multiple values82411
-Node: Guarded LET* special form83253
-Node: Guarded COND Clause83605
-Node: Yasos85390
-Node: Yasos terms86202
-Node: Yasos interface87240
-Node: Setters89336
-Node: Yasos examples91995
-Node: Textual Conversion Packages94953
-Node: Precedence Parsing95806
-Node: Precedence Parsing Overview96491
-Ref: Precedence Parsing Overview-Footnote-196872
-Node: Rule Types98121
-Node: Ruleset Definition and Use99576
-Node: Token definition101959
-Node: Nud and Led Definition104567
-Node: Grammar Rule Definition107028
-Node: Format114624
-Node: Format Interface114938
-Node: Format Specification116688
-Node: Standard Formatted I/O127633
-Node: Standard Formatted Output128221
-Node: Standard Formatted Input137679
-Node: Programs and Arguments144356
-Node: Getopt144864
-Node: Command Line151411
-Node: Parameter lists154609
-Node: Getopt Parameter lists158515
-Node: Filenames161756
-Node: Batch165666
-Node: HTML173574
-Node: HTML Tables180016
-Node: HTTP and CGI186548
-Node: Parsing HTML191097
-Node: URI193604
-Node: Parsing XML198351
-Node: Printing Scheme263178
-Node: Generic-Write263643
-Node: Object-To-String265118
-Node: Pretty-Print265593
-Node: Time and Date268638
-Node: Time Zone269756
-Node: Posix Time274561
-Node: Common-Lisp Time276791
-Node: Time Infrastructure278473
-Node: NCBI-DNA278877
-Node: Schmooz280451
-Node: Mathematical Packages284754
-Node: Bit-Twiddling285509
-Node: Modular Arithmetic294513
-Node: Irrational Integer Functions296944
-Node: Irrational Real Functions297973
-Node: Prime Numbers301577
-Node: Random Numbers303281
-Node: Exact Random Numbers304123
-Node: Inexact Random Numbers306395
-Node: Discrete Fourier Transform308229
-Node: Cyclic Checksum310664
-Node: Graphing318294
-Node: Character Plotting318489
-Node: PostScript Graphing324001
-Node: Column Ranges325780
-Node: Drawing the Graph327259
-Node: Graphics Context328354
-Node: Rectangles330173
-Node: Legending331620
-Node: Legacy Plotting333849
-Node: Example Graph334861
-Node: Solid Modeling339228
-Node: Color358737
-Node: Color Data-Type359573
-Ref: Color Data-Type-Footnote-1328920
-Node: Color Spaces363964
-Ref: Color Spaces-Footnote-1338921
-Node: Spectra373883
-Node: Color Difference Metrics382648
-Node: Color Conversions385330
-Node: Color Names387474
-Node: Daylight394410
-Node: Root Finding399099
-Node: Minimizing403058
-Ref: Minimizing-Footnote-1370311
-Node: The Limit405100
-Node: Commutative Rings409970
-Node: Matrix Algebra421381
-Node: Database Packages423487
-Node: Relational Database423770
-Node: Using Databases424637
-Node: Table Operations431143
-Node: Single Row Operations432354
-Node: Match-Keys434601
-Node: Multi-Row Operations436680
-Node: Indexed Sequential Access Methods439071
-Node: Sequential Index Operations440079
-Node: Table Administration442435
-Node: Database Interpolation443302
-Node: Embedded Commands444404
-Node: Database Extension445978
-Node: Command Intrinsics448103
-Node: Define-tables Example449665
-Node: The *commands* Table451315
-Node: Command Service453593
-Node: Command Example455555
-Node: Database Macros460108
-Node: Within-database460993
-Node: Within-database Example463900
-Node: Database Browser465687
-Node: Relational Infrastructure466763
-Node: Base Table467067
-Node: The Base469575
-Node: Base Tables472693
-Node: Base Field Types474169
-Node: Composite Keys474952
-Node: Base Record Operations477006
-Node: Match Keys478734
-Node: Aggregate Base Operations479615
-Node: Base ISAM Operations480680
-Node: Catalog Representation481998
-Node: Relational Database Objects484667
-Node: Database Operations487311
-Node: Weight-Balanced Trees491020
-Node: Construction of Weight-Balanced Trees494906
-Node: Basic Operations on Weight-Balanced Trees498372
-Node: Advanced Operations on Weight-Balanced Trees501239
-Node: Indexing Operations on Weight-Balanced Trees507280
-Node: Other Packages511121
-Node: Data Structures511650
-Node: Arrays512491
-Node: Subarrays523379
-Node: Array Mapping525621
-Node: Array Interpolation528831
-Node: Association Lists530095
-Node: Byte532371
-Node: Byte/Number Conversions537964
-Node: MAT-File Format545535
-Node: Portable Image Files546814
-Node: Collections548444
-Node: Dynamic Data Type554710
-Node: Hash Tables555989
-Node: Object558577
-Node: Priority Queues566860
-Node: Queues567715
-Node: Records568960
-Node: Sorting and Searching572470
-Node: Common List Functions573163
-Node: List construction573620
-Node: Lists as sets575335
-Node: Lists as sequences581873
-Node: Destructive list operations587100
-Node: Non-List functions589778
-Node: Tree Operations590867
-Node: Chapter Ordering592560
-Node: Sorting594207
-Node: Topological Sort598492
-Node: Hashing600200
-Node: Space-Filling Curves601217
-Node: Hilbert Space-Filling Curve601521
-Node: Peano Space-Filling Curve605411
-Node: Sierpinski Curve606517
-Node: Soundex608981
-Node: String Search610579
-Node: Sequence Comparison613152
-Node: Procedures616282
-Node: Type Coercion616810
-Node: String-Case617242
-Node: String Ports619069
-Node: Line I/O619841
-Node: Multi-Processing621890
-Node: Metric Units623008
-Node: Standards Support631287
-Node: RnRS632083
-Node: With-File633306
-Node: Transcripts633582
-Node: Rev2 Procedures633916
-Node: Rev4 Optional Procedures635649
-Node: Multi-argument / and -636118
-Node: Multi-argument Apply636528
-Node: Rationalize636865
-Node: Promises638027
-Node: Dynamic-Wind638473
-Node: Eval639741
-Node: Values643086
-Node: SRFI643901
-Node: SRFI-1645988
-Node: Session Support650546
-Node: Repl651120
-Node: Quick Print652416
-Node: Debug653722
-Node: Breakpoints654629
-Node: Trace656671
-Node: System Interface659897
-Node: Directories660468
-Node: Transactions661961
-Node: CVS667472
-Node: Extra-SLIB Packages668639
-Node: About SLIB670948
-Node: Installation671733
-Node: The SLIB script677640
-Node: Porting678193
-Ref: Porting-Footnote-1639950
-Node: Coding Guidelines679757
-Node: Copyrights682171
-Node: About this manual685540
-Node: Copying This Manual686172
-Node: How to use this License for your documents707206
-Node: Index708724
+Node: Top844
+Node: The Library System1911
+Node: Feature2578
+Ref: Feature-Footnote-14779
+Node: Require5169
+Node: Library Catalogs7582
+Node: Catalog Creation9013
+Node: Catalog Vicinities11388
+Node: Compiling Scheme14148
+Node: Module Conventions14798
+Ref: Module Conventions-Footnote-116223
+Node: Module Manifests16469
+Node: Module Semantics21941
+Node: Top-level Variable References23559
+Ref: Top-level Variable References-Footnote-125638
+Node: Module Analysis25959
+Node: Universal SLIB Procedures27064
+Node: Vicinity27679
+Node: Configuration31534
+Node: Input/Output34506
+Node: System38461
+Node: Miscellany41631
+Node: Scheme Syntax Extension Packages43534
+Node: Defmacro44472
+Node: R4RS Macros46448
+Node: Macro by Example47712
+Node: Macros That Work50610
+Node: Syntactic Closures56604
+Node: Syntax-Case Macros74132
+Node: Define-Structure78063
+Node: Define-Record-Type80039
+Node: Fluid-Let80672
+Node: Binding to multiple values81642
+Node: Guarded LET* special form82241
+Node: Guarded COND Clause82593
+Node: Yasos84378
+Node: Yasos terms85190
+Node: Yasos interface86228
+Node: Setters88324
+Node: Yasos examples90983
+Node: Textual Conversion Packages93941
+Node: Precedence Parsing94794
+Node: Precedence Parsing Overview95479
+Ref: Precedence Parsing Overview-Footnote-196884
+Node: Rule Types97109
+Node: Ruleset Definition and Use98564
+Node: Token definition100947
+Node: Nud and Led Definition103555
+Node: Grammar Rule Definition106016
+Node: Format113612
+Node: Format Interface113891
+Node: Format Specification115641
+Node: Standard Formatted I/O126586
+Node: Standard Formatted Output127174
+Node: Standard Formatted Input136632
+Node: Programs and Arguments143309
+Node: Getopt143808
+Node: Command Line150431
+Node: Parameter lists153629
+Node: Getopt Parameter lists157535
+Node: Filenames160776
+Node: Batch164722
+Node: HTML172612
+Node: HTML Tables179054
+Node: HTTP and CGI185586
+Node: Parsing HTML190135
+Node: URI192642
+Node: Parsing XML197310
+Node: Printing Scheme230196
+Node: Generic-Write230523
+Node: Object-To-String231939
+Node: Pretty-Print232358
+Node: Time and Date235343
+Node: Time Zone236400
+Node: Posix Time241142
+Node: Common-Lisp Time243310
+Node: Time Infrastructure244936
+Node: NCBI-DNA245287
+Node: Schmooz246659
+Node: Mathematical Packages250895
+Node: Bit-Twiddling251650
+Node: Modular Arithmetic260195
+Node: Irrational Integer Functions262626
+Node: Irrational Real Functions263655
+Node: Prime Numbers267259
+Node: Random Numbers268963
+Node: Exact Random Numbers269805
+Node: Inexact Random Numbers272077
+Node: Discrete Fourier Transform273911
+Node: Cyclic Checksum276346
+Node: Graphing283976
+Node: Character Plotting284171
+Node: PostScript Graphing289683
+Node: Column Ranges291462
+Node: Drawing the Graph292941
+Node: Graphics Context294036
+Node: Rectangles295855
+Node: Legending297302
+Node: Legacy Plotting299531
+Node: Example Graph300543
+Node: Solid Modeling304910
+Node: Color324419
+Node: Color Data-Type325255
+Ref: Color Data-Type-Footnote-1328905
+Node: Color Spaces329646
+Ref: Color Spaces-Footnote-1338906
+Node: Spectra339565
+Node: Color Difference Metrics348676
+Node: Color Conversions351358
+Node: Color Names353502
+Node: Daylight360438
+Node: Root Finding365127
+Node: Minimizing369007
+Ref: Minimizing-Footnote-1370431
+Node: The Limit371049
+Node: Commutative Rings375919
+Node: Matrix Algebra387330
+Node: Database Packages388861
+Node: Relational Database389144
+Node: Using Databases390011
+Node: Table Operations396517
+Node: Single Row Operations397728
+Node: Match-Keys399975
+Node: Multi-Row Operations402054
+Node: Indexed Sequential Access Methods404445
+Node: Sequential Index Operations405453
+Node: Table Administration407809
+Node: Database Interpolation408676
+Node: Embedded Commands409778
+Node: Database Extension411352
+Node: Command Intrinsics413477
+Node: Define-tables Example415039
+Node: The *commands* Table416689
+Node: Command Service418967
+Node: Command Example420929
+Node: Database Macros425482
+Node: Within-database426367
+Node: Within-database Example429274
+Node: Database Browser431061
+Node: Relational Infrastructure432137
+Node: Base Table432441
+Node: The Base434949
+Node: Base Tables438067
+Node: Base Field Types439543
+Node: Composite Keys440326
+Node: Base Record Operations442380
+Node: Match Keys444108
+Node: Aggregate Base Operations444989
+Node: Base ISAM Operations446054
+Node: Catalog Representation447372
+Node: Relational Database Objects450041
+Node: Database Operations452685
+Node: Weight-Balanced Trees456394
+Node: Construction of Weight-Balanced Trees460280
+Node: Basic Operations on Weight-Balanced Trees463746
+Node: Advanced Operations on Weight-Balanced Trees466613
+Node: Indexing Operations on Weight-Balanced Trees472654
+Node: Other Packages476495
+Node: Data Structures477024
+Node: Arrays477865
+Node: Subarrays486552
+Node: Array Mapping488794
+Node: Array Interpolation491594
+Node: Association Lists492858
+Node: Byte495134
+Node: Byte/Number Conversions502020
+Node: MAT-File Format509546
+Node: Portable Image Files510825
+Node: Collections512455
+Node: Dynamic Data Type518569
+Node: Hash Tables519848
+Node: Object522436
+Node: Priority Queues530719
+Node: Queues531574
+Node: Records532819
+Node: Sorting and Searching536329
+Node: Common List Functions537022
+Node: List construction537479
+Node: Lists as sets539194
+Node: Lists as sequences545732
+Node: Destructive list operations550959
+Node: Non-List functions553637
+Node: Tree Operations554726
+Node: Chapter Ordering556419
+Node: Sorting558066
+Node: Topological Sort561592
+Node: Hashing563300
+Node: Space-Filling Curves564317
+Node: Hilbert Space-Filling Curve564621
+Node: Peano Space-Filling Curve568511
+Node: Sierpinski Curve569617
+Node: Soundex572081
+Node: String Search573679
+Node: Sequence Comparison576252
+Node: Procedures579382
+Node: Type Coercion579910
+Node: String-Case580342
+Node: String Ports582169
+Node: Line I/O582941
+Node: Multi-Processing584990
+Node: Metric Units586108
+Node: Standards Support594387
+Node: RnRS595183
+Node: With-File596406
+Node: Transcripts596682
+Node: Rev2 Procedures597016
+Node: Rev4 Optional Procedures598749
+Node: Multi-argument / and -599218
+Node: Multi-argument Apply599628
+Node: Rationalize599965
+Node: Promises601127
+Node: Dynamic-Wind601573
+Node: Eval602841
+Node: Values606186
+Node: SRFI607001
+Node: SRFI-1608641
+Node: Session Support613148
+Node: Repl613722
+Node: Quick Print615018
+Node: Debug616324
+Node: Breakpoints617231
+Node: Trace619273
+Node: System Interface622499
+Node: Directories623552
+Node: Transactions625045
+Node: CVS631516
+Node: Extra-SLIB Packages632683
+Node: About SLIB635024
+Node: Installation635969
+Node: The SLIB script645771
+Node: Porting646270
+Ref: Porting-Footnote-1642993
+Node: Coding Guidelines647834
+Node: Copyrights650248
+Node: About this manual653617
+Node: GNU Free Documentation License654527
+Node: Index677185

End Tag Table