how to minimize nested SXML (and possible bug-report)?

"Hoehle, Joerg-Cyril" <[email protected]> Tue, 21 Oct 2003 11:07:40 +0200
Newsgroups gmane.lisp.scheme.ssax-sxml
Message-ID <[email protected]>
Hi,

Here's the output of a pre-post-order step -- it typically includes many nested parentheses, which mirror past transformations. AFAIK, it's still SXML, ready for input as in a chain of pre-post-order calls.

(define barf '(Coll (Header 123) ((Data ((Request))) (DSig 4))))

I would like to get something which appears to be called minimized or normalized SXML in the SXPATH library, i.e. empty attributes and superfluous nesting are removed, e.g.
(Coll (Header 123) (Date (Request)) (DSig 4))

(sxml:normalized? barf)
-> #t Uh? Bug?
(sxml:content barf)
-> ((Header 123)) Uh?
Data is missing, but given that the form is not what I'd call normalized (cf. source sxml-tools/sxml-tools.scm), no wonder.

(sxml:clean barf)
-> (Coll (Header))
(sxml:squeeze barf)
-> (Coll (Header))

So,
1. how to achieve my initial goal? (it sounds like sxml:clean would do, but it is subject to the above problem with sxml:content)
2. is it related to minimalization?
3. is the above then a bug

Regards,
	Jörg Höhle


-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54