Common Lisp Package: IT.BESE.YACLML.XMLS

README:

FUNCTION

Public

MAKE-NODE (&KEY NAME NS ATTRS CHILD CHILDREN)

Convenience function for creating a new xml node.

PARSE (S &KEY URI-TO-PACKAGE)

Parses the supplied stream or string into a lisp node tree.

Undocumented

NODE-ATTRS (ELEM)

SETFNODE-ATTRS (ATTRS ELEM)

NODE-CHILDREN (ELEM)

SETFNODE-CHILDREN (CHILDREN ELEM)

NODE-NAME (ELEM)

SETFNODE-NAME (NAME ELEM)

NODE-NS (ELEM)

SETFNODE-NS (NS ELEM)

Private

ELEMENT-TYPE (INSTANCE)

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

ELEMENT-VAL (INSTANCE)

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

ENTITIFY (OBJECT)

Converts OBJECT to its string representation, if necessary, and then replaces the characters of OBJECT with their corresponding entities. Assumes that the characters of RESERVED have been registered in the entity table.

ENTITY-OF (CHAR)

Returns the xml entity corresponding to CHAR, without the leading ampersand. Returns NIL if not found.

MAKE-EXTENDABLE-STRING (&OPTIONAL (SIZE 10))

Creates an adjustable string with a fill pointer.

NONE-OR-MORE (S FUNC)

Collects any matches of the supplied rule with the input stream.

ONE-OR-MORE (S FUNC)

Collects one or more matches of the supplied rule with the input stream.

PEEK-STREAM (STREAM)

Looks one character ahead in the input stream. Serves as a potential hook for character translation.

PUSH-STRING (C STRING)

Shorthand function for adding characters to an extendable string.

READ-STREAM (STREAM)

Reads a character from the stream, translating entities as it goes (assuming *convert-entities* is non-NIL).

RESOLVE-ENTITY (ENT)

Resolves the xml entity ENT to a character. Numeric entities are converted using CODE-CHAR, which only works in implementations that internally encode strings in US-ASCII, ISO-8859-1 or UCS.

RESOLVE-NAMESPACE (ELEM ENV)

Maps the ns prefix to its associated url via the supplied ns env.

STATE-GOT-DOCTYPE (INSTANCE)

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

STATE-LINES (INSTANCE)

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

STATE-NSSTACK (INSTANCE)

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

STATE-STREAM (INSTANCE)

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

Undocumented

ATTR-OR-NSDECL (S)

ATTR-TEXT-DQ (C)

ATTR-TEXT-SQ (C)

CHARDATA (C)

COMMENT (S)

COMMENT-CHAR (C)

COMMENT-OR-CDATA (S)

COMMENT-OR-DOCTYPE (S)

CONTENT (S)

COPY-ELEMENT (INSTANCE)

COPY-STATE (INSTANCE)

DIGIT (C)

DOCUMENT (S)

ELEMENT (S)

ELEMENT-P (OBJECT)

SETFELEMENT-TYPE (NEW-VALUE INSTANCE)

SETFELEMENT-VAL (NEW-VALUE INSTANCE)

END-TAG (S)

INTERN-XML-NAME (NAME NS ENV)

LETTER (C)

LOOKUP-NAMESPACE (NS ENV)

LOOKUP-PACKAGE (NS ENV)

MAKE-ELEMENT (&KEY ((TYPE DUM387) NIL) ((VAL DUM388) NIL))

MAKE-STATE (&KEY ((GOT-DOCTYPE DUM221) NIL) ((LINES DUM222) 1) ((NSSTACK DUM223) NIL) ((STREAM DUM224) NIL))

MISC (S)

NAME (S)

NAMECHAR (C)

NCNAME (S)

NCNAME-CHAR (C)

PROCESSING-INSTRUCTION (S)

PROCESSING-INSTRUCTION-OR-XMLDECL (S)

QNAME (S)

START-TAG (S)

SETFSTATE-GOT-DOCTYPE (NEW-VALUE INSTANCE)

SETFSTATE-LINES (NEW-VALUE INSTANCE)

SETFSTATE-NSSTACK (NEW-VALUE INSTANCE)

STATE-P (OBJECT)

SETFSTATE-STREAM (NEW-VALUE INSTANCE)

WS (S)

WS-ATTR-OR-NSDECL (S)

WS-CHAR (C)

XMLDECL (S)

MACRO

Private

DEFMATCH (NAME &REST BODY)

Match definition macro that provides a common lexical environment for matchers.

DEFRULE (NAME &REST BODY)

Rule definition macro that provides a common lexical environment for rules.

EAT

Consumes one character from the input stream.

MATCH (&REST MATCHERS)

Attempts to match the next input character with one of the supplied matchers.

MATCH* (&REST SEQUENCE)

Matches any occurances of any of the supplied matchers.

MATCH+ (&REST SEQUENCE)

Matches one or more occurances of any of the supplied matchers.

MATCH-SEQ (&REST SEQUENCE)

Tries to match the supplied matchers in sequence with characters in the input stream.

MATCHFN (NAME)

Convenience macro for creating an anonymous function wrapper around a matcher macro.

MUST ((ERROR-TYPE &REST ERROR-ARGS) &REST BODY)

Throws a parse error if the supplied forms do not succeed.

PEEK (&REST MATCHERS)

Looks ahead for an occurance of any of the supplied matchers.

GENERIC-FUNCTION

Private

Undocumented

ENTITY (CONDITION)

SETFENTITY (NEW-VALUE CONDITION)

EXPECTED (CONDITION)

SETFEXPECTED (NEW-VALUE CONDITION)

FOUND (CONDITION)

SETFFOUND (NEW-VALUE CONDITION)

MESSAGE (CONDITION)

SETFMESSAGE (NEW-VALUE CONDITION)

NAMESPACE (CONDITION)

SETFNAMESPACE (NEW-VALUE CONDITION)

OFFSET (CONDITION)

SETFOFFSET (NEW-VALUE CONDITION)

VARIABLE

Public

*CONVERT-ENTITIES*

When true we convert entities found in the data to their corresponding chars, when false we leave ignore entities. NB: in the current implementation we are only able to convert a limited subset of all entities (see *entities* for the complete listing).

Undocumented

*ENTITIES*

Private

Undocumented

*STRIP-COMMENTS*

*TEST-VERBOSE*

CLASS

Private

ELEMENT (S)

Common return type of all rule functions.

STATE

Represents parser state. Passed among rules to avoid threading issues.

CONDITION

Private

Undocumented

REFERENCE-TO-UNDECLARED-NAMESPACE

UNMATCHED-END-TAG

UNRESOVABLE-ENTITY

XML-PARSE-ERROR