#| -*-Scheme-*-
-$Id: xml-output.scm,v 1.34 2004/07/24 03:45:49 cph Exp $
+$Id: xml-output.scm,v 1.35 2004/10/15 18:34:20 cph Exp $
Copyright 2001,2002,2003,2004 Massachusetts Institute of Technology
(define-method %write-xml ((element <xml-element>) ctx)
(let ((name (xml-element-name element))
- (contents (xml-element-contents element)))
+ (content (xml-element-content element)))
(emit-string "<" ctx)
(write-xml-name name ctx)
(write-xml-attributes (xml-element-attributes element)
- (if (pair? contents) 1 3)
+ (if (pair? content) 1 3)
ctx)
- (if (pair? contents)
+ (if (pair? content)
(begin
(emit-string ">" ctx)
(for-each (lambda (content) (%write-xml content ctx))
- contents)
+ content)
(emit-string "</" ctx)
(write-xml-name name ctx)
(emit-string ">" ctx))
#| -*-Scheme-*-
-$Id: xml-struct.scm,v 1.46 2004/08/12 06:31:01 cph Exp $
+$Id: xml-struct.scm,v 1.47 2004/10/15 18:34:22 cph Exp $
Copyright 2001,2002,2003,2004 Massachusetts Institute of Technology
(define-xml-type element
(name xml-name?)
(attributes xml-attribute-list?)
- (contents canonicalize canonicalize-content))
+ (content canonicalize canonicalize-content))
(define (xml-attribute-list? object)
(and (list-of-type? object xml-attribute?)
(lambda (attrs . items)
(make-xml-element name
(if (not attrs) '() attrs)
- (flatten-xml-element-contents items))))))
+ (flatten-xml-element-content items))))))
(define (standard-xml-element-predicate qname iri)
(let ((name (make-xml-name qname iri)))
(error "Unknown item passed to xml-attrs:" item))))
'())))
\f
-(define (flatten-xml-element-contents item)
+(define (flatten-xml-element-content item)
(letrec
((scan-item
(lambda (item tail)
#| -*-Scheme-*-
-$Id: xml.pkg,v 1.53 2004/08/10 01:03:02 cph Exp $
+$Id: xml.pkg,v 1.54 2004/10/15 18:34:13 cph Exp $
Copyright 2001,2002,2003,2004 Massachusetts Institute of Technology
(files "xml-struct")
(parent (runtime xml))
(export ()
+ (flatten-xml-element-contents flatten-xml-element-content)
+ (set-xml-element-contents! set-xml-element-content!)
+ (xml-element-contents xml-element-content)
<xml-!attlist>
<xml-!element>
<xml-!entity>
error:not-xml-parameter-entity-ref
error:not-xml-processing-instructions
error:not-xml-unparsed-!entity
- flatten-xml-element-contents
+ flatten-xml-element-content
guarantee-xml-!attlist
guarantee-xml-!element
guarantee-xml-!entity
set-xml-dtd-internal!
set-xml-dtd-root!
set-xml-element-attributes!
- set-xml-element-contents!
+ set-xml-element-content!
set-xml-element-name!
set-xml-entity-ref-name!
set-xml-external-id-id!
xml-dtd-root
xml-dtd?
xml-element-attributes
- xml-element-contents
+ xml-element-content
xml-element-name
xml-element-namespace-decls
xml-element?