Subject: Re: sgml-parse From: Brandon Ibach <bibach@xxxxxxxxxxxxxx> Date: Tue, 19 Oct 1999 13:36:06 -0500 |
Quoting Pieter Rijken <pieter.rijken@xxxxxx>: > I noticed that the resulting nodelist of a succesfull sgml-parse can be > processed with 'process-node-list' but that other operations like, > children, descendants, process-node-list, etc fail. > Is this behaviour OpenJade specific, or according to the DSSSL > standard, or is it left unspecified by DSSSL? > The reason that (children) and (descendants) return empty node lists when applied to the result of (sgml-parse) is that the result is a nodelist containing the "sgml-document" node which forms the root of the grove. By definition, this node has no children. The (process-children) procedure works around this by "pretending" that the "document-element" property contains the single child of the sgml-document. The following alternative to (children) duplicates this: (define kids (lambda (#!optional (nd (current-node))) (if (equal? 'sgml-document (node-property 'class-name nd)) (node-list-property 'document-element nd) (children nd)))) -Brandon :) DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
sgml-parse, Pieter Rijken | Thread | RE: sgml-parse, Pieter Rijken |
designing LOTs, David C. Mason | Date | Re: processing RTF documents, Ron Ross |
Month |