This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [nik@nothing-going-on.demon.co.uk: Bug with%generate-legalnotice-link% and html-manifest]


/ Nik Clayton <nik@nothing-going-on.demon.co.uk> was heard to say:
| I'm forwarding this on to you on the off chance you missed it when it
| I posted it to docbook-apps.  Any thoughts?

Here's the fix:

(mode manifest
  ;; this mode is really just a hack to get at the root element
  (root (process-children))

  (default 
    (if (node-list=? (current-node) (sgml-root-element))
	(if html-manifest
	    (make entity
	      system-id: (html-entity-file html-manifest-filename)
	      (make sequence
		(let loop ((node (current-node)))
		  (if (node-list-empty? node)
		      (empty-sosofo)
		      (make sequence
			(make formatting-instruction data: (html-file node))
			(make formatting-instruction data: "
")
			(loop (next-chunk-element node)))))
		(let loop ((nl (select-elements (descendants (current-node))
						(normalize "legalnotice"))))
		  (if (node-list-empty? nl)
		      (empty-sosofo)
		      (make sequence
			(if (and %generate-legalnotice-link%
				 (not nochunks)
				 (first-sibling? (node-list-first nl)))
			    (make sequence
			      (make formatting-instruction
				data: ($legalnotice-link-file$ (node-list-first nl)))
			      (make formatting-instruction data: "
"))
			    (empty-sosofo))
			(loop (node-list-rest nl)))))))
	    (empty-sosofo))
	(empty-sosofo))))

| 
| My first attempt at a patch is here, but it doesn't work, and I don't
| know why (actually, I do -- DSSSL ignorance on my part).  Any
| suggestions for a fix gratefully accepted.

It doesn't work because the legalnotice elements are part of the
normal chunk hierarchy.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | A man is not necessarily intelligent
http://nwalsh.com/            | because he has plenty of ideas, any
                              | more than he is a good general because
                              | he has plenty of soldiers.--Chamfort

------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]