The flute Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The flute Reference Manual

This is the flute Reference Manual, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Mon Jul 29 15:39:29 2019 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Flute

Flute is a beautiful, easily composable HTML5 generation library in Common Lisp. It's

Getting started

Install and run tests

(ql:quickload :flute)
(ql:quickload :flute-test)

Then define a new package specifically for HTML generation, in its definition:

(defpackage flute-user
  (:use :cl :flute))

If you don't want to import all symbols, see H Macro, which provide a similar interface as a tranditional Lisp HTML generation library.

Using html elements

(html
  (head
    (link :rel "...")
    (script :src "..."))
  (body
    (div :id "a" :class "b"
      (p :style "color: red"
        "Some text")
      "Some text in div"
      (img :src "/img/dog.png")
      (a '(:href "/cat")
        (img '((:src . "/img/cat.png")))))))

These html, div, etc. are just functions. Element attribute can be given inline as the above example, or as alist/plist/attrs object as the first argument, like the last a and img in the above example. In this case they can be variables that calculated programmatically.

The remaining argument will be recognized as the children of this element. Each child can be:

  1. string;
  2. element, builtin or user defined;
  3. list of 1, 2 and 3. Can also be NIL. All children will be flattened as if they're given inline.

Define new element

(define-element dog (id size)
  (if (and (realp size) (> size 10))
      (div :id id :class "big-dog"
              children
              "dog")
      (div :id id :class "small-dog"
              children
              "dog")))

dog will be defined as a function that takes :id and :size keyword arguments. dog returns an user-defined element object. Inside it, children will be replaced with the children elements you provided when creating this dog:

FLUTE-USER> (defparameter *dog1* (dog :id "dog1" :size 20))
*DOG1*
FLUTE-USER> *dog1*
<div id="dog1" class="big-dog">dog</div>
FLUTE-USER> (dog :id "dog2" "I am a dog" *)
<div id="dog2" class="small-dog">
  I am a dog
  <div id="dog1" class="big-dog">dog</div>
  dog
</div>

All elements, both builtin and user defined ones are objects, although they're printed as html snippet in REPL. Their attribute can be accessed by (element-attrs element). Their children can be accessed by (element-children elements) and tag name by (element-tag element). You can modify an exising element's attrs and children. If you modify a user defined element, the body you defined in it's define-element also re-executed to take effect of the the attrs and children change:

FLUTE-USER> *dog1*
<div id="dog1" class="big-dog">dog</div>
FLUTE-USER> (setf (attr *dog1* :size) 10
                  ;; attr is a helper method to set (flute:element-attrs *dog1*)
                  (attr *dog1* :id) "dooooog1"
                  (element-children *dog1*) (list "i'm small now"))
("i'm small now")
FLUTE-USER> *dog1*
<div id="dooooog1" class="small-dog">
  i'm small now
  dog
</div>

By default user element is printed as what it expand to. If you have a lot of user defined element nested deeply, you probably want to have a look at the high level:

FLUTE-USER> (let ((*expand-user-element* nil))
              (print *dog1*)
              (values))

<dog id="dooooog1" size=10>i'm small now</dog>
; No value
FLUTE-USER>

Generate HTML

To generate a piece of HTML string that probably used in a response of a backend service:

(elem-str element)

To generate HTML string that has nice indent as that in REPL:

(element-string element)

To generate that and write to file, just create a stream, then (write element :stream stream) for human or (write element :stream stream :pretty nil) for production.

H macro

If you don't want to import all the symbols, you can use the h macro:

(defpackage flute-min
  (:use :cl)
  (:import-from :flute
                :h
                :define-element))

Then just wrap h for all html generation part. In the same examples above, it becomes:

(in-package :flute-min)
(h (html
     (head
       (link :rel "...")
       (script :src "..."))
     (body
       (div :id "a" :class "b"
         (p :style "color: red"
           "Some text")
         "Some text in div"
         (img :src "/img/dog.png")
         (a '(:href "/cat")
           (img '((:src . "/img/cat.png"))))))))

(define-element dog (id size)
  (if (and (realp size) (> size 10))
      (h (div :id id :class "big-dog"
              flute:children
              "dog"))
      (h (div :id id :class "small-dog"
              flute:children
              "dog"))))

(defparameter *dog2* (dog :id "dog2" :size 20 "some children"))

From version 0.2 (available in Aug 2018 Quicklisp), flute supports css style id and class attribute for builtin elements. For example div#id-name.class1.class2, So you can also write:

(h (div#a.b "..."))
;; Provide additional class and attributes
(h (div#a.b :class "c" :onclick "fun()"))

Inline CSS and JavaScript

With help of cl-css (available in Quicklisp), You can write inline CSS for the style attribute, in a similar syntax like flute:

(div :style (inline-css '(:margin 5px :padding 0px)))

cl-css:inline-css is a function taking plist and returns the result css string, so it can be safely used inside or outside of H macro and with variable arguments.

With help of Parenscript (available in Quicklisp), You can write inline JavaScript for onclick, etc. attribute:

(button :onclick (ps-inline (func)))

That's all you need to know to define elements and generate html. Please reference the API Reference Section for detailed API.

Change Logs

2018/07/28 Version 0.2-dev

2018/07/11 Version 0.1

Motivation

Currently there're a few HTML generation library in Common Lisp, like CL-WHO, CL-MARKUP and Spinneret. They both have good features for generating standard HTML, but not very good at user element (components) that currently widely used in frontend: you need to define all of them as macros and to define components on top of these components, you'll have to make these components more complex macros to composite them. Spinneret has a deftag feature, but deftag is still expand to a defmacro.

I'd also want to modify the customer component attribute after create it and incorporate it with it's own logic (like the dog size example above), this logic should be any lisp code. This requires provide all element as object, not plain HTML text generation. With this approach, all elements have a same name function to create it, and returns element that you can modify later. These objects are virtual doms and it's very pleasant to write html code and frontend component by just composite element objects as arguments in element creation function calls. Flute's composite feature inspired by Hiccup and Reagent but more powerful -- in flute, user defined elements is real object with attributes and it's own generation logic.

Limitation

With the function name approach, it's not possible to support div.id#class1#class2 style function names. I'm working on some tweak of reader macros in illusion library to detect this and convert it to (div :id "id" :class "class1 class2" ...) call

The most and major limitation is we don't have a substential subset of Common Lisp in browser so flute can be used in frontend. Parenscript is essentially a JavaScript semantic in Lisp like syntax. JSCL is promosing, but by now it seems focus on creating a CL REPL on Web and doesn't support format or CLOS. Also we lack enough infrastructure to build Common Lisp to JavaScript (might be an asdf plugin) and connect to a browser "Swank" via WebSocket from Emacs. I'll be working these: a full or at least substential subset of Common Lisp to JavaScript Compiler to eventually have a full frontend development environment in Common Lisp. Any help or contribution is welcome.

API Reference

Here is a draft version of API Reference, draft means it will be better organized and moved to a separate HTML doc, but it's content is already quite complete.

Builtin HTML elements

    a abbr address area article aside audio b base bdi bdo blockquote
    body br button canvas caption cite code col colgroup data datalist
    dd del details dfn dialog div dl dt em embed fieldset figcaption
    figure footer form h1 h2 h3 h4 h5 h6 head header hr i iframe html
    img input ins kbd label legend li link main |map| mark meta meter nav
    noscript object ol optgroup option output p param picture pre progress
    q rp rt ruby s samp script section select small source span strong
    style sub summary sup svg table tbody td template textarea tfoot th
    thead |time| title tr track u ul var video wbr

All of above HTML5 elements are functions, which support same kinds of parameters, take A as example:

;; Function A &REST ATTRS-AND-CHILREN
;;
;; Create and return an <a> element object
;; ATTRS-AND-CHILDREN can be the following:

;; 1. an empty <a> tag
(a)

;; 2. attributes of alist, plist or ATTRS object
;; The following creates: <a id="aa" customer-attr="bb">
(a :id "aa" :customer-attr "bb")
(a '(:id "aa" :customer-attr "bb"))
(a '((:id . "aa") (:customer-attr . "bb")))
;; or assume we have the above one in variable a1
(a (element-attrs a1)) ; to share the same attrs with a1
(a (copy-attrs (element-attrs a1)))

;; 3. any of above format attributes with children
(a :id "aa" :customer-attr "bb"
  "Some children"
  (div '(:id "an element children"))
  ; list of any depth containing elements and texts, will be flattened
  (list a1 a2 (a '((:id . "aaa")) "some text")
        (list (h1 "aaa")))
  "some other text")

The HTML element is a little special, it's with <!DOCTYPE html> prefix to make sure browser recognize it correctly.

User defined elements

;; Macro DEFINE-ELEMENT NAME (&REST ARGS) &BODY BODY
;;
;; Define a user element with NAME as its tag name and function
;; NAME. After DEFINE-ELEMENT, a FUNCTION of NAME in current package
;; is defined. ARGS specified the possible keyword ARGS it can take as
;; it's ATTRS. You can either use these ARGS as Lisp arguments in the
;; BODY of its definition and plug in them to the BODY it expand to.
;; You can use FLUTE:CHILDREN to get or set it's children that you give
;; when call function NAME, FLUTE:ATTRS to get or set it's attributes
;; and FLUTE:TAG to get or set it's tag name.

;; Variable *EXPAND-USER-ELEMENT*
;;
;; Bind this variable to specify whether the user elements are print in
;; a high level (NIL), or expand to HTML elements (T). T by default.

Attribute accessing utility

;; Function ATTRS-ALIST ATTRS
;; Function (SETF ATTRS-ALIST) ATTRS
;;
;; Return or set the attrs object in alist format

;; Function MAKE-ATTRS &KEYS ALIST
;;
;; Create a attrs aoject, given an alist of (:attr . "attr-value") pair.
;; Attribute values (cdr of each element in alist) will be escaped if
;; *ESCAPE-HTML* is not NIL

;; Function COPY-ATTRS ATTRS
;;
;; Make a copy and return the copy of ATTRS object

;; Method ATTR ATTRS KEY
;; Method (SETF ATTR) ATTRS KEY
;; Method ATTR ELEMENT KEY
;; Method (SETF ATTR) ELEMENT KEY
;;
;; Get or set the attribute value of given KEY. KEY should be an keyword.
;; If KEY does not exist, ATTR method will return NIL. (SETF ATTR) method
;; will create the (KEY . VALUE) pair. Don't use (SETF (ATTR ATTRS :key) NIL)
;; or (SETF (ATTR ELEMENT :key) NIL) to remove an attr, use DELETE-ATTR.

;; Method DELETE-ATTR ATTRS KEY
;; Method DELETE-ATTR ELEMENT KEY
;;
;; Delete the attribute key value pair from ATTRS or ELEMENT's ELEMENT-ATTRS,
;; will ignore if KEY doesn't exist.

Element slots

;; Method ELEMENT-TAG ELEMENT
;; Method (SETF ELEMENT-TAG) ELEMENT
;;
;; Get or set the ELEMENT-TAG STRING. For example <html>'s ELEMENT-TAG is "html"

;; Method ELEMENT-ATTRS ELEMENT
;; Method (SETF ELEMENT-ATTRS) ELEMENT
;;
;; Get or set the ELEMENT-ATTRS. When set this, must be an ATTRS object

;; Method ELEMENT-CHILDREN ELEMENT
;; Method (SETF ELEMENT-CHILDREN) ELEMENT
;;
;; Get or set element children. When set this manually, must given a flatten list
;; of ELEMENT or STRING.

;; Method USER-ELEMENT-EXPAND-TO USER-ELEMENT
;;
;; Get what this USER-ELEMENT-TO. Returns the root ELEMENT after it expands.

The H macro

;; Macro H &BODY CHILDREN
;;
;; Like a PROGN, except it will replace all html tag SYMBOLs with the same name one
;; in FLUTE PACKAGE, so you don't need to import all of them. As an alternative you
;; can import all or part of html element functions in FLUTE PACKAGE to use them
;; without H macro

Escape utility

;; Variable *ESCAPE-HTML*
;;
;; Specify the escape option when generate html, can be :UTF8, :ASCII, :ATTR or NIL.
;; If :UTF8, escape only #\<, #\> and #\& in body, and \" in attribute keys. #\' will
;; in attribute keys will not be escaped since flute will always use double quote for
;; attribute keys.
;; If :ASCII, besides what escaped in :UTF8, also escape all non-ascii characters.
;; If :ATTR, only #\" in attribute values will be escaped.
;; If NIL, nothing is escaped and programmer is responsible to escape elements properly.
;; When given :ASCII and :ATTR, it's possible to insert html text as a children, e.g.
;; (div :id "container" "Some <b>text</b>")
;; All the escapes are done in element creation time.

;; Function ESCAPE-STRING STRING TEST
;;
;; Escape the STRING if it's a STRING and escaping all charaters C that satisfied
;; (FUNCALL TEST C). Return the new STRING after escape.

;; Function UTF8-HTML-ESCAPE-CHAR-P CHAR
;;
;; Return T if CHAR is a CHARACTER that need to be escaped when HTML is UTF-8 encoded.
;; Return NIL otherwise.

;; Function ASCII-HTML-ESCAPE-CHAR-P CHAR
;;
;; Return T if CHAR is a CHARACTER that need to be escaped when HTML is ASCII encoded.
;; Return NIL otherwise.


;; Function ATTR-VALUE-ESCAPE-CHAR-P CHAR
;;
;; Return T if CHAR is a CHARACTER that need to be escaped when as an attribute value.
;; Return NIL otherwise.

Generate HTML string

;; Method ELEMENT-STRING ELEMENT
;;
;; Return human readable, indented HTML string for ELEMENT

;; Method ELEM-STR ELEMENT
;;
;; Return minify HTML string for ELEMENT

License

Licensed under MIT License. Copyright (c) 2018, Bo Yao. All rights reserved.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 flute

Author

Bo Yao <icerove@gmail.com>

License

MIT

Description

A beautiful, easilly composable HTML5 generation library

Long Description

# Flute

Flute is a beautiful, easily composable HTML5 generation library in Common Lisp. It’s

- Simple: the most simplistic syntax, for builtin and customized elements;
- Easy to debug: pretty print generated html snippet in REPL;
- Powerful: help you define reusable and composable components, like that in React
- Modern: focus only on HTML5

# Getting started

## Install and run tests

“‘lisp
(ql:quickload :flute)
(ql:quickload :flute-test)
“‘

Then define a new package specifically for HTML generation, in its definition:
“‘lisp
(defpackage flute-user
(:use :cl :flute))
“‘
If you don’t want to import all symbols, see [H Macro](#h-macro), which provide a similar interface as a tranditional Lisp HTML generation library.

## Using html elements
“‘
(html
(head
(link :rel "...")
(script :src "..."))
(body
(div :id "a" :class "b"
(p :style "color: red"
"Some text")
"Some text in div"
(img :src "/img/dog.png")
(a ’(:href "/cat")
(img ’((:src . "/img/cat.png")))))))
“‘

These ‘html‘, ‘div‘, etc. are just functions. Element attribute can be given inline as the above example, or as alist/plist/attrs object as the first argument, like the last ‘a‘ and ‘img‘ in the above example. In this case they can be variables that calculated programmatically.

The remaining argument will be recognized as the children of this element. Each child can be:
1. string;
2. element, builtin or user defined;
3. list of 1, 2 and 3. Can also be NIL.
All children will be flattened as if they’re given inline.

## Define new element
“‘lisp
(define-element dog (id size)
(if (and (realp size) (> size 10))
(div :id id :class "big-dog"
children
"dog")
(div :id id :class "small-dog"
children
"dog")))
“‘
‘dog‘ will be defined as a function that takes ‘:id‘ and ‘:size‘ keyword arguments. ‘dog‘ returns an user-defined element object. Inside it, ‘children‘ will be replaced with the children elements you provided when creating this ‘dog‘:
“‘
FLUTE-USER> (defparameter *dog1* (dog :id "dog1" :size 20))
*DOG1*
FLUTE-USER> *dog1*
<div id="dog1" class="big-dog">dog</div>
FLUTE-USER> (dog :id "dog2" "I am a dog" *)
<div id="dog2" class="small-dog">
I am a dog
<div id="dog1" class="big-dog">dog</div>
dog
</div>
“‘

All elements, both builtin and user defined ones are objects, although they’re printed as html snippet in REPL. Their attribute can be accessed by ‘(element-attrs element)‘. Their children can be accessed by ‘(element-children elements)‘ and tag name by ‘(element-tag element)‘. You can modify an exising element’s attrs and children. If you modify a user defined element, the body you defined in it’s ‘define-element‘ also re-executed to take effect of the the attrs and children change:
“‘
FLUTE-USER> *dog1*
<div id="dog1" class="big-dog">dog</div>
FLUTE-USER> (setf (attr *dog1* :size) 10
;; attr is a helper method to set (flute:element-attrs *dog1*)
(attr *dog1* :id) "dooooog1"
(element-children *dog1*) (list "i’m small now"))
("i’m small now")
FLUTE-USER> *dog1*
<div id="dooooog1" class="small-dog">
i’m small now
dog
</div>
“‘

By default user element is printed as what it expand to. If you have a lot of user defined element nested deeply, you probably want to have a look at the high level:
“‘
FLUTE-USER> (let ((*expand-user-element* nil))
(print *dog1*)
(values))

<dog id="dooooog1" size=10>i’m small now</dog>
; No value
FLUTE-USER>
“‘

## Generate HTML
To generate a piece of HTML string that probably used in a response of a backend service:
“‘lisp
(elem-str element)
“‘
To generate HTML string that has nice indent as that in REPL:
“‘lisp
(element-string element)
“‘
To generate that and write to file, just create a stream, then ‘(write element :stream stream)‘ for human or ‘(write element :stream stream :pretty nil)‘ for production.

## H macro
If you don’t want to import all the symbols, you can use the ‘h‘ macro:
“‘lisp
(defpackage flute-min
(:use :cl)
(:import-from :flute
:h
:define-element))
“‘
Then just wrap ‘h‘ for all html generation part. In the same examples above, it becomes:
“‘ lisp
(in-package :flute-min)
(h (html
(head
(link :rel "...")
(script :src "..."))
(body
(div :id "a" :class "b"
(p :style "color: red"
"Some text")
"Some text in div"
(img :src "/img/dog.png")
(a ’(:href "/cat")
(img ’((:src . "/img/cat.png"))))))))

(define-element dog (id size)
(if (and (realp size) (> size 10))
(h (div :id id :class "big-dog"
flute:children
"dog"))
(h (div :id id :class "small-dog"
flute:children
"dog"))))

(defparameter *dog2* (dog :id "dog2" :size 20 "some children"))
“‘
From version 0.2 (available in Aug 2018 Quicklisp), flute supports css style id and class attribute for builtin elements. For example ‘div#id-name.class1.class2‘, So you can also write:
“‘lisp
(h (div#a.b "..."))
;; Provide additional class and attributes
(h (div#a.b :class "c" :onclick "fun()"))
“‘

## Inline CSS and JavaScript
With help of [cl-css](https://github.com/Inaimathi/cl-css) (available in Quicklisp), You can write inline CSS for the ‘style‘ attribute, in a similar syntax like flute:
“‘lisp
(div :style (inline-css ’(:margin 5px :padding 0px)))
“‘
‘cl-css:inline-css‘ is a function taking plist and returns the result css string, so it can be safely used inside or outside of ‘H‘ macro and with variable arguments.

With help of [Parenscript](https://github.com/vsedach/Parenscript) (available in Quicklisp), You can write inline JavaScript for ‘onclick‘, etc. attribute:
“‘lisp
(button :onclick (ps-inline (func)))
“‘

That’s all you need to know to define elements and generate html. Please reference the [API Reference](#api-reference) Section for detailed API.

# Change Logs
## 2018/07/28 Version 0.2-dev
- Support ‘element#id.class1.class2‘ in ‘H‘ macro for builtin elements;
- Suggestions on inline CSS and JavaScript in lispy way;
- Jon Atack fix an error example in README.
## 2018/07/11 Version 0.1
- Current features, APIs and Tests.

# Motivation
Currently there’re a few HTML generation library in Common Lisp, like [CL-WHO](https://edicl.github.io/cl-who/), [CL-MARKUP](https://github.com/arielnetworks/cl-markup) and [Spinneret](https://github.com/ruricolist/spinneret). They both have good features for generating standard HTML, but not very good at user element (components) that currently widely used in frontend: you need to define all of them as macros and to define components on top of these components, you’ll have to make these components more complex macros to composite them. [Spinneret](https://github.com/ruricolist/spinneret) has a ‘deftag‘ feature, but ‘deftag‘ is still expand to a ‘defmacro‘.

I’d also want to modify the customer component attribute after create it and incorporate it with it’s own logic (like the dog size example above), this logic should be any lisp code. This requires provide all element as object, not plain HTML text generation. With this approach, all elements have a same name function to create it, and returns element that you can modify later. These objects are virtual doms and it’s very pleasant to write html code and frontend component by just composite element objects as arguments in element creation function calls. Flute’s composite feature inspired by [Hiccup](https://github.com/weavejester/hiccup) and [Reagent](https://github.com/reagent-project/reagent) but more powerful – in flute, user defined elements is real object with attributes and it’s own generation logic.

# Limitation
With the function name approach, it’s not possible to support ‘div.id#class1#class2‘ style function names. I’m working on some tweak of reader macros in [illusion](https://github.com/ailisp/illusion) library to detect this and convert it to ‘(div :id "id" :class "class1 class2" ...)‘ call

The most and major limitation is we don’t have a substential subset of Common Lisp in browser so flute can be used in frontend. [Parenscript](https://github.com/vsedach/Parenscript) is essentially a JavaScript semantic in Lisp like syntax. [JSCL](https://github.com/jscl-project/jscl) is promosing, but by now it seems focus on creating a CL REPL on Web and doesn’t support ‘format‘ or CLOS. Also we lack enough infrastructure to build Common Lisp to JavaScript (might be an asdf plugin) and connect to a browser "Swank" via WebSocket from Emacs. I’ll be working these: a full or at least substential subset of Common Lisp to JavaScript Compiler to eventually have a full frontend development environment in Common Lisp. Any help or contribution is welcome.

# API Reference
Here is a draft version of API Reference, draft means it will be better organized and moved to a separate HTML doc, but it’s content is already quite complete.

## Builtin HTML elements
“‘
a abbr address area article aside audio b base bdi bdo blockquote
body br button canvas caption cite code col colgroup data datalist
dd del details dfn dialog div dl dt em embed fieldset figcaption
figure footer form h1 h2 h3 h4 h5 h6 head header hr i iframe html
img input ins kbd label legend li link main |map| mark meta meter nav
noscript object ol optgroup option output p param picture pre progress
q rp rt ruby s samp script section select small source span strong
style sub summary sup svg table tbody td template textarea tfoot th
thead |time| title tr track u ul var video wbr
“‘
All of above HTML5 elements are functions, which support same kinds of parameters, take ‘A‘ as example:
“‘ lisp
;; Function A &REST ATTRS-AND-CHILREN
;;
;; Create and return an <a> element object
;; ATTRS-AND-CHILDREN can be the following:

;; 1. an empty <a> tag
(a)

;; 2. attributes of alist, plist or ATTRS object
;; The following creates: <a id="aa" customer-attr="bb">
(a :id "aa" :customer-attr "bb")
(a ’(:id "aa" :customer-attr "bb"))
(a ’((:id . "aa") (:customer-attr . "bb")))
;; or assume we have the above one in variable a1
(a (element-attrs a1)) ; to share the same attrs with a1
(a (copy-attrs (element-attrs a1)))

;; 3. any of above format attributes with children
(a :id "aa" :customer-attr "bb"
"Some children"
(div ’(:id "an element children"))
; list of any depth containing elements and texts, will be flattened
(list a1 a2 (a ’((:id . "aaa")) "some text")
(list (h1 "aaa")))
"some other text")
“‘
The ‘HTML‘ element is a little special, it’s with ‘<!DOCTYPE html>‘ prefix to make sure browser recognize it correctly.

## User defined elements
“‘lisp
;; Macro DEFINE-ELEMENT NAME (&REST ARGS) &BODY BODY
;;
;; Define a user element with NAME as its tag name and function
;; NAME. After DEFINE-ELEMENT, a FUNCTION of NAME in current package
;; is defined. ARGS specified the possible keyword ARGS it can take as
;; it’s ATTRS. You can either use these ARGS as Lisp arguments in the
;; BODY of its definition and plug in them to the BODY it expand to.
;; You can use FLUTE:CHILDREN to get or set it’s children that you give
;; when call function NAME, FLUTE:ATTRS to get or set it’s attributes
;; and FLUTE:TAG to get or set it’s tag name.

;; Variable *EXPAND-USER-ELEMENT*
;;
;; Bind this variable to specify whether the user elements are print in
;; a high level (NIL), or expand to HTML elements (T). T by default.
“‘

## Attribute accessing utility
“‘ lisp
;; Function ATTRS-ALIST ATTRS
;; Function (SETF ATTRS-ALIST) ATTRS
;;
;; Return or set the attrs object in alist format

;; Function MAKE-ATTRS &KEYS ALIST
;;
;; Create a attrs aoject, given an alist of (:attr . "attr-value") pair.
;; Attribute values (cdr of each element in alist) will be escaped if
;; *ESCAPE-HTML* is not NIL

;; Function COPY-ATTRS ATTRS
;;
;; Make a copy and return the copy of ATTRS object

;; Method ATTR ATTRS KEY
;; Method (SETF ATTR) ATTRS KEY
;; Method ATTR ELEMENT KEY
;; Method (SETF ATTR) ELEMENT KEY
;;
;; Get or set the attribute value of given KEY. KEY should be an keyword.
;; If KEY does not exist, ATTR method will return NIL. (SETF ATTR) method
;; will create the (KEY . VALUE) pair. Don’t use (SETF (ATTR ATTRS :key) NIL)
;; or (SETF (ATTR ELEMENT :key) NIL) to remove an attr, use DELETE-ATTR.

;; Method DELETE-ATTR ATTRS KEY
;; Method DELETE-ATTR ELEMENT KEY
;;
;; Delete the attribute key value pair from ATTRS or ELEMENT’s ELEMENT-ATTRS,
;; will ignore if KEY doesn’t exist.

“‘

## Element slots
“‘lisp
;; Method ELEMENT-TAG ELEMENT
;; Method (SETF ELEMENT-TAG) ELEMENT
;;
;; Get or set the ELEMENT-TAG STRING. For example <html>’s ELEMENT-TAG is "html"

;; Method ELEMENT-ATTRS ELEMENT
;; Method (SETF ELEMENT-ATTRS) ELEMENT
;;
;; Get or set the ELEMENT-ATTRS. When set this, must be an ATTRS object

;; Method ELEMENT-CHILDREN ELEMENT
;; Method (SETF ELEMENT-CHILDREN) ELEMENT
;;
;; Get or set element children. When set this manually, must given a flatten list
;; of ELEMENT or STRING.

;; Method USER-ELEMENT-EXPAND-TO USER-ELEMENT
;;
;; Get what this USER-ELEMENT-TO. Returns the root ELEMENT after it expands.
“‘

## The H macro
“‘lisp
;; Macro H &BODY CHILDREN
;;
;; Like a PROGN, except it will replace all html tag SYMBOLs with the same name one
;; in FLUTE PACKAGE, so you don’t need to import all of them. As an alternative you
;; can import all or part of html element functions in FLUTE PACKAGE to use them
;; without H macro

“‘

## Escape utility
“‘lisp
;; Variable *ESCAPE-HTML*
;;
;; Specify the escape option when generate html, can be :UTF8, :ASCII, :ATTR or NIL.
;; If :UTF8, escape only #\<, #\> and #\& in body, and \" in attribute keys. #\’ will
;; in attribute keys will not be escaped since flute will always use double quote for
;; attribute keys.
;; If :ASCII, besides what escaped in :UTF8, also escape all non-ascii characters.
;; If :ATTR, only #\" in attribute values will be escaped.
;; If NIL, nothing is escaped and programmer is responsible to escape elements properly.
;; When given :ASCII and :ATTR, it’s possible to insert html text as a children, e.g.
;; (div :id "container" "Some <b>text</b>")
;; All the escapes are done in element creation time.

;; Function ESCAPE-STRING STRING TEST
;;
;; Escape the STRING if it’s a STRING and escaping all charaters C that satisfied
;; (FUNCALL TEST C). Return the new STRING after escape.

;; Function UTF8-HTML-ESCAPE-CHAR-P CHAR
;;
;; Return T if CHAR is a CHARACTER that need to be escaped when HTML is UTF-8 encoded.
;; Return NIL otherwise.

;; Function ASCII-HTML-ESCAPE-CHAR-P CHAR
;;
;; Return T if CHAR is a CHARACTER that need to be escaped when HTML is ASCII encoded.
;; Return NIL otherwise.

;; Function ATTR-VALUE-ESCAPE-CHAR-P CHAR
;;
;; Return T if CHAR is a CHARACTER that need to be escaped when as an attribute value.
;; Return NIL otherwise.

“‘

## Generate HTML string

“‘ lisp
;; Method ELEMENT-STRING ELEMENT
;;
;; Return human readable, indented HTML string for ELEMENT

;; Method ELEM-STR ELEMENT
;;
;; Return minify HTML string for ELEMENT
“‘

# License
Licensed under MIT License.
Copyright (c) 2018, Bo Yao. All rights reserved.

Dependencies
Source

flute.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 flute/src

Parent

flute (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 flute.asd

Location

flute.asd

Systems

flute (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 flute/src/package.lisp

Parent

src (module)

Location

src/package.lisp

Packages

flute


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 flute/src/util.lisp

Dependency

package.lisp (file)

Parent

src (module)

Location

src/util.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.4 flute/src/flute.lisp

Dependency

util.lisp (file)

Parent

src (module)

Location

src/flute.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

5.1 flute

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Special variables

Special Variable: *escape-html*

Specify the escape option when generate html, can be :UTF8, :ASCII, :ATTR or NIL. If :UTF8, escape only #<, #> and #& in body, and " in attribute keys. #’ will
in attribute keys will not be escaped since flute will always use double quote for attribute keys.
If :ASCII, besides what escaped in :UTF8, also escape all non-ascii characters. If :ATTR, only #" in attribute values will be escaped.
If NIL, nothing is escaped and programmer is responsible to escape elements properly. When given :ASCII and :ATTR, it’s possible to insert html text as a children, e.g. (div :id "container" "Some <b>text</b>")

Package

flute

Source

flute.lisp (file)

Special Variable: *expand-user-element*
Package

flute

Source

flute.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Macros

Macro: define-element NAME (&rest ARGS) &body BODY
Package

flute

Source

flute.lisp (file)

Macro: h &body BODY
Package

flute

Source

flute.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Functions

Function: a &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: abbr &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: address &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: area &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: article &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: ascii-html-escape-char-p CHAR
Package

flute

Source

util.lisp (file)

Function: aside &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: attr-value-escape-char-p CHAR
Package

flute

Source

util.lisp (file)

Function: attrs-alist INSTANCE
Function: (setf attrs-alist) VALUE INSTANCE
Package

flute

Source

flute.lisp (file)

Function: audio &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: b &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: base &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: bdi &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: bdo &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: blockquote &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: body &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: br &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: button &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: canvas &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: caption &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: cite &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: code &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: col &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: colgroup &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: copy-attrs INSTANCE
Package

flute

Source

flute.lisp (file)

Function: data &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: datalist &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: dd &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: del &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: details &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: dfn &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: dialog &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: div &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: dl &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: dt &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: em &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: embed &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: escape-string STRING &optional TEST
Package

flute

Source

util.lisp (file)

Function: fieldset &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: figcaption &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: figure &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Package

flute

Source

flute.lisp (file)

Function: form &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: h1 &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: h2 &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: h3 &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: h4 &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: h5 &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: h6 &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: head &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: header &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: hr &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: html &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: i &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: iframe &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: img &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: input &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: ins &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: kbd &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: label &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: legend &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: li &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Package

flute

Source

flute.lisp (file)

Function: main &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: make-attrs &key ALIST
Package

flute

Source

flute.lisp (file)

Function: map &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: mark &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: meta &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: meter &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: nav &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: noscript &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: object &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: ol &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: optgroup &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: option &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: output &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: p &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: param &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: picture &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: pre &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: progress &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: q &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: rp &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: rt &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: ruby &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: s &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: samp &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: script &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: section &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: select &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: small &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: source &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: span &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: strong &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: style &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: sub &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: summary &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: sup &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: svg &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: table &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: tbody &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: td &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: template &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: textarea &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: tfoot &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: th &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: thead &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: time &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: title &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: tr &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: track &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: u &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: ul &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: utf8-html-escape-char-p CHAR
Package

flute

Source

util.lisp (file)

Function: var &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: video &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)

Function: wbr &rest ATTRS-AND-CHILDREN
Package

flute

Source

flute.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 Generic functions

Generic Function: attr ATTRS KEY
Generic Function: (setf attr) VALUE ATTRS KEY
Package

flute

Methods
Method: attr (ELEMENT element) KEY
Method: (setf attr) VALUE (ELEMENT element) KEY
Source

flute.lisp (file)

Method: attr (ATTRS attrs) KEY
Method: (setf attr) VALUE (ATTRS attrs) KEY
Source

flute.lisp (file)

Generic Function: delete-attr ATTRS KEY
Package

flute

Methods
Method: delete-attr (ELEMENT element) KEY
Source

flute.lisp (file)

Method: delete-attr (ATTRS attrs) KEY
Source

flute.lisp (file)

Generic Function: elem-str ELEMENT
Package

flute

Methods
Method: elem-str (ELEMENT element)
Source

flute.lisp (file)

Generic Function: element-attrs OBJECT
Generic Function: (setf element-attrs) NEW-VALUE OBJECT
Package

flute

Methods
Method: element-attrs (ELEMENT element)

automatically generated reader method

Source

flute.lisp (file)

Method: (setf element-attrs) NEW-VALUE (ELEMENT element)

automatically generated writer method

Source

flute.lisp (file)

Generic Function: element-children OBJECT
Generic Function: (setf element-children) NEW-VALUE OBJECT
Package

flute

Methods
Method: element-children (ELEMENT element)

automatically generated reader method

Source

flute.lisp (file)

Method: (setf element-children) NEW-VALUE (ELEMENT element)

automatically generated writer method

Source

flute.lisp (file)

Generic Function: element-string ELEMENT
Package

flute

Methods
Method: element-string (ELEMENT element)
Source

flute.lisp (file)

Generic Function: element-tag OBJECT
Generic Function: (setf element-tag) NEW-VALUE OBJECT
Package

flute

Methods
Method: element-tag (ELEMENT element)

automatically generated reader method

Source

flute.lisp (file)

Method: (setf element-tag) NEW-VALUE (ELEMENT element)

automatically generated writer method

Source

flute.lisp (file)

Generic Function: user-element-expand-to ELEMENT
Package

flute

Methods
Method: user-element-expand-to (ELEMENT user-element)
Source

flute.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.5 Structures

Structure: attrs ()
Package

flute

Source

flute.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: alist
Readers

attrs-alist (function)

Writers

(setf attrs-alist) (function)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Special variables

Special Variable: *builtin-elements*
Package

flute

Source

flute.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Macros

Macro: define-and-export-builtin-elements &rest ELEMENT-NAMES
Package

flute

Source

flute.lisp (file)

Macro: define-builtin-element ELEMENT-NAME
Package

flute

Source

flute.lisp (file)

Macro: tree-leaves TREE TEST RESULT
Package

flute

Source

util.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Functions

Function: !expanded-list INSTANCE
Function: (setf !expanded-list) VALUE INSTANCE
Package

flute

Source

util.lisp (file)

Function: !expanded-p OBJECT
Package

flute

Source

util.lisp (file)

Function: %make-attrs &key (ALIST ALIST)
Package

flute

Source

flute.lisp (file)

Function: alist-plist* ALIST
Package

flute

Source

util.lisp (file)

Function: append-inline-attrs ATTRS-AND-CHILDREN
Package

flute

Source

util.lisp (file)

Function: attrs-p OBJECT
Package

flute

Source

flute.lisp (file)

Function: collect-id-and-class SYMBOL
Package

flute

Source

util.lisp (file)

Function: collect-name-as-keyword SYMBOL
Package

flute

Source

util.lisp (file)

Function: collect-until-dot-or-sharp STRING
Package

flute

Source

util.lisp (file)

Function: copy-!expanded INSTANCE
Package

flute

Source

util.lisp (file)

Function: escape-attrs-alist ALIST
Package

flute

Source

util.lisp (file)

Function: escape-char CHAR
Package

flute

Source

util.lisp (file)

Function: escape-children CHILDREN
Package

flute

Source

util.lisp (file)

Function: html-element-p X
Package

flute

Source

flute.lisp (file)

Function: make-!expanded &key (LIST LIST)
Package

flute

Source

util.lisp (file)

Function: make-builtin-element &key TAG ATTRS CHILDREN
Package

flute

Source

flute.lisp (file)

Function: make-builtin-element-with-prefix &key TAG ATTRS CHILDREN PREFIX
Package

flute

Source

flute.lisp (file)

Function: make-user-element &rest ARGS &key TAG ATTRS CHILDREN EXPANDER
Package

flute

Source

flute.lisp (file)

Function: plist-alist PLIST
Package

flute

Source

util.lisp (file)

Function: split-attrs-and-children ATTRS-AND-CHILDREN
Package

flute

Source

util.lisp (file)

Function: tree-leaves%% TREE TEST RESULT
Package

flute

Source

util.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Generic functions

Generic Function: element-prefix OBJECT
Generic Function: (setf element-prefix) NEW-VALUE OBJECT
Package

flute

Methods
Method: element-prefix (BUILTIN-ELEMENT-WITH-PREFIX builtin-element-with-prefix)

automatically generated reader method

Source

flute.lisp (file)

Method: (setf element-prefix) NEW-VALUE (BUILTIN-ELEMENT-WITH-PREFIX builtin-element-with-prefix)

automatically generated writer method

Source

flute.lisp (file)

Generic Function: user-element-expander OBJECT
Generic Function: (setf user-element-expander) NEW-VALUE OBJECT
Package

flute

Methods
Method: user-element-expander (USER-ELEMENT user-element)

automatically generated reader method

Source

flute.lisp (file)

Method: (setf user-element-expander) NEW-VALUE (USER-ELEMENT user-element)

automatically generated writer method

Source

flute.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.5 Structures

Structure: !expanded ()
Package

flute

Source

util.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: list
Readers

!expanded-list (function)

Writers

(setf !expanded-list) (function)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.6 Classes

Class: builtin-element ()
Package

flute

Source

flute.lisp (file)

Direct superclasses

element (class)

Direct subclasses

builtin-element-with-prefix (class)

Class: builtin-element-with-prefix ()
Package

flute

Source

flute.lisp (file)

Direct superclasses

builtin-element (class)

Direct methods
  • print-object (method)
  • element-prefix (method)
  • element-prefix (method)
Direct slots
Slot: prefix
Initargs

:prefix

Readers

element-prefix (generic function)

Writers

(setf element-prefix) (generic function)

Class: element ()
Package

flute

Source

flute.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: tag
Initargs

:tag

Readers

element-tag (generic function)

Writers

(setf element-tag) (generic function)

Slot: attrs
Initargs

:attrs

Readers

element-attrs (generic function)

Writers

(setf element-attrs) (generic function)

Slot: children
Initargs

:children

Readers

element-children (generic function)

Writers

(setf element-children) (generic function)

Class: user-element ()
Package

flute

Source

flute.lisp (file)

Direct superclasses

element (class)

Direct methods
Direct slots
Slot: expand-to
Initargs

:expander

Readers

user-element-expander (generic function)

Writers

(setf user-element-expander) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   M  
Index Entry  Section

F
File, Lisp, flute.asd: The flute<dot>asd file
File, Lisp, flute/src/flute.lisp: The flute/src/flute<dot>lisp file
File, Lisp, flute/src/package.lisp: The flute/src/package<dot>lisp file
File, Lisp, flute/src/util.lisp: The flute/src/util<dot>lisp file
flute.asd: The flute<dot>asd file
flute/src: The flute/src module
flute/src/flute.lisp: The flute/src/flute<dot>lisp file
flute/src/package.lisp: The flute/src/package<dot>lisp file
flute/src/util.lisp: The flute/src/util<dot>lisp file

L
Lisp File, flute.asd: The flute<dot>asd file
Lisp File, flute/src/flute.lisp: The flute/src/flute<dot>lisp file
Lisp File, flute/src/package.lisp: The flute/src/package<dot>lisp file
Lisp File, flute/src/util.lisp: The flute/src/util<dot>lisp file

M
Module, flute/src: The flute/src module

Jump to:   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   !   %   (  
A   B   C   D   E   F   G   H   I   K   L   M   N   O   P   Q   R   S   T   U   V   W  
Index Entry  Section

!
!expanded-list: Internal functions
!expanded-p: Internal functions

%
%make-attrs: Internal functions

(
(setf !expanded-list): Internal functions
(setf attr): Exported generic functions
(setf attr): Exported generic functions
(setf attr): Exported generic functions
(setf attrs-alist): Exported functions
(setf element-attrs): Exported generic functions
(setf element-attrs): Exported generic functions
(setf element-children): Exported generic functions
(setf element-children): Exported generic functions
(setf element-prefix): Internal generic functions
(setf element-prefix): Internal generic functions
(setf element-tag): Exported generic functions
(setf element-tag): Exported generic functions
(setf user-element-expander): Internal generic functions
(setf user-element-expander): Internal generic functions

A
a: Exported functions
abbr: Exported functions
address: Exported functions
alist-plist*: Internal functions
append-inline-attrs: Internal functions
area: Exported functions
article: Exported functions
ascii-html-escape-char-p: Exported functions
aside: Exported functions
attr: Exported generic functions
attr: Exported generic functions
attr: Exported generic functions
attr-value-escape-char-p: Exported functions
attrs-alist: Exported functions
attrs-p: Internal functions
audio: Exported functions

B
b: Exported functions
base: Exported functions
bdi: Exported functions
bdo: Exported functions
blockquote: Exported functions
body: Exported functions
br: Exported functions
button: Exported functions

C
canvas: Exported functions
caption: Exported functions
cite: Exported functions
code: Exported functions
col: Exported functions
colgroup: Exported functions
collect-id-and-class: Internal functions
collect-name-as-keyword: Internal functions
collect-until-dot-or-sharp: Internal functions
copy-!expanded: Internal functions
copy-attrs: Exported functions

D
data: Exported functions
datalist: Exported functions
dd: Exported functions
define-and-export-builtin-elements: Internal macros
define-builtin-element: Internal macros
define-element: Exported macros
del: Exported functions
delete-attr: Exported generic functions
delete-attr: Exported generic functions
delete-attr: Exported generic functions
details: Exported functions
dfn: Exported functions
dialog: Exported functions
div: Exported functions
dl: Exported functions
dt: Exported functions

E
elem-str: Exported generic functions
elem-str: Exported generic functions
element-attrs: Exported generic functions
element-attrs: Exported generic functions
element-children: Exported generic functions
element-children: Exported generic functions
element-prefix: Internal generic functions
element-prefix: Internal generic functions
element-string: Exported generic functions
element-string: Exported generic functions
element-tag: Exported generic functions
element-tag: Exported generic functions
em: Exported functions
embed: Exported functions
escape-attrs-alist: Internal functions
escape-char: Internal functions
escape-children: Internal functions
escape-string: Exported functions

F
fieldset: Exported functions
figcaption: Exported functions
figure: Exported functions
footer: Exported functions
form: Exported functions
Function, !expanded-list: Internal functions
Function, !expanded-p: Internal functions
Function, %make-attrs: Internal functions
Function, (setf !expanded-list): Internal functions
Function, (setf attrs-alist): Exported functions
Function, a: Exported functions
Function, abbr: Exported functions
Function, address: Exported functions
Function, alist-plist*: Internal functions
Function, append-inline-attrs: Internal functions
Function, area: Exported functions
Function, article: Exported functions
Function, ascii-html-escape-char-p: Exported functions
Function, aside: Exported functions
Function, attr-value-escape-char-p: Exported functions
Function, attrs-alist: Exported functions
Function, attrs-p: Internal functions
Function, audio: Exported functions
Function, b: Exported functions
Function, base: Exported functions
Function, bdi: Exported functions
Function, bdo: Exported functions
Function, blockquote: Exported functions
Function, body: Exported functions
Function, br: Exported functions
Function, button: Exported functions
Function, canvas: Exported functions
Function, caption: Exported functions
Function, cite: Exported functions
Function, code: Exported functions
Function, col: Exported functions
Function, colgroup: Exported functions
Function, collect-id-and-class: Internal functions
Function, collect-name-as-keyword: Internal functions
Function, collect-until-dot-or-sharp: Internal functions
Function, copy-!expanded: Internal functions
Function, copy-attrs: Exported functions
Function, data: Exported functions
Function, datalist: Exported functions
Function, dd: Exported functions
Function, del: Exported functions
Function, details: Exported functions
Function, dfn: Exported functions
Function, dialog: Exported functions
Function, div: Exported functions
Function, dl: Exported functions
Function, dt: Exported functions
Function, em: Exported functions
Function, embed: Exported functions
Function, escape-attrs-alist: Internal functions
Function, escape-char: Internal functions
Function, escape-children: Internal functions
Function, escape-string: Exported functions
Function, fieldset: Exported functions
Function, figcaption: Exported functions
Function, figure: Exported functions
Function, footer: Exported functions
Function, form: Exported functions
Function, h1: Exported functions
Function, h2: Exported functions
Function, h3: Exported functions
Function, h4: Exported functions
Function, h5: Exported functions
Function, h6: Exported functions
Function, head: Exported functions
Function, header: Exported functions
Function, hr: Exported functions
Function, html: Exported functions
Function, html-element-p: Internal functions
Function, i: Exported functions
Function, iframe: Exported functions
Function, img: Exported functions
Function, input: Exported functions
Function, ins: Exported functions
Function, kbd: Exported functions
Function, label: Exported functions
Function, legend: Exported functions
Function, li: Exported functions
Function, link: Exported functions
Function, main: Exported functions
Function, make-!expanded: Internal functions
Function, make-attrs: Exported functions
Function, make-builtin-element: Internal functions
Function, make-builtin-element-with-prefix: Internal functions
Function, make-user-element: Internal functions
Function, map: Exported functions
Function, mark: Exported functions
Function, meta: Exported functions
Function, meter: Exported functions
Function, nav: Exported functions
Function, noscript: Exported functions
Function, object: Exported functions
Function, ol: Exported functions
Function, optgroup: Exported functions
Function, option: Exported functions
Function, output: Exported functions
Function, p: Exported functions
Function, param: Exported functions
Function, picture: Exported functions
Function, plist-alist: Internal functions
Function, pre: Exported functions
Function, progress: Exported functions
Function, q: Exported functions
Function, rp: Exported functions
Function, rt: Exported functions
Function, ruby: Exported functions
Function, s: Exported functions
Function, samp: Exported functions
Function, script: Exported functions
Function, section: Exported functions
Function, select: Exported functions
Function, small: Exported functions
Function, source: Exported functions
Function, span: Exported functions
Function, split-attrs-and-children: Internal functions
Function, strong: Exported functions
Function, style: Exported functions
Function, sub: Exported functions
Function, summary: Exported functions
Function, sup: Exported functions
Function, svg: Exported functions
Function, table: Exported functions
Function, tbody: Exported functions
Function, td: Exported functions
Function, template: Exported functions
Function, textarea: Exported functions
Function, tfoot: Exported functions
Function, th: Exported functions
Function, thead: Exported functions
Function, time: Exported functions
Function, title: Exported functions
Function, tr: Exported functions
Function, track: Exported functions
Function, tree-leaves%%: Internal functions
Function, u: Exported functions
Function, ul: Exported functions
Function, utf8-html-escape-char-p: Exported functions
Function, var: Exported functions
Function, video: Exported functions
Function, wbr: Exported functions

G
Generic Function, (setf attr): Exported generic functions
Generic Function, (setf element-attrs): Exported generic functions
Generic Function, (setf element-children): Exported generic functions
Generic Function, (setf element-prefix): Internal generic functions
Generic Function, (setf element-tag): Exported generic functions
Generic Function, (setf user-element-expander): Internal generic functions
Generic Function, attr: Exported generic functions
Generic Function, delete-attr: Exported generic functions
Generic Function, elem-str: Exported generic functions
Generic Function, element-attrs: Exported generic functions
Generic Function, element-children: Exported generic functions
Generic Function, element-prefix: Internal generic functions
Generic Function, element-string: Exported generic functions
Generic Function, element-tag: Exported generic functions
Generic Function, user-element-expand-to: Exported generic functions
Generic Function, user-element-expander: Internal generic functions

H
h: Exported macros
h1: Exported functions
h2: Exported functions
h3: Exported functions
h4: Exported functions
h5: Exported functions
h6: Exported functions
head: Exported functions
header: Exported functions
hr: Exported functions
html: Exported functions
html-element-p: Internal functions

I
i: Exported functions
iframe: Exported functions
img: Exported functions
input: Exported functions
ins: Exported functions

K
kbd: Exported functions

L
label: Exported functions
legend: Exported functions
li: Exported functions
link: Exported functions

M
Macro, define-and-export-builtin-elements: Internal macros
Macro, define-builtin-element: Internal macros
Macro, define-element: Exported macros
Macro, h: Exported macros
Macro, tree-leaves: Internal macros
main: Exported functions
make-!expanded: Internal functions
make-attrs: Exported functions
make-builtin-element: Internal functions
make-builtin-element-with-prefix: Internal functions
make-user-element: Internal functions
map: Exported functions
mark: Exported functions
meta: Exported functions
meter: Exported functions
Method, (setf attr): Exported generic functions
Method, (setf attr): Exported generic functions
Method, (setf element-attrs): Exported generic functions
Method, (setf element-children): Exported generic functions
Method, (setf element-prefix): Internal generic functions
Method, (setf element-tag): Exported generic functions
Method, (setf user-element-expander): Internal generic functions
Method, attr: Exported generic functions
Method, attr: Exported generic functions
Method, delete-attr: Exported generic functions
Method, delete-attr: Exported generic functions
Method, elem-str: Exported generic functions
Method, element-attrs: Exported generic functions
Method, element-children: Exported generic functions
Method, element-prefix: Internal generic functions
Method, element-string: Exported generic functions
Method, element-tag: Exported generic functions
Method, user-element-expand-to: Exported generic functions
Method, user-element-expander: Internal generic functions

N
nav: Exported functions
noscript: Exported functions

O
object: Exported functions
ol: Exported functions
optgroup: Exported functions
option: Exported functions
output: Exported functions

P
p: Exported functions
param: Exported functions
picture: Exported functions
plist-alist: Internal functions
pre: Exported functions
progress: Exported functions

Q
q: Exported functions

R
rp: Exported functions
rt: Exported functions
ruby: Exported functions

S
s: Exported functions
samp: Exported functions
script: Exported functions
section: Exported functions
select: Exported functions
small: Exported functions
source: Exported functions
span: Exported functions
split-attrs-and-children: Internal functions
strong: Exported functions
style: Exported functions
sub: Exported functions
summary: Exported functions
sup: Exported functions
svg: Exported functions

T
table: Exported functions
tbody: Exported functions
td: Exported functions
template: Exported functions
textarea: Exported functions
tfoot: Exported functions
th: Exported functions
thead: Exported functions
time: Exported functions
title: Exported functions
tr: Exported functions
track: Exported functions
tree-leaves: Internal macros
tree-leaves%%: Internal functions

U
u: Exported functions
ul: Exported functions
user-element-expand-to: Exported generic functions
user-element-expand-to: Exported generic functions
user-element-expander: Internal generic functions
user-element-expander: Internal generic functions
utf8-html-escape-char-p: Exported functions

V
var: Exported functions
video: Exported functions

W
wbr: Exported functions

Jump to:   !   %   (  
A   B   C   D   E   F   G   H   I   K   L   M   N   O   P   Q   R   S   T   U   V   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
A   C   E   L   P   S   T  
Index Entry  Section

*
*builtin-elements*: Internal special variables
*escape-html*: Exported special variables
*expand-user-element*: Exported special variables

A
alist: Exported structures
attrs: Internal classes

C
children: Internal classes

E
expand-to: Internal classes

L
list: Internal structures

P
prefix: Internal classes

S
Slot, alist: Exported structures
Slot, attrs: Internal classes
Slot, children: Internal classes
Slot, expand-to: Internal classes
Slot, list: Internal structures
Slot, prefix: Internal classes
Slot, tag: Internal classes
Special Variable, *builtin-elements*: Internal special variables
Special Variable, *escape-html*: Exported special variables
Special Variable, *expand-user-element*: Exported special variables

T
tag: Internal classes

Jump to:   *  
A   C   E   L   P   S   T  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   !  
A   B   C   E   F   P   S   U  
Index Entry  Section

!
!expanded: Internal structures

A
attrs: Exported structures

B
builtin-element: Internal classes
builtin-element-with-prefix: Internal classes

C
Class, builtin-element: Internal classes
Class, builtin-element-with-prefix: Internal classes
Class, element: Internal classes
Class, user-element: Internal classes

E
element: Internal classes

F
flute: The flute system
flute: The flute package

P
Package, flute: The flute package

S
Structure, !expanded: Internal structures
Structure, attrs: Exported structures
System, flute: The flute system

U
user-element: Internal classes

Jump to:   !  
A   B   C   E   F   P   S   U