2.2 Generating XML Strings
(require scribble/html/xml) | package: scribble-html-lib |
procedure
(output-xml content [port]) → void?
content : outputable/c port : output-port? = (current-output-port)
procedure
(xml->string content) → string?
content : outputable/c
parameter
(xml-writer) → ((string? output-port? . -> . void))
(xml-writer writer) → void? writer : ((string? output-port? . -> . void))
procedure
(make-element tag attrs content)
→ (and/c procedure outputable/c?) tag : symbol? attrs : (listof (cons/c symbol? outputable/c)) content : outputable/c
When an attribute in attrs is mapped to #f, then it is skipped. When an attribute is mapped to #t, then it is rendered as present, but without a value.
Examples: | ||||||||||||
|
procedure
(element tag attrs-and-content ...)
→ (and procedure outputable/c?) tag : symbol? attrs-and-content : any/c
Examples: | |||||||||||||||||||
|
procedure
(element/not-empty tag attrs-and-content ...) → (and/c procedure? outputable/c) tag : symbol? attrs-and-content : any/c
Examples: | ||||||||
|
procedure
(attribute? v) → (or/c #f symbol?)
v : any/c
Examples: | |||||||||
|
procedure
(split-attributes+body lst) →
list? list? lst : list?
procedure
(literal content ...) → procedure?
content : any/c
Examples: | ||||||||
|
procedure
(entity v) → procedure?
v : (or/c exact-integer? symbol?)
Example: | ||||
|
procedure
(comment content ... [#:newlines? newlines?]) → procedure?
content : outputable/c newlines? : any/c = #f
Example: | ||||
|
procedure
(cdata content ... [ #:newlines? newlines? #:line-pfx line-pfx]) → procedure? content : outputable/c newlines? : any/c = #t line-pfx : any/c = #f
Example: | |||||||
|
syntax
(define/provide-elements/empty tag-id ...)
syntax
(define/provide-elements/not-empty tag-id ...)
syntax
(define/provide-entities entity-id ...)