Common Lisp Package: CXML-RNG

@code{cxml-rng} implements @a[http://relaxng.org/spec-20011203.html]{ Relax NG} schema validation for Closure XML. Support for @a[http://relaxng.org/compact-20021121.html]{Compact Syntax} and @a[http://relaxng.org/compatibility-20011203.html]{DTD Compatibility} is included. @begin[Example]{section} @begin{pre}(cxml:parse-file "test.xml" (cxml-rng:make-validator (cxml-rng:parse-schema #p"test.rng"))) @end{pre} @end{section} @begin[Classes]{section} @aboutclass{schema} @aboutclass{rng-error} @aboutclass{dtd-compatibility-error} @end{section} @begin[Parsing and validating]{section} @aboutfun{parse-schema} @aboutfun{parse-compact} @aboutfun{make-validator} @aboutfun{make-dtd-compatibility-handler} @aboutfun{serialize-grammar} @end{section} @begin[Grammar introspection]{section} The following classes and function are exported so that users can take a peek at the internals of the parsed and simplified grammar. @aboutfun{schema-start} @aboutclass{attribute} @aboutclass{choice} @aboutclass{data} @aboutclass{element} @aboutclass{empty} @aboutclass{group} @aboutclass{interleave} @aboutclass{list-pattern} @aboutclass{not-allowed} @aboutclass{one-or-more} @aboutclass{pattern} @aboutclass{ref} @aboutclass{text} @aboutclass{value} @aboutfun{pattern-child} @aboutfun{pattern-a} @aboutfun{pattern-b} @aboutfun{pattern-name} @aboutfun{pattern-element} @aboutfun{pattern-type} @aboutfun{pattern-string} @aboutfun{pattern-value} @aboutfun{pattern-params} @aboutfun{pattern-except} @end{section}

README:

FUNCTION

Public

ANY-NAME-EXCEPT (INSTANCE)

@arg[instance]{an instance of @class{any-name}} @return{a @class{name-class} or @code{nil}} Return the name class @em{not} allowed by this @code{any-name}, or @code{nil} if there is no such exception.

ATTRIBUTE (LNAME ATTRS)

@unexport{}

MAKE-DTD-COMPATIBILITY-HANDLER (SCHEMA HANDLER)

@arg[schema]{the parsed Relax NG @class{schema} object} @arg[handler]{an additional SAX handler to broadcast events to} @return{a SAX handler} @short{This function creates a handler for DTD Compatibility processing} according to @code{schema}. The validation handler processes SAX events and can be used with any function generating such events, in particular with cxml:parse-file. Compatibility processing consists of two steps: Infoset modification for default values, and soundness checking for attributes with an ID-type. In @code{sax:start-element}, infoset modification will be performed as specified for DTD compatibility. This entails addition of attributes according to their defaultValue, and addition (and, when the element ends, removal) of suitable namespace declarations if no prefix has been declared for the defaulted attribute yet. Also in @code{sax:start-element}, the handler checks that no ID is declared more than once. Before the end of the document, the handler checks that all IDs referred to by attributes with ID-types IDREF or IDREFS have been declared. @see{parse-schema} @see{make-validator}

MAKE-VALIDATING-SOURCE (INPUT SCHEMA)

@arg[input]{a @code{source} or a stream designator} @arg[schema]{the parsed Relax NG @class{schema} object} @return{a klacks source} @short{This function creates a klacks source for @code{input} that validates events against @code{schema}.} Input can be a klacks source or any argument applicable to @code{cxml:make-source}. @see{parse-schema} @see{make-validator}

MAKE-VALIDATOR (SCHEMA &OPTIONAL HANDLER)

@arg[schema]{the parsed Relax NG @class{schema} object} @arg[handler]{an additional SAX handler to broadcast events to} @return{a SAX handler} @short{This function creates a validation handler for @code{schema}}, to be used for validation of a document against that schema. The validation handler processes SAX events and can be used with any function generating such events, in particular with cxml:parse-file. Events will be passed on unchanged to @code{handler}. This validator does @em{not} perform DTD compatibility processing. (Specify a DTD compatibility handler as the second argument to this function instead.) @see{parse-schema} @see{make-validating-source} @see{make-dtd-compatibility-handler}

NAME-CLASS-CHOICE-A (INSTANCE)

@arg[instance]{an instance of @class{name-class-choice}} @return{a @class{name-class}} Returns the 'first' of two name classes that are allowed. @see{name-class-choice-b}

NAME-CLASS-CHOICE-B (INSTANCE)

@arg[instance]{an instance of @class{name-class-choice}} @return{a @class{name-class}} Returns the 'second' of two name classes that are allowed. @see{name-class-choice-a}

NAME-LNAME (INSTANCE)

@arg[instance]{an instance of @class{name}} @return{a string} Return the expected local name.

NAME-URI (INSTANCE)

@arg[instance]{an instance of @class{name}} @return{a string} Return the expected namespace URI.

NS-NAME-EXCEPT (INSTANCE)

@arg[instance]{an instance of @class{ns-name}} @return{a @class{name-class} or @code{nil}} Return the name class @em{not} allowed by this @code{ns-name}, or @code{nil} if there is no such exception.

NS-NAME-URI (INSTANCE)

@arg[instance]{an instance of @class{ns-name}} @return{a string} Return the expected namespace URI.

PARSE-COMPACT (PATHNAME)

@arg[pathname]{a pathname designator for a Relax NG compact file} @return{a parsed @class{schema}} @short{This function parses a Relax NG schema file in compact syntax} and returns a parsed representation of that schema. @see{parse-schema} @see{make-validator}

PARSE-SCHEMA (INPUT &KEY ENTITY-RESOLVER (PROCESS-DTD-COMPATIBILITY T))

@arg[input]{a string, pathname, stream, or xstream} @arg[entity-resolver]{a function of two arguments, or NIL} @arg[process-dtd-compatibility]{a boolean} @return{a parsed @class{schema}} @short{This function parses a Relax NG schema file in XML syntax} and returns a parsed representation of that schema. @code{input} can be any stream designator as understood by @code{cxml:make-source}. Note that namestrings are not valid arguments, because they would be interpreted as XML source code. Use pathnames instead. @code{entity-resolver} can be passed as a function of two arguments. It is invoked for every entity referenced by the document with the entity's Public ID (a rod) and System ID (an URI object) as arguments. The function may either return nil, CXML will then try to resolve the entity as usual. Alternatively it may return a Common Lisp stream specialized on @code{(unsigned-byte 8)} which will be used instead. If @code{process-dtd-compatibility} is true, the schema will be checked for @em{compatibility} with Relax NG DTD Compatibility, and default values will be recorded. (Without @code{process-dtd-compatibility}, the schema will not be checked @em{compatibility}, and annotations for DTD Compatibility will be ignored like any other foreign element.) @see{parse-compact} @see{make-validator}

PATTERN-A (INSTANCE)

@arg[instance]{an instance of @class{pattern}} @return{an instance of @class{pattern}} @short{Returns the first of two sub-patterns the pattern instance has.} (Elements in the full Relax NG syntax allow more than two child patterns, but simplification normalizes the representation so that any such element has exactly two children.) @see{pattern-b} @see{group} @see{interleave} @see{choice}

PATTERN-B (INSTANCE)

@arg[instance]{an instance of @class{pattern}} @return{an instance of @class{pattern}} @short{Returns the second of two sub-patterns the pattern instance has.} (Elements in the full Relax NG syntax allow more than two child patterns, but simplification normalizes the representation so that any such element has exactly two children.) @see{pattern-a} @see{group} @see{interleave} @see{choice}

PATTERN-CHILD (INSTANCE)

@arg[instance]{an instance of @class{pattern}} @return{an instance of @class{pattern}} @short{Returns the pattern's sub-pattern.} (Elements in the full Relax NG syntax allow more than one child pattern, but simplification normalizes the representation so that any such element has exactly one child.) @see{element} @see{attribute} @see{one-or-more} @see{list-pattern} @see{choice}

PATTERN-ELEMENT (REF)

@arg[ref]{an instance of @class{ref}} @return{an instance of @class{element}} @short{Returns the ref pattern's target.} @code{ref} is the only pattern to introduce shared structure and circularity into the pattern graph, by referring to elements defined elsewhere. (@code{ref} patterns in the full Relax NG syntax can be used to refer to any pattern definition in the grammar. Simplification normalizes the schema so that ref patterns only refer to definitions which have an @code{element} as their child.)

PATTERN-EXCEPT (INSTANCE)

@arg[instance]{an instance of @class{data}} @return{a @class{pattern}, or @code{nil}} @short{Returns the @code{data} instance's @code{except} pattern.} In addition to a data type, @code{data} can specify that certain values are @em{not} permitted. They are described using a pattern. If this slot is @code{nil}, no exception is defined.

PATTERN-NAME (INSTANCE)

@arg[instance]{an instance of @class{pattern}} @return{a @class{name-class}} @short{Returns the @code{pattern}'s name class.} This slot describes the name allowed for the current element or attribute. @see{element} @see{attribute}

PATTERN-PARAMS (INSTANCE)

@arg[instance]{an instance of @class{data}} @return{a list of @fun{cxml-types:param}} @short{The data type parameters for this data pattern.} (With the XSD type library, these are known as restricting facets.)

PATTERN-STRING (INSTANCE)

@arg[instance]{an instance of @class{value}} @return{a string} @short{Returns the string expected at this position.} This string is the lexical representation expected, not parsed into a value object yet. The parsed object is available as @fun{pattern-value}. @see{pattern-type}

PATTERN-TYPE (INSTANCE)

@arg[instance]{an instance of @class{pattern}} @return{a @class{cxml-types:data-type}} @short{Returns the data type expected at this position.} This type has already been parsed into an object. Its name and the URI of its library can be queried from that object. @see{data} @see{value} @see{cxml-types:type-name} @see{cxml-types:type-library}

PATTERN-VALUE (INSTANCE)

@arg[instance]{an instance of @class{value}} @return{an object as returned by @fun{cxml-types:parse}} @short{Returns the value expected at this position.} This object is the result of parsing @fun{pattern-string} using @fun{pattern-type}.

RNG-ERROR (SOURCE FMT &REST ARGS)

@unexport{}

SCHEMA-START (INSTANCE)

@arg[instance]{an instance of @class{schema}} @return{the start pattern, an instance of @class{pattern}} Reader function for the grammar's start pattern, from which all of the grammar's patters are reachable.

SERIALIZE-SCHEMA (SCHEMA SINK)

@arg[schema]{a Relax NG @class{schema}} @arg[sink]{a SAX handler} @return{the result of @code{sax:end-document}} @short{This function serializes a parsed Relax NG back into XML syntax.} Note that the schema represented in memory has gone through simplification as is textually different from the original XML document. @see{parse-schema}

Undocumented

SETFANY-NAME-EXCEPT (NEW-VALUE INSTANCE)

SETFNAME-CLASS-CHOICE-A (NEW-VALUE INSTANCE)

SETFNAME-CLASS-CHOICE-B (NEW-VALUE INSTANCE)

SETFNAME-LNAME (NEW-VALUE INSTANCE)

SETFNAME-URI (NEW-VALUE INSTANCE)

SETFNS-NAME-EXCEPT (NEW-VALUE INSTANCE)

SETFNS-NAME-URI (NEW-VALUE INSTANCE)

SETFPATTERN-A (NEW-VALUE INSTANCE)

SETFPATTERN-B (NEW-VALUE INSTANCE)

SETFPATTERN-CHILD (NEW-VALUE INSTANCE)

SETFPATTERN-EXCEPT (NEW-VALUE INSTANCE)

SETFPATTERN-NAME (NEW-VALUE INSTANCE)

SETFPATTERN-PARAMS (NEW-VALUE INSTANCE)

SETFPATTERN-STRING (NEW-VALUE INSTANCE)

SETFPATTERN-TYPE (NEW-VALUE INSTANCE)

SETFPATTERN-VALUE (NEW-VALUE INSTANCE)

SETFSCHEMA-START (NEW-VALUE INSTANCE)

Private

%LEAF-NULLABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

AFTER-A (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

AFTER-B (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

AFTER-NULLABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

CHOICE-A (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

CHOICE-B (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

CHOICE-NULLABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DEFN-CHILD (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DEFN-COMBINE-METHOD (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DEFN-HEAD-P (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DEFN-NAME (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DEFN-REDEFINITION (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DTD-ATTRIBUTES (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DTD-DEFAULT-VALUE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DTD-ELEMENTS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DTD-ID-TYPE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DTD-ID-TYPE-DECLARED-BY (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DTD-NAME (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DTD-VALUE-DECLARED-BY (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

ELEMENT-CHILD (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

ELEMENT-NAME (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

ELEMENT-NULLABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

EMPTY-NULLABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GRAMMAR-DEFINITIONS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GRAMMAR-PARENT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GRAMMAR-START (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GROUP-A (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GROUP-B (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

GROUP-NULLABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

INTERLEAVE-A (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

INTERLEAVE-B (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

INTERLEAVE-NULLABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

LIST-PATTERN-CHILD (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

LIST-PATTERN-NULLABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

NOT-ALLOWED-NULLABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

ONE-OR-MORE-CHILD (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

ONE-OR-MORE-NULLABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

PATTERN-CRDEPTH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

PATTERN-DEFAULT-VALUE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

PATTERN-NS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

PATTERN-NULLABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

PATTERN-TARGET (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SCHEMA-COMPATIBILITY-TABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SCHEMA-DEFINITIONS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SCHEMA-INTERNED-START (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SCHEMA-REGISTRATUR (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TEXT-NULLABLE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

Undocumented

%COMBINATION-P (OBJECT)

SETF%LEAF-NULLABLE (NEW-VALUE INSTANCE)

%LEAF-P (OBJECT)

%NAMED-PATTERN-P (OBJECT)

%PARENT-P (OBJECT)

%TYPED-PATTERN-P (OBJECT)

ADVANCE (HSX PATTERN MESSAGE &REST ARGS)

SETFAFTER-A (NEW-VALUE INSTANCE)

SETFAFTER-B (NEW-VALUE INSTANCE)

SETFAFTER-NULLABLE (NEW-VALUE INSTANCE)

AFTER-P (OBJECT)

ANY-NAME-P (OBJECT)

ASSERT-NAME-CLASS-FINITE (NC)

ATTRIBUTE-P (OBJECT)

ATTRIBUTES' (HANDLER PATTERN ATTRIBUTES)

CHECK-ATTRIBUTE-COMPATIBILITY/DEFAULT (PATTERN DEFAULT-VALUE)

CHECK-ATTRIBUTE-COMPATIBILITY/ID (PATTERN DEFAULT-VALUE)

CHECK-ELEMENT-OVERLAP-COMPATIBILITY (ELT1 ELT2)

CHECK-PATTERN-DEFINITIONS (SOURCE GRAMMAR)

CHECK-SCHEMA-COMPATIBILITY (SCHEMA DEFNS)

CHECK-START-RESTRICTIONS (PATTERN)

SETFCHOICE-A (NEW-VALUE INSTANCE)

SETFCHOICE-B (NEW-VALUE INSTANCE)

CHOICE-IFY (CHILDREN)

SETFCHOICE-NULLABLE (NEW-VALUE INSTANCE)

CHOICE-P (OBJECT)

CLASSES-OVERLAP-P (NC1 NC2)

COMPATIBILITY-TABLE-P (OBJECT)

CONSUME-AND-PARSE-CHARACTERS (SOURCE)

CONSUME-AND-SKIP-TO-NATIVE (SOURCE)

CONTENT-TYPE-MAX (A B)

COPY-%COMBINATION (INSTANCE)

COPY-%LEAF (INSTANCE)

COPY-%NAMED-PATTERN (INSTANCE)

COPY-%PARENT (INSTANCE)

COPY-%TYPED-PATTERN (INSTANCE)

COPY-AFTER (INSTANCE)

COPY-ANY-NAME (INSTANCE)

COPY-ATTRIBUTE (INSTANCE)

COPY-CHOICE (INSTANCE)

COPY-COMPATIBILITY-TABLE (INSTANCE)

COPY-DATA (INSTANCE)

COPY-DEFINITION (INSTANCE)

COPY-DTD-ATTRIBUTE (INSTANCE)

COPY-DTD-ELEMENT (INSTANCE)

COPY-DTD-MEMBER (INSTANCE)

COPY-ELEMENT (INSTANCE)

COPY-EMPTY (INSTANCE)

COPY-GRAMMAR (INSTANCE)

COPY-GROUP (INSTANCE)

COPY-INTERLEAVE (INSTANCE)

COPY-LIST-PATTERN (INSTANCE)

COPY-NAME (INSTANCE)

COPY-NAME-CLASS (INSTANCE)

COPY-NAME-CLASS-CHOICE (INSTANCE)

COPY-NOT-ALLOWED (INSTANCE)

COPY-NS-NAME (INSTANCE)

COPY-ONE-OR-MORE (INSTANCE)

COPY-PATTERN (INSTANCE)

COPY-PATTERN-TREE (PATTERN)

COPY-REF (INSTANCE)

COPY-SCHEMA (INSTANCE)

COPY-TEXT (INSTANCE)

COPY-VALUE (INSTANCE)

DATA-P (OBJECT)

DEFINITION-P (OBJECT)

SETFDEFN-CHILD (NEW-VALUE INSTANCE)

SETFDEFN-COMBINE-METHOD (NEW-VALUE INSTANCE)

SETFDEFN-HEAD-P (NEW-VALUE INSTANCE)

SETFDEFN-NAME (NEW-VALUE INSTANCE)

SETFDEFN-REDEFINITION (NEW-VALUE INSTANCE)

DESTRUCTURE-CNAME-LIKE (X)

DESTRUCTURE-NAME (SOURCE QNAME)

DTD-ATTRIBUTE-P (OBJECT)

SETFDTD-ATTRIBUTES (NEW-VALUE INSTANCE)

SETFDTD-DEFAULT-VALUE (NEW-VALUE INSTANCE)

DTD-ELEMENT-P (OBJECT)

SETFDTD-ELEMENTS (NEW-VALUE INSTANCE)

SETFDTD-ID-TYPE (NEW-VALUE INSTANCE)

SETFDTD-ID-TYPE-DECLARED-BY (NEW-VALUE INSTANCE)

DTD-MEMBER-P (OBJECT)

SETFDTD-NAME (NEW-VALUE INSTANCE)

SETFDTD-VALUE-DECLARED-BY (NEW-VALUE INSTANCE)

EAT (OK)

SETFELEMENT-CHILD (NEW-VALUE INSTANCE)

SETFELEMENT-NAME (NEW-VALUE INSTANCE)

SETFELEMENT-NULLABLE (NEW-VALUE INSTANCE)

ELEMENT-P (OBJECT)

SETFEMPTY-NULLABLE (NEW-VALUE INSTANCE)

EMPTY-P (OBJECT)

ENSURE-DTD-ATTRIBUTE (ATTRIBUTE-NAME ELEMENT TABLE)

ENSURE-DTD-ELEMENT (ELEMENT COMPATIBILITY-TABLE)

ENSURE-HASH (KEY TABLE FN)

ENSURE-REGISTRATUR (GRAMMAR)

ESCAPE-URI (STRING)

FINALIZE-DEFINITIONS (PATTERN)

FINALIZE-PATTERN (P)

FIND-DEFINITION (NAME &OPTIONAL (GRAMMAR *GRAMMAR*))

SETFFIND-DEFINITION (NEWVAL NAME &OPTIONAL (GRAMMAR *GRAMMAR*))

FLUSH

FLUSH-PENDING (HANDLER)

FOLLOW-RNC-URI (URI)

GETNAME (NAME TABLE)

SETFGETNAME (NEWVAL NAME TABLE)

SETFGRAMMAR-DEFINITIONS (NEW-VALUE INSTANCE)

GRAMMAR-P (OBJECT)

SETFGRAMMAR-PARENT (NEW-VALUE INSTANCE)

SETFGRAMMAR-START (NEW-VALUE INSTANCE)

SETFGROUP-A (NEW-VALUE INSTANCE)

SETFGROUP-B (NEW-VALUE INSTANCE)

SETFGROUP-NULLABLE (NEW-VALUE INSTANCE)

GROUP-P (OBJECT)

GROUPABLE-MAX (A B)

GROUPIFY (CHILDREN)

SETFINTERLEAVE-A (NEW-VALUE INSTANCE)

SETFINTERLEAVE-B (NEW-VALUE INSTANCE)

INTERLEAVE-IFY (CHILDREN)

SETFINTERLEAVE-NULLABLE (NEW-VALUE INSTANCE)

INTERLEAVE-P (OBJECT)

INTERN-ZERO-OR-MORE (HSX C)

INVOKE-WITH-ELEMENT (PREFIX LNAME ARGS BODY)

INVOKE-WITH-KLACKS-HANDLER (FN SOURCE)

INVOKE-WITH-LIBRARY-AND-NS (FN ATTRS)

LIST' (HSX PATTERN WORDS)

SETFLIST-PATTERN-CHILD (NEW-VALUE INSTANCE)

SETFLIST-PATTERN-NULLABLE (NEW-VALUE INSTANCE)

LIST-PATTERN-P (OBJECT)

LOOKUP-DATA-TYPE (NAME)

LOOKUP-DEFAULT

LOOKUP-PREFIX (PREFIX)

MAKE-%COMBINATION (&KEY ((NULLABLE DUM477) UNINITIALIZED) ((A DUM478) NIL) ((B DUM479) NIL))

MAKE-%LEAF (&KEY ((NULLABLE DUM698) UNINITIALIZED))

MAKE-%NAMED-PATTERN (&KEY ((NULLABLE DUM349) UNINITIALIZED) ((CHILD DUM350) NIL) ((NAME DUM351) NIL))

MAKE-%PARENT (&KEY ((NULLABLE DUM299) UNINITIALIZED) ((CHILD DUM300) NIL))

MAKE-%TYPED-PATTERN (&KEY ((NULLABLE DUM842) UNINITIALIZED) ((TYPE DUM843) NIL))

MAKE-AFTER (A B)

MAKE-ANY-NAME (EXCEPT)

MAKE-ATTRIBUTE (DEFAULT-VALUE)

MAKE-CHOICE (A B)

MAKE-COMPATIBILITY-TABLE (&KEY ((ELEMENTS DUM1133) (MAKE-HASH-TABLE TEST 'EQUAL)))

MAKE-DATA (&KEY ((NULLABLE DUM951) UNINITIALIZED) ((TYPE DUM952) NIL) ((PARAMS DUM953) NIL) ((EXCEPT DUM954) NIL))

MAKE-DEFINITION (&KEY ((NAME DUM1077) NIL) ((COMBINE-METHOD DUM1078) NIL) ((HEAD-P DUM1079) NIL) ((REDEFINITION DUM1080) NIL) ((CHILD DUM1081) NIL))

MAKE-DTD-ATTRIBUTE (NAME)

MAKE-DTD-ELEMENT (NAME)

MAKE-DTD-MEMBER (&KEY ((NAME DUM1186) (ERROR missing)))

MAKE-ELEMENT (&KEY ((NULLABLE DUM403) UNINITIALIZED) ((CHILD DUM404) NIL) ((NAME DUM405) NIL))

MAKE-EMPTY (&KEY ((NULLABLE DUM746) UNINITIALIZED))

MAKE-GRAMMAR (PARENT)

MAKE-GROUP (A B)

MAKE-INTERLEAVE (A B)

MAKE-LIST-PATTERN (CHILD)

MAKE-NAME (URI LNAME)

MAKE-NAME-CLASS (&KEY)

MAKE-NAME-CLASS-CHOICE (A B)

MAKE-NOT-ALLOWED (&KEY ((NULLABLE DUM1007) UNINITIALIZED))

MAKE-NS-NAME (URI EXCEPT)

MAKE-ONE-OR-MORE (CHILD)

MAKE-PATTERN (&KEY ((NULLABLE DUM217) UNINITIALIZED))

MAKE-REF (TARGET)

MAKE-RNG-LEXER (INPUT)

MAKE-SCHEMA (START DEFINITIONS)

MAKE-SCHEMA-SOURCE (INPUT)

MAKE-TEXT (&KEY ((NULLABLE DUM794) UNINITIALIZED))

MAKE-VALUE (&KEY ((NULLABLE DUM893) UNINITIALIZED) ((TYPE DUM894) NIL) ((NS DUM895) NIL) ((STRING DUM896) NIL) ((VALUE DUM897) NIL))

MISSING

MUNGE-SCHEMA-REF (URI)

NAME-CLASS-CHOICE-P (OBJECT)

NAME-CLASS-P (OBJECT)

NAME-P (OBJECT)

NAMED-STRING-XSTREAM (STR URI)

NC-NAME-P (STR)

SETFNOT-ALLOWED-NULLABLE (NEW-VALUE INSTANCE)

NOT-ALLOWED-P (OBJECT)

NS-ATTRIBUTE (URI-OR-INHERIT)

NS-NAME-P (OBJECT)

NTC (LNAME SOURCE-OR-ATTRS)

NULLABLE (PATTERN)

SETFONE-OR-MORE-CHILD (NEW-VALUE INSTANCE)

SETFONE-OR-MORE-NULLABLE (NEW-VALUE INSTANCE)

ONE-OR-MORE-P (OBJECT)

P/ATTRIBUTE (SOURCE NAME)

P/COMBINATION (ZIPPER SOURCE)

P/DATA (SOURCE)

P/ELEMENT (SOURCE NAME)

P/EMPTY (SOURCE)

P/EXCEPT-NAME-CLASS (SOURCE)

P/EXCEPT-NAME-CLASS? (SOURCE)

P/EXCEPT-PATTERN (SOURCE)

P/EXTERNAL-REF (SOURCE)

P/GRAMMAR (SOURCE &OPTIONAL GRAMMAR)

P/LIST (SOURCE)

P/MIXED (SOURCE)

P/NAME-CLASS (SOURCE)

P/NAME-CLASS* (SOURCE)

P/NOT-ALLOWED (SOURCE)

P/ONE-OR-MORE (SOURCE)

P/OPTIONAL (SOURCE)

P/PARAM (SOURCE)

P/PARENT-REF (SOURCE)

P/PATTERN (SOURCE)

P/PATTERN+ (SOURCE)

P/PATTERN? (SOURCE)

P/REF (SOURCE)

P/TEXT (SOURCE)

P/VALUE (SOURCE)

P/ZERO-OR-MORE (SOURCE)

PARSE-TEST (N &OPTIONAL (P /home/david/src/lisp/cxml-rng/spec-split/))

SETFPATTERN-CRDEPTH (NEW-VALUE INSTANCE)

SETFPATTERN-DEFAULT-VALUE (NEW-VALUE INSTANCE)

SETFPATTERN-NS (NEW-VALUE INSTANCE)

SETFPATTERN-NULLABLE (NEW-VALUE INSTANCE)

PATTERN-P (OBJECT)

SETFPATTERN-TARGET (NEW-VALUE INSTANCE)

PROCESS-DEFINE (SOURCE)

PROCESS-DIV (SOURCE)

PROCESS-DTD-ATTRIBUTE (HSX A ATTRIBUTES)

PROCESS-GRAMMAR-CONTENT* (SOURCE &KEY DISALLOW-INCLUDE)

PROCESS-INCLUDE (SOURCE)

PROCESS-START (SOURCE)

READ-NIST-GRAMMAR (HREF BASE)

REF-P (OBJECT)

REPLACE-SCARY-CHARACTERS (PATTERN)

RESET-DEFINITION-FOR-INCLUDE (DEFN)

RESTORE-DEFINITION (DEFN ORIGINAL)

RNC-URI-P (URI)

RUN-DTD-TEST (N &OPTIONAL (P (MERGE-PATHNAMES cxml-rng-test/dtd-split/* (SYSTEM-DIRECTORY))))

RUN-DTD-TESTS (&OPTIONAL (P (MERGE-PATHNAMES cxml-rng-test/dtd-split/* (SYSTEM-DIRECTORY))) (Q (MERGE-PATHNAMES DTDTEST (SYSTEM-DIRECTORY))))

RUN-NIST-TEST/INSTANCE (SCHEMA HREF BASE)

RUN-NIST-TESTS (*TEST-XMLLINT* &OPTIONAL (P /home/david/NISTSchemaTests/NISTXMLSchemaTestSuite.xml))

RUN-TEST (N &OPTIONAL (P /home/david/src/lisp/cxml-rng/spec-split/))

RUN-TESTS (&OPTIONAL (P (MERGE-PATHNAMES cxml-rng-test/spec-split/* (SYSTEM-DIRECTORY))) (OUTPUT-FILE (MERGE-PATHNAMES TEST (SYSTEM-DIRECTORY))))

RUN-VALIDATION-TEST (M N &OPTIONAL (P /home/david/src/lisp/cxml-rng/spec-split/))

RUN-VALIDATION-TESTS (NAME GRAMMAR TESTS)

SAFE-PARSE-URI (SOURCE STR &OPTIONAL BASE)

SETFSCHEMA-COMPATIBILITY-TABLE (NEW-VALUE INSTANCE)

SETFSCHEMA-DEFINITIONS (NEW-VALUE INSTANCE)

SETFSCHEMA-INTERNED-START (NEW-VALUE INSTANCE)

SCHEMA-P (OBJECT)

SETFSCHEMA-REGISTRATUR (NEW-VALUE INSTANCE)

SERIALIZATION-NAME (DEFN)

SERIALIZE-DEFINITION (DEFN)

SERIALIZE-EXCEPT-NAME (SPEC)

SERIALIZE-NAME (NAME)

SERIALIZE-PATTERN (PATTERN)

SIMPLIFY-NC-CHOICE (VALUES)

SKIP-FOREIGN (SOURCE)

SKIP-FOREIGN* (SOURCE)

SKIP-TO-NATIVE (SOURCE)

SYSTEM-DIRECTORY (&OPTIONAL (SYSTEM CXML-RNG))

TEST-COMPACT

TEST1 (D)

SETFTEXT-NULLABLE (NEW-VALUE INSTANCE)

TEXT-ONLY' (HANDLER PATTERN DATA)

TEXT-P (OBJECT)

UNCOMPACT (LIST)

UNCOMPACT-DATA-TYPE (DATA-TYPE)

UNCOMPACT-FILE (INPUT &OPTIONAL STREAM)

UNCOMPACT-FILE-1 (STREAM)

VALUE-MATCHES-P (HSX PATTERN VALUE)

VALUE-P (OBJECT)

WHITESPACEP (STR)

WORDS (STR)

WRAP-DECLS (DECLS CONTENT)

XOR (A B)

XSTREAM-OPEN-SCHEMA (URI COMPACTP)

ZIP (CONSTRUCTOR CHILDREN)

MACRO

Private

Undocumented

DEFINE-UNCOMPACTOR (NAME (&REST ARGS) &BODY BODY)

DOUBLE (X)

ENSUREF (KEY TABLE VALUE)

LAMBDA* ((&REST ARGS) &BODY BODY)

WITH-ELEMENT (NAME-AND-ARGS &BODY BODY)

WITH-LIBRARY-AND-NS (ATTRS &BODY BODY)

GENERIC-FUNCTION

Public

RNG-ERROR-COLUMN-NUMBER (CONDITION)

@arg[instance]{an instance of @class{rng-error}} @return{an integer, or nil} Return the column number reported by the parser when the Relax NG error was detected, or NIL if not available.

RNG-ERROR-LINE-NUMBER (CONDITION)

@arg[instance]{an instance of @class{rng-error}} @return{an integer, or nil} Return the line number reported by the parser when the Relax NG error was detected, or NIL if not available.

RNG-ERROR-SYSTEM-ID (CONDITION)

@arg[instance]{an instance of @class{rng-error}} @return{a puri:uri, or nil} Return the System ID of the document being parsed when the Relax NG error was detected, or NIL if not available.

Undocumented

SETFRNG-ERROR-COLUMN-NUMBER (NEW-VALUE CONDITION)

SETFRNG-ERROR-LINE-NUMBER (NEW-VALUE CONDITION)

SETFRNG-ERROR-SYSTEM-ID (NEW-VALUE CONDITION)

Private

Undocumented

APPLY-AFTER (HANDLER FN PATTERN)

ATTRIBUTE' (HANDLER PATTERN ATTRIBUTE)

CHECK-PATTERN-COMPATIBILITY (PATTERN)

CHECK-RECURSION (PATTERN DEPTH)

CHECK-RESTRICTIONS (PATTERN)

CLOSE-START-TAG' (HANDLER PATTERN)

COMPUTE-NULLABLE (PATTERN)

CONTAINS (NC URI LNAME)

DATA' (HANDLER PATTERN DATA)

DESCRIBE-NAME (NAME-CLASS STREAM)

END-TAG' (HANDLER PATTERN)

EXPECTATION (PATTERN STREAM)

FOLD-EMPTY (PATTERN)

FOLD-NOT-ALLOWED (PATTERN)

INTERN-AFTER (HANDLER A B)

INTERN-CHOICE (HANDLER A B)

INTERN-GROUP (HANDLER A B)

INTERN-INTERLEAVE (HANDLER A B)

INTERN-ONE-OR-MORE (HANDLER C)

INTERN-PATTERN (PATTERN TABLE)

MIXED-TEXT' (HANDLER PATTERN)

NON-ELEMENT' (HANDLER PATTERN)

OPEN-START-TAG' (HANDLER PATTERN URI LNAME)

REPRESENTATIVES (NC)

SLOT-ACCESSOR

Private

Undocumented

AFTER-START-TAG-P (OBJECT)

SETFAFTER-START-TAG-P (NEW-VALUE OBJECT)

CLOSE-START-TAG'-CACHE (OBJECT)

COMPATIBILITY-TABLE (OBJECT)

SETFCOMPATIBILITY-TABLE (NEW-VALUE OBJECT)

CURRENT-PATTERN (OBJECT)

SETFCURRENT-PATTERN (NEW-VALUE OBJECT)

END-TAG'-CACHE (OBJECT)

EXTRA-NAMESPACES (OBJECT)

SETFEXTRA-NAMESPACES (NEW-VALUE OBJECT)

MIXED-TEXT'-CACHE (OBJECT)

NON-ELEMENT'-CACHE (OBJECT)

OPEN-START-TAG'-CACHE (OBJECT)

PENDING-TEXT-NODE (OBJECT)

SETFPENDING-TEXT-NODE (NEW-VALUE OBJECT)

REGISTRATUR (OBJECT)

SETFREGISTRATUR (NEW-VALUE OBJECT)

SEEN-IDREFS (OBJECT)

SETFSEEN-IDREFS (NEW-VALUE OBJECT)

SEEN-IDS (OBJECT)

SETFSEEN-IDS (NEW-VALUE OBJECT)

STREAM-BUFFER (OBJECT)

SETFSTREAM-BUFFER (NEW-VALUE OBJECT)

STREAM-POS (OBJECT)

SETFSTREAM-POS (NEW-VALUE OBJECT)

STREAM-SOURCE (OBJECT)

SETFSTREAM-SOURCE (NEW-VALUE OBJECT)

VALIDATION-ERROR-CLASS (OBJECT)

SETFVALIDATION-ERROR-CLASS (NEW-VALUE OBJECT)

VARIABLE

Private

Undocumented

!LNAME

!URI

*ANNOTATION-ATTRIBUTES*

*ANNOTATION-ELEMENTS*

*ANNOTATION-WRAP*

*ANY-NAME-ALLOWED-P*

*ATTRIBUTE-NAMESPACE-P*

*COMPACT-PARSER*

*COMPATIBILITY-GRAMMAR*

*COMPATIBILITY-TEST-P*

*DATA-TYPES*

*DEBUG*

*DEFAULT-NAMESPACE*

*EMPTY*

*ERROR-CLASS*

*IN-ATTRIBUTE*

*IN-ATTRIBUTE-P*

*IN-CHOICES*

*IN-DATA-EXCEPT-P*

*IN-DEFAULT-VALUE-P*

*IN-ELEMENT*

*IN-LIST-P*

*IN-ONE-OR-MORE-P*

*IN-ONE-OR-MORE//GROUP-OR-INTERLEAVE-P*

*IN-START-P*

*INCLUDE-BODY-P*

*KEYWORDS*

*NAMESPACES*

*NOT-ALLOWED*

*NS-NAME-ALLOWED-P*

*RELAX-NG-GRAMMAR*

*RNG-NAMESPACE*

*VALIDATE-GRAMMAR*

*WHITESPACE*

CLASS

Public

ANY-NAME

@short{This name class allows any name.} Exceptions are given as @code{any-name-except}. @see-slot{any-name-except}

ATTRIBUTE (LNAME ATTRS)

@short{This pattern specifies that an attribute of a certain name class is required.} Its child pattern describes the type of the attribute's contents. @see-slot{pattern-name} @see-slot{pattern-child}

CHOICE

@short{This pattern specifies that one of two possible subpatterns are allowed at the current position, given as its children.} @see-slot{pattern-a} @see-slot{pattern-b}

DATA

@short{This pattern specifies that text of a specific data type is expected.} The data type instance stored in the @code{pattern-type} slot takes into account additional paramaters, which can be retrieved using @code{pattern-params} in their original form. @see-slot{pattern-type} @see-slot{pattern-params} @see-slot{pattern-except}

ELEMENT

@short{This pattern specifies that an element of a certain name class is required.} Its child pattern describes the attributes and child nodes of this element. @see-slot{pattern-name} @see-slot{pattern-child}

EMPTY

@short{This pattern specifies that nothing more is expected at the current position.}

GROUP

@short{This pattern specifies that two subpatterns are required at the current position in a specific order.} @see-slot{pattern-a} @see-slot{pattern-b}

INTERLEAVE

@short{This pattern specifies that two possible subpatterns are allowed to occur in any order at the current position.} @see-slot{pattern-a} @see-slot{pattern-b}

LIST-PATTERN

@short{This pattern specifies that a subpatterns is allowed multiple times a the current position, with whitespace as a separator.} @see-slot{pattern-child}

NAME

@short{This name class allows only a specific name.} A specific namespace URI and local name are expected. @see-slot{name-uri} @see-slot{name-lname}

NAME-CLASS

@short{The abstract superclass of all name-related classes.} Name classes represent sets of permissible names for an element or attribute. Names are pairs of namespace URI and local-name. @see{attribute} @see{element}

NAME-CLASS-CHOICE

@short{This name class represents the union of two other name classes.} @see-slot{name-class-choice-a} @see-slot{name-class-choice-b}

NOT-ALLOWED

@short{This pattern specifies that the part of the schema reached at this point is not valid.}

NS-NAME

@short{This name class allows all names in a specific namespace}, with possible exceptions. A specific namespace URI is expected. Exceptions are given as @code{ns-name-except}. @see-slot{ns-name-uri} @see-slot{ns-name-except}

ONE-OR-MORE

@short{This pattern specifies that its subpattern is allowed to occur at the current position one or more times.} @see-slot{pattern-child}

PATTERN

@short{The superclass of all patterns.} Instances of this class represent elements in the "simplified syntax" of Relax NG. Patterns are documented for introspective purposes and are not meant to be modified by user code. The start pattern of a schema is available through @fun{schema-start}. @see{schema}

REF

@short{This pattern references another part of the pattern graph.} @code{ref} is the only pattern to introduce shared structure and circularity into the pattern graph, by referring to elements defined elsewhere. (@code{ref} patterns in the full Relax NG syntax can be used to refer to any pattern definition in the grammar. Simplification normalizes the schema so that ref patterns only refer to definitions which have an @code{element} as their child.) @see-slot{pattern-element}

SCHEMA

An instance of this class represents a Relax NG grammar that has been parsed and simplified. @see-slot{schema-start} @see-constructor{parse-schema} @see{make-validator} @see{serialize-schema}

TEXT

@short{This pattern specifies that text is expected here.}

VALUE

@short{This pattern specifies that a specific value is expected as text here.} The value expected is @code{pattern-value}, parsed from @code{pattern-string} using @code{pattern-type}. @see-slot{pattern-type} @see-slot{pattern-value} @see-slot{pattern-string}

Private

Undocumented

%COMBINATION

%LEAF

%NAMED-PATTERN

%PARENT

%TYPED-PATTERN

AFTER

COMPATIBILITY-TABLE (OBJECT)

DEFINITION

DTD-ATTRIBUTE

DTD-COMPATIBILITY-HANDLER

DTD-ELEMENT

DTD-MEMBER

GRAMMAR

HEX-STREAM

TEXT-NORMALIZER

VALIDATOR

CONDITION

Public

DTD-COMPATIBILITY-ERROR

@short{The class of DTD compatibility errors.} Signalled while parsing a schema, this error signifies that the schema is not compatible (as opposed to incorrect). Signalled during validation, this error signifies that the document is not sound (as opposed to invalid).

RNG-ERROR (SOURCE FMT &REST ARGS)

@short{The class of all validation and schema parsing errors.} Signalled while parsing a schema, this error signifies that the schema is incorrect (or not compatible with DTD Compatibility). Signalled during validation, this error signifies that the document is invalid (or not sound). When parsing or validating with DTD Compatibility, check for @code{dtd-compatibility-error} to distinguish between correctness and compatibility or validity and soundness. @see-slot{rng-error-line-number} @see-slot{rng-error-column-number} @see-slot{rng-error-system-id}