[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK: Re: Inserting raw HTML
[ Follow-ups to docbook-apps, please! ] / Gre7g Luterman <gre7g@wolfhome.com> was heard to say: | Unfortunately, I know so little about DSSSL and Scheme that I don't | know the easy way to do this. Can anyone give me some hints or point | me to a reference that will explain it? Fairly easy in XSLT, but I can't think of any easy way to do it in DSSSL. My first attempt would be along these lines: (define (html-document title-sosofo body-sosofo) (let* (;; Let's look these up once, so that we can avoid calculating ;; them over and over again. (prev (prev-chunk-element)) (next (next-chunk-element)) (prevm (prev-major-component-chunk-element)) (nextm (next-major-component-chunk-element)) (navlist (list prev next prevm nextm)) ;; Let's make it possible to control the output even in the ;; nochunks case. Note: in the nochunks case, (chunk?) will ;; return #t for only the root element. (make-entity? (and (or (not nochunks) rootchunk) (chunk?))) (make-head? (or make-entity? (and nochunks (node-list=? (current-node) (sgml-root-element))))) (doc-sosofo (if make-head? (make element gi: "HTML" (make element gi: "HEAD" (make element gi: "TITLE" title-sosofo) ($standard-html-header$ prev next prevm nextm)) (make element gi: "BODY" attributes: (append (list (list "CLASS" (gi))) %body-attr%) (include-file "/path/to/your/header") (header-navigation (current-node) navlist) body-sosofo (footer-navigation (current-node) navlist))) (include-file "/path/to/your/footer") body-sosofo))) (if make-entity? (make entity system-id: (html-entity-file (html-file)) (if %html-pubid% (make document-type name: "HTML" public-id: %html-pubid%) (empty-sosofo)) doc-sosofo) (if (node-list=? (current-node) (sgml-root-element)) (make sequence (if %html-pubid% (make document-type name: "HTML" public-id: %html-pubid%) (empty-sosofo)) doc-sosofo) doc-sosofo)))) If that escapes all the special characters, which I think it might, I'd try (make formatting-instruction data: (include-file "...")). If that doesn't work, well, there's always Perl :-) Be seeing you, norm -- Norman Walsh <ndw@nwalsh.com> | Our life gets as complicated as a http://www.oasis-open.org/docbook/ | comedy as it goes on, but the Chair, DocBook Technical Committee | complications get gradually | resolved: see that the curtain | comes down on a good | denouement.--Graci\'an
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC