From cce05027dc61ddae7fe63c3469174ec822fec343 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 9 Mar 2003 17:17:06 +0000 Subject: [PATCH] Change START-INDENT to be two booleans, INDENT-DTD? and INDENT-ATTRIBUTES?. --- v7/src/xml/xml-output.scm | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/v7/src/xml/xml-output.scm b/v7/src/xml/xml-output.scm index 098cff47d..54e971260 100644 --- a/v7/src/xml/xml-output.scm +++ b/v7/src/xml/xml-output.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xml-output.scm,v 1.17 2003/03/08 02:14:18 cph Exp $ +$Id: xml-output.scm,v 1.18 2003/03/09 17:17:06 cph Exp $ Copyright 2001,2002,2003 Massachusetts Institute of Technology @@ -53,8 +53,8 @@ USA. (print-procedure (standard-unparser-method 'XML-OUTPUT-CONTEXT #f))) (port #f read-only #t) - ;; Either a non-negative integer (# of columns) or #f. - (start-indent #f read-only #t)) + (indent-attributes? #f read-only #t) + (indent-dtd? #f read-only #t)) (define (make-ctx port options) (apply %make-ctx 'PORT port options)) @@ -69,14 +69,14 @@ USA. (newline (ctx-port ctx))) (define (ctx-start-col ctx) - (let ((indent (ctx-start-indent ctx)) - (col (output-port/column (ctx-port ctx)))) - (and indent - col - (+ indent col)))) + (output-port/column (ctx-port ctx))) (define (ctx-x-size ctx) (output-port/x-size (ctx-port ctx))) + +(define (dtd-start-col ctx) + (and (ctx-indent-dtd? ctx) + (ctx-start-col ctx))) (define-generic %write-xml (object ctx)) @@ -141,7 +141,7 @@ USA. (define-method %write-xml ((dtd ) ctx) ;;root external internal (emit-string ") ctx) (emit-string ") ctx) (emit-string ") ctx) (emit-string ") ctx) (emit-string "