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:
		| @@ -35,15 +35,15 @@ | ||||
|             write-page)) | ||||
|  | ||||
| (define-record-type <page> | ||||
|   (make-page file-name sxml writer) | ||||
|   (make-page file-name contents writer) | ||||
|   page? | ||||
|   (file-name page-file-name) | ||||
|   (sxml page-sxml) | ||||
|   (contents page-contents) | ||||
|   (writer page-writer)) | ||||
|  | ||||
| (define (write-page page output-directory) | ||||
|   "Write PAGE to OUTPUT-DIRECTORY." | ||||
|   (match page | ||||
|     (($ <page> file-name sxml writer) | ||||
|     (($ <page> file-name contents writer) | ||||
|      (let ((output (string-append output-directory "/" file-name))) | ||||
|        (call-with-output-file output (cut writer sxml <>)))))) | ||||
|        (call-with-output-file output (cut writer contents <>)))))) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 David Thompson
					David Thompson