sexml

API Reference

sexml

s-expressions for xml is a library which provides a sugar-sweet s-expression syntax for spitting out xml documents based on a DTD

SEXML

  • Macro SUPPORT-DTD (file packagename)
    adds support for the dtd specified in <file> in package <packagename>, the package needn't exist before.
  • Macro WITH-COMPILETIME-ACTIVE-LAYERS ((&rest layers) &body body)

sexml-objects

Provides CLOS objects for sexml

CL-ATTRIBS

  • Class ATTRIBUTED-DIRECT-SLOT  (STANDARD-DIRECT-SLOT-DEFINITION)
    ATTRIBUTES   Accessor: ATTRIBUTES
  • Class ATTRIBUTED-EFFECTIVE-SLOT  (STANDARD-EFFECTIVE-SLOT-DEFINITION)
    ATTRIBUTES   Accessor: ATTRIBUTES
  • Class ATTRIBUTES-CLASS  (STANDARD-CLASS)
    This is the metaclass used for managing attributes-object
    No slots.
  • Function ATTRIBUTED-SLOT-P (slot)
  • Class ATTRIBUTES-OBJECT
    This is the class that provides functionality for getting and setting attributes of its slots. use this format to set slot-value and slot-attribs at once: (setf (some-slot object) '(:value/attribs (value (:attrib-a attrib-a-value))))
    No slots.
  • Generic-Function SLOT-ATTRIB (object slot-name attrib-keyword)
    Returns the attribute value of the given slot of the given object
  • Generic-Function SLOT-ATTRIBS (object slot-name)
    Returns a list of all attributes and values of the given slot from the object
  • Method SLOT-ATTRIB ((object attributes-object) (slot-name symbol) (attrib-keyword symbol))
  • Method SLOT-ATTRIBS ((object attributes-object) (slot-name symbol))
  • Generic-Function (setf SLOT-ATTRIB) (new-value object slot-name attrib-name)
  • Generic-Function (setf SLOT-ATTRIBS) (new-value object slot-name)
  • Method (setf SLOT-ATTRIB) (new-value (object attributes-object) (slot-name symbol) (attrib-keyword symbol))
  • Method (setf SLOT-ATTRIBS) (new-value (object attributes-object) (slot-name symbol))

CL-BINDS

  • Class BINDABLE-OBJECT  (ATTRIBUTES-OBJECT)
    if %bound-object is non nil, every slot that provides a :bound-slot-name will read/write it's value from/to the slot of %bound-object
    %BOUND-OBJECT   Accessor: %BOUND-OBJECT

CL-CHANGES

  • Class CHANGE-SENSITIVE-OBJECT  (ATTRIBUTES-OBJECT)
    detects changes of the slot values and sets its changedp slot to t and calls the function in the on-change slot, if the changed slot has an attribute of :on-change, that function will be called too. the format for the slot's on change function is (lambda (object))
    %CHANGEDP   Accessor: %CHANGEDP
    %ON-CHANGE   Accessor: %ON-CHANGE
    a function to call when there is a change, format: (lambda (object slot-name))
  • Method %CHANGEDP ((obj t))

CL-VALIDATIONS

  • Function OBJECT-VALIDP (object)
  • Function SLOT-VALIDP (object slot-name)

SEXML-OBJECTS

  • Class WIDGET  (ATTRIBUTES-OBJECT)
    this is the base for widget classes
    %ID   Accessor: %ID
    %PARENT   Accessor: %PARENT
    %RENDER-FUNC   Accessor: %RENDER-FUNC
    %CHILDREN   Accessor: %CHILDREN
    %TEMPLATE-ACCESS   Accessor: %TEMPLATE-ACCESS
  • Method (setf %CHILDREN) (new-value (widget widget))
  • Function UPDATE-CHILDREN-PARENT (widget)
  • Method %CHILDREN ((obj t))
  • Function MAP-WIDGET (widget func)
    maps the function over the children of the given widget and over the children of the child if it's a widget, collecting any non nil values returned by func.
  • Generic-Function RENDER-MARKUP (widget)
    this method is called on the widgets that need to be rendered, should return the html markup of the widget
  • Method RENDER-MARKUP ((widget widget))
  • Method RENDER-MARKUP ((widget function))
  • Method RENDER-MARKUP ((widget t))
  • Generic-Function GET-HTML-ATTRIBUTES (widget)
    finds all the slots in the given widget that have the :html-attrip-p set to t and have a non nil value and returns a plist that is used to render the attributes of the widget in the render-markup function. the plist is made from the :keword attribute and slot-value of the slots.
  • Method GET-HTML-ATTRIBUTES ((widget widget))
  • Method %PARENT ((obj string))
  • Method %PARENT ((obj function))
  • Function WIDGETP (object)
  • Function ADD-CHILD (widget child &optional (index 0) (from-end t))
  • Function REMOVE-CHILD (widget &optional child (index 0) (from-end t))
  • Macro DEFINE-UI ((&optional (package '<)) &body body)
  • Macro DEFINE-TEMPLATE ((&optional name (package '<)) &body body)
  • Function GET-TEMPLATE (name)
  • Macro DEFINE-TEMPLATE-FROM-FILE ((template-name file-spec &optional (package '<)))
  • Variable *PARSER-REMOVE-WHITE-SPACE*
    t
    if non nil, html parser will remove white space from parsed result.
  • Macro WITH-TEMPLATE ((template-name) &body body)
  • Function SETUP-SEXML-OBJECTS (dtd-path target-package inherit-list)