Subject: Re: trying to catch mixed contents From: Vivek Agrawala <vivek@xxxxxxxxxxxxxxx> Date: Mon, 27 Oct 1997 14:07:15 -0500 |
Franck Delahaye wrote: > > Hello, > > I'd like to use dsssl/jade to transform an SGML document > having mixed contents, in a document without mixed contents: > > for example, the document: > <HTML><HEAD><TITLE>the title</TITLE></HEAD> > <BODY>a mixed content<P>a para</P></BODY></HTML> > > should become after transform: > <HTML><HEAD><TITLE>the title</TITLE></HEAD> > <BODY><P>a mixed content</P><P>a para</P></BODY></HTML> > > [...] > > but I can't find a way to catch "a mixed content" alone in order to make > a P element with it. Here is something that may help you find a solution. Note that this has not been tested. (define (my-process-children snl) (if (node-list-empty? (select-by-class (descendants snl) 'element)) (data snl) ;; you'd have to insert the <P> element in the child-fot somewhere (let loop ( (children-lst (children snl)) (child-fot (empty-sosofo)) ) (if (node-list-empty? children-lst) child-fot (loop (node-list-rest children-lst) (sosofo-append child-fot (process-node-list (node-list-first children-lst))) )) ))) If you find a solution, please consider contributing it to the DSSSL Documentation effort. (See MulberryTech website.) -- Vivek Agrawala, Ph.D. Siemens Corporate Research, Inc. email: vivek@xxxxxxxxxxxxxxx DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
trying to catch mixed contents, Franck Delahaye | Thread | DocBook to HTML version 0.5, Norman Walsh |
trying to catch mixed contents, Franck Delahaye | Date | Re: An open challenge: HTML 4.0 tab, Chris Maden |
Month |