Subject: RE: (dsssl) Properly numerated biblography references: solved? From: "Pavel Tolkachev" <pavel.tolkachev@xxxxxx> Date: Fri, 31 Jan 2003 17:46:49 -0500 |
Hello, As promised, I tried it today, and it started working for me immediately -- probably I just do not understand something ;-). Many thanks to everyone who helped me, especially Brandon and Javier! I basically copied the whole citation function to my customization layer for html and changed one line. I do not know how I could make it with less code duplication; probably it would require amending a docbook stylesheets with another customizable parameter or the function; unfortunately the citation function itself is pretty big. The code is at the end of this eMail (I commented the change I made, with !!!). So far I only checked it for single-page html output, I will have to do a lot of checks, find out why my pdf does not generate correct references (even without my customization) etc.., hence the question mark in the subject. Pavel ----cut here--- (element citation (if biblio-citation-check (let* ((bgraphies (select-elements (descendants (sgml-root-element)) (normalize "bibliography"))) (bchildren1 (expand-children bgraphies (list (normalize "bibliography")))) (bchildren2 (expand-children bchildren1 (list (normalize "bibliodiv")))) (bibentries (node-list-filter-by-gi bchildren2 (list (normalize "biblioentry") (normalize "bibliomixed"))))) (let loop ((bibs bibentries)) (if (node-list-empty? bibs) (make sequence (error (string-append "Cannot find citation: " (data (current-node)))) (literal "[") ($charseq$) (literal "]")) (if (citation-matches-target? (current-node) (node-list-first bibs)) (make element gi: "A" attributes: (list (list "HREF" (href-to (node-list-first bibs)))) (literal "[") ;;!!! ($charseq$) ;; I commented out this line and added the next one (literal (number->string (element-number (node-list-first bibs)))) (literal "]")) (loop (node-list-rest bibs)))))) (make sequence (literal "[") ($charseq$) (literal "]")))) -----------cut here----- David.Pawson@xxxxxxxxxxx Sent by: To: dssslist@xxxxxxxxxxxxxxxxxxxxxx owner-dssslist@xxxxxxxxxxx cc: rrytech.com Subject: RE: (dsssl) Properly numerated biblography references 01/24/2003 03:18 AM Please respond to dssslist Pavel, if you get it working as you like it, would you put an example to the list please, and I'll add it to the docbook faq? e.g. the source SGML and the modified DSSSL code. TIA, regards DaveP > You saved a great deal of trial-and-error for me. I am a > novice in DSSSL and even having both the standard and the > source code in front of me, could spend hours to find the > right piece to tweak. > > Pavel > > > > > > > Brandon Ibach > > > <bibach@xxxxxxxxxxxxxx> To: > dssslist@xxxxxxxxxxxxxxxxxxxxxx > > Sent by: cc: > > > owner-dssslist@xxxxxxxxxxx > Subject: Re: (dsssl) Properly numerated biblography > references > rrytech.com > > > > > > > > > 01/23/2003 05:38 PM > > > Please respond to dssslist > > > > > > > > > > > > As long as you want to number all of the biblioentrys in the whole > document as one sequence (don't know why you wouldn't, but you never > know), you can just do: > > (number->string (element-number be)) > > where "be" is the biblioentry node. (Should have covered this before, > but it's been a while since I've done any DSSSL stuff, so my memory is > a bit rusty, and I was too lazy to look it up before. ;) > You may notice, in the code, that there is an option for whether > you want the stylesheet to look up the biblioentry that your citation > is referencing, to make sure it exists. If you don't have it do that, > of course, you wouldn't be able to label the citation with the entry's > number. So, you'll either need to set that option in your > customization layer (the default, false, is set in dbparam.dsl), or > just have your version of the citation element rule not do the check, > and just do the lookup all the time. > > -Brandon :) > > DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist - NOTICE: The information contained in this email and any attachments is confidential and may be legally privileged. If you are not the intended recipient you are hereby notified that you must not use, disclose, distribute, copy, print or rely on this email's content. If you are not the intended recipient, please notify the sender immediately and then delete the email and any attachments from your system. RNIB has made strenuous efforts to ensure that emails and any attachments generated by its staff are free from viruses. However, it cannot accept any responsibility for any viruses which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: (dsssl) Properly numerated bibl, Markus Hoenicka | Thread | |
Re: (dsssl) Properly numerated bibl, Markus Hoenicka | Date | |
Month |