buildnode

API Reference

buildnode

Tool for building up an xml dom nicely.

NET.ACCELERATION.BUILDNODE

  • Generic-Function DOM-WALK (handler value &key include-xmlns-attributes include-doctype include-default-values recode)
    An in order traversal of a subset of the dom, that calls the appropriate sax events
  • Method DOM-WALK (handler (document document) &key (include-xmlns-attributes sax:*include-xmlns-attributes*) include-doctype include-default-values (recode (and)))
  • Method DOM-WALK (handler (n element) &key (include-xmlns-attributes sax:*include-xmlns-attributes*) include-doctype include-default-values &allow-other-keys)
  • Method DOM-WALK (handler (n cdata-section) &key &allow-other-keys)
  • Method DOM-WALK (handler (n text) &key &allow-other-keys &aux (pn (dom:parent-node n)) (parent (when pn (dom:tag-name pn))))
  • Method DOM-WALK (handler (n comment) &key &allow-other-keys)
  • Method DOM-WALK (handler (n processing-instruction) &key &allow-other-keys)
  • Method DOM-WALK (handler (n entity-reference) &key &allow-other-keys)
  • Variable *DOCUMENT*
    nil
    A variable that holds the current document that is being built. see with-document.
  • Generic-Function TEXT-OF-DOM-SNIPPET (el &optional splice stream)
    get all of the textnodes of a dom:element and return that string with splice between each character
  • Method TEXT-OF-DOM-SNIPPET (el &optional splice stream)
  • Method TEXT-OF-DOM-SNIPPET (el &optional splice stream)
  • Method TEXT-OF-DOM-SNIPPET (el &optional splice stream)
  • Function JOIN-TEXT (text &key delimiter)
    Like joins trees of lists strings and dom nodes into a single string possibly with a delimiter ignores nil and empty string
  • Class SCOPED-DOM-BUILDER  (DOM-BUILDER)
    A dom builder that builds inside of another dom-node
    No slots.
  • Function MAKE-SCOPED-DOM-BUILDER (node)
    Returns a new scoped dom builder, scoped to the passed in node. Nodes built with this builder will be added to the passed in node
  • Function INSERT-HTML-STRING (string &key (tag "div") (namespace-uri "http://www.w3.org/1999/xhtml") (dtd nil) (remove-whitespace? t))
    Parses a string containing a well formed html snippet into dom nodes inside of a newly created node. (Based loosely around the idea of setting the javascript innerHTML property) Will wrap the input in a tag (which is neccessary from CXMLs perspective) can validate the html against a DTD if one is passed, can use *xhtml1-transitional-extid* for example.
  • Function INNER-HTML (string &optional (tag "div") (namespace-uri "http://www.w3.org/1999/xhtml") (dtd nil) (remove-whitespace? t))
  • Function ADD-CHILDREN (elem &rest kids &aux (list? (listp elem)) (doc (document-of (if list? (first elem) elem))) (elem-list (alexandria.0.dev:ensure-list elem)))
    adds some kids to an element and return that element alias for append-nodes
  • Function INSERT-CHILDREN (elem idx &rest kids)
    insert a bunch of dom-nodes (kids) to the location specified alias for insert-nodes
  • Function APPEND-NODES (to-location &rest chillins)
    appends a bunch of dom-nodes (chillins) to the location specified alias of add-children
  • Function INSERT-NODES (to-location index &rest chillins)
    insert a bunch of dom-nodes (chillins) to the location specified alias of insert-children
  • Variable *HTML-COMPATIBILITY-MODE*
    nil
  • Variable *CDATA-SCRIPT-BLOCKS*
    t
    Should script blocks have a cdata?
  • Variable *NAMESPACE-PREFIX-MAP*
    '(("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" . "xul")
      ("http://www.w3.org/1999/xhtml" . "xhtml"))
  • Generic-Function GET-ATTRIBUTE (elem attribute)
    Gets the value of an attribute on an element if the attribute does not exist return nil
  • Method GET-ATTRIBUTE (elem attribute)
  • Method GET-ATTRIBUTE (elem attribute)
  • Method GET-ATTRIBUTE (elem attribute)
  • Generic-Function SET-ATTRIBUTE (elem attribute value)
    Sets an attribute and passes the elem through, returns the elem. If value is nil, removes the attribute
  • Generic-Function REMOVE-ATTRIBUTE (elem attribute)
    removes an attribute and passes the elem through, returns the elem If the attribute does not exist, simply skip it
  • Function REMOVE-ATTRIBUTES (elem &rest attributes)
    removes an attribute and passes the elem through, returns the elem
  • Generic-Function CSS-CLASSES (o)
    Returns a list of css classes (space separated names in the 'class' attribute)
  • Method CSS-CLASSES (o)
  • Method CSS-CLASSES (o)
  • Method CSS-CLASSES (o)
  • Function ADD-CSS-CLASS-HELPER (&rest new-classes)
  • Generic-Function ADD-CSS-CLASS (element new-class)
    Adds a new css class to the element and returns the element
  • Generic-Function ADD-CSS-CLASSES (comp &rest classes)
  • Generic-Function REMOVE-CSS-CLASS (el new-class)
    Removes a css class from the elements and returns the element
  • Method REMOVE-CSS-CLASS ((el element) new-class)
  • Method REMOVE-CSS-CLASS ((el element) new-class)
  • Method REMOVE-CSS-CLASS ((el element) new-class)
  • Generic-Function REMOVE-CSS-CLASSES (comp &rest classes)
  • Function PUSH-NEW-ATTRIBUTE (elem attribute value)
    if the attribute is not on the element then put it there with the specified value, returns the elem and whether or not the attribute was set
  • Function PUSH-NEW-ATTRIBUTES (elem &rest attribute-p-list)
    for each attribute in the plist push-new into the attributes list of the elem, returns the elem
  • Function SET-ATTRIBUTES (elem &rest attribute-p-list)
    set-attribute for each attribute specified in the plist, returns the elem
  • Function CREATE-COMPLETE-ELEMENT (document namespace tagname attributes children &optional (namespace-prefix-map *namespace-prefix-map*))
    Creates an xml element out of all the necessary components. If the tagname does not contain a prefix, then one is added based on the namespace-prefix map.
  • Function MAKE-OUTPUT-SINK (stream &key canonical indentation (char-p t))
  • Function WRITE-DOCUMENT (document &optional (out-stream *standard-output*))
    Write the document to the designated out-stream, or *standard-ouput* by default.
  • Macro WITH-DOCUMENT (&body chillins)
    (with-document ( a bunch of child nodes of the document )) --> cxml:dom document Creates an environment in which the special variable *document* is available a document is necessary to create dom nodes and the document the nodes end up on must be the document on which they were created. At the end of the form, the complete document is returned
  • Macro WITH-DOCUMENT-TO-FILE (filename &body chillins)
    Creates a document block with-document upon which to add the chillins (southern for children). When the document is complete, it is written out to the specified file.
  • Function WRITE-DOC-TO-FILE (doc filename)
    Binary write-out a document. will create/overwrite any existing file named the same.
  • Function DOCUMENT-TO-STRING (doc)
    Return a string representation of a document.
  • Macro WITH-XHTML-DOCUMENT (&body chillins)
    (with-xhtml-document ( a bunch of child nodes of the document )) --> cxml:dom document Creates an environment in which the special variable *document* is available a document is necessary to create dom nodes and the document the nodes end up on must be the document on which they were created. At the end of the form, the complete document is returned. This sets the doctype to be xhtml transitional.
  • Macro WITH-XHTML-FRAMESET-DOCUMENT (&body chillins)
    (with-xhtml-document ( a bunch of child nodes of the document )) --> cxml:dom document Creates an environment in which the special variable *document* is available a document is necessary to create dom nodes and the document the nodes end up on must be the document on which they were created. At the end of the form, the complete document is returned. This sets the doctype to be xhtml transitional.
  • Macro WITH-XHTML-DOCUMENT-TO-FILE (filename &body chillins)
    Creates a document block with-document upon which to add the chillins (southern for children). When the document is complete, it is written out to the specified file.
  • Macro WITH-HTML-DOCUMENT-TO-FILE ((filename) &body body)
    Creates an html-document, writes out the results to filename
  • Macro WITH-HTML-DOCUMENT (&body body)
    (with-html-document ( a bunch of child nodes of the document )) --> cxml:dom document Creates an environment in which the special variable *document* is available a document is necessary to create dom nodes and the document the nodes end up on must be the document on which they were created. At the end of the form, the complete document is returned. This sets the doctype to be html 4.01 strict.
  • Macro WITH-HTML5-DOCUMENT-TO-FILE ((filename) &body body)
    Creates an html-document, writes out the results to filename
  • Macro WITH-HTML5-DOCUMENT (&body body)
    (with-html5-document ( a bunch of child nodes of the document )) --> cxml:dom document Creates an environment in which the special variable *document* is available a document is necessary to create dom nodes and the document the nodes end up on must be the document on which they were created. At the end of the form, the complete document is returned. This sets the doctype to be html5 compatible <!DOCTYPE html>.
  • Macro WITH-HTML-DOCUMENT-TO-STRING (nil &body body)
    trys to output a string containing all
  • Macro WITH-HTML5-DOCUMENT-TO-STRING (nil &body body)
    trys to output a string containing all
  • Generic-Function REMOVE-ALL-CHILDREN (el)
  • Macro WITH-HTML-SNIPPET ((&optional stream sink) &body body)
    builds a little piece of html-dom and renders that to a string / stream
  • Macro WITH-HTML5-SNIPPET ((&optional stream sink) &body body)
    builds a little piece of html-dom and renders that to a string / stream
  • Macro WITH-XHTML-SNIPPET ((&optional stream sink) &body body)
    builds a little piece of xhtml-dom and renders that to a string / stream
  • Macro DEF-TAG-NODE (package name namespace docstring &optional fn-name)
    Defines a tag function in the package with the name and prefix specified for example: :net.acceleration.xul "box" "xul" will create a function #'box in the :net.acceleration.xul lisp namespace. When this function is called it will create a 'xul:box' node in the xmlns provided in the namespace param
  • Function ?XML-STYLESHEET (href &optional (type "text/css"))
    adds an xml-stylesheet processing instruction to the cxml:dom document bound to the special variable *document*
  • Function ?PROCESSING-INSTRUCTION (target data)
  • Function DOM-COMMENT (text)
    Insert a dom comment into the current *document*
  • Function CDATA (data)
  • Function STYLESHEET-BLOCK (list &optional (type "text/css"))
    given a list of urls, will build a list of ?xml-stylesheet nodes pointing to the appropriate urls
  • Function SCRIPT-BLOCK (fn list-of-urls)
    given a list of urls, will build a list of script nodes pointing to the appropriate urls. Pass in #'xul:script or #'xhtml:script as the first argument

buildnode-excel

Tool for building up an xml dom of an excel spreadsheet nicely. Uses this XML format: http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx

NET.ACCELERATION.BUILDNODE.EXCEL

  • Macro DEF-EXCEL-TAG (package name xmlns &optional (doc ""))
    defines a function that will build an xhtml node (on *document*) when called
  • Function ?MSO-APPLICATION (&optional (value "progid=\"excel.sheet\""))
    <?mso-application progid="Excel.Sheet"?>
  • Macro WITH-EXCEL-WORKBOOK (nil &body chillins)
  • Macro WITH-EXCEL-WORKBOOK-FILE ((file) &body chillins)
  • Macro WITH-EXCEL-WORKBOOK-STRING (nil &body chillins)
  • Function BUILD-EXCEL-CELL-REFERENCE (sheet-name row cell)
  • Function LINK-TO (item reference)
  • Function SET-INDEX (val item)
  • Function SET-MERGE (col-cnt item)

URN.SCHEMAS-MICROSOFT-COM.OFFICE.SPREADSHEET

  • Function DATE-CELL (v &optional (style-id "shortdate"))
  • Function CURRENCY-CELL (v &optional (style-id "currency"))
  • Function STRING-CELL (v &optional (style-id "string"))
  • Function TITLE-CELL (v &optional (style-id "title"))
  • Function HEADER-CELL (v &optional (style-id "header"))

URN.SCHEMAS-MICROSOFT-COM.OFFICE.EXCEL

No exported symbols.

URN.SCHEMAS-MICROSOFT-COM.OFFICE.OFFICE

No exported symbols.

URN.SCHEMAS-MICROSOFT-COM.OFFICE.COMPONENT.SPREADSHEET

No exported symbols.

buildnode-kml

Tool for building up an xml dom of an KML.

NET.ACCELERATION.BUILDNODE.KML

  • Macro WITH-KML-DOCUMENT (&body children)
  • Function MAKE-MARKER (&key lat lon address description name icon-href)
  • Function MAKE-DOC-FROM-MARKERS (markers &optional (title "doc title"))