page: Change sxml field to contents.
Naming the field 'sxml' is a poor choice because it may contain any type of data that the writer procedure accepts. * haunt/page.scm (<page>): Replace 'sxml' field with 'contents'. (page-sxml): Delete accessor. (page-contents): New accessor. (write-page): s/sxml/contents/
This commit is contained in:
parent
4d99832b6b
commit
7c7b161885
|
@ -35,15 +35,15 @@
|
||||||
write-page))
|
write-page))
|
||||||
|
|
||||||
(define-record-type <page>
|
(define-record-type <page>
|
||||||
(make-page file-name sxml writer)
|
(make-page file-name contents writer)
|
||||||
page?
|
page?
|
||||||
(file-name page-file-name)
|
(file-name page-file-name)
|
||||||
(sxml page-sxml)
|
(contents page-contents)
|
||||||
(writer page-writer))
|
(writer page-writer))
|
||||||
|
|
||||||
(define (write-page page output-directory)
|
(define (write-page page output-directory)
|
||||||
"Write PAGE to OUTPUT-DIRECTORY."
|
"Write PAGE to OUTPUT-DIRECTORY."
|
||||||
(match page
|
(match page
|
||||||
(($ <page> file-name sxml writer)
|
(($ <page> file-name contents writer)
|
||||||
(let ((output (string-append output-directory "/" file-name)))
|
(let ((output (string-append output-directory "/" file-name)))
|
||||||
(call-with-output-file output (cut writer sxml <>))))))
|
(call-with-output-file output (cut writer contents <>))))))
|
||||||
|
|
Loading…
Reference in New Issue