<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [

<!--                        Time-stamp: <2001-08-22 23:14:55 cymbala>  -->

<!-- Set force-absolute-links to "#t" for HTML with links for testing. -->
<!-- Set force-absolute-links to "#f" for HTML with relative links.    -->
<!--                                                                   -->
<!ENTITY force-absolute-links "#f">


<!-- Use this for vol. number until (data from volumenum can be
     put into anchor's href value. -->
<!--                               -->
<!ENTITY volumenum "05">


<!-- This list specifies which role= attributes in glossterm
     elements should cause the term to be enclosed by emphasis
     tags in addition to anchor tags. -->
<!--                                  -->
<!ENTITY roles-to-tag-emphasis "article articles periodical periodicals">











<!ENTITY % l10n-ca "INCLUDE">
<!ENTITY % l10n-cs "INCLUDE">
<!ENTITY % l10n-da "INCLUDE">
<!ENTITY % l10n-de "INCLUDE">
<!ENTITY % l10n-en "INCLUDE">
<!ENTITY % l10n-es "INCLUDE">
<!ENTITY % l10n-fi "INCLUDE">
<!ENTITY % l10n-fr "INCLUDE">
<!ENTITY % l10n-it "INCLUDE">
<!ENTITY % l10n-ja "INCLUDE">
<!ENTITY % l10n-nl "INCLUDE">
<!ENTITY % l10n-no "INCLUDE">
<!ENTITY % l10n-pl "INCLUDE">
<!ENTITY % l10n-pt "INCLUDE">
<!ENTITY % l10n-ro "INCLUDE">
<!ENTITY % l10n-ru "INCLUDE">
<!ENTITY % l10n-sk "INCLUDE">
<!ENTITY % l10n-sv "INCLUDE">

<![%l10n-ca;[
<!ENTITY dbl1ca   SYSTEM "dbl1ca.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1ca   SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-cs;[
<!ENTITY dbl1cs   SYSTEM "dbl1cs.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1cs   SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-da;[
<!ENTITY dbl1da   SYSTEM "dbl1da.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1da   SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-de;[
<!ENTITY dbl1de SYSTEM "dbl1de.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1de SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-en;[
<!ENTITY dbl1en SYSTEM "dbl1en.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1en SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-es;[
<!ENTITY dbl1es   SYSTEM "dbl1es.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1es   SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-fi;[
<!ENTITY dbl1fi   SYSTEM "dbl1fi.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1fi   SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-fr;[
<!ENTITY dbl1fr   SYSTEM "dbl1fr.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1fr   SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-it;[
<!ENTITY dbl1it   SYSTEM "dbl1it.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1it   SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-ja;[
<!ENTITY dbl1ja   SYSTEM "dbl1ja.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1ja   SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-nl;[
<!ENTITY dbl1nl   SYSTEM "dbl1nl.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1nl   SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-no;[
<!ENTITY dbl1no SYSTEM "dbl1no.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1no SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-pl;[
<!ENTITY dbl1pl SYSTEM "dbl1pl.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1pl SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-pt;[
<!ENTITY dbl1pt SYSTEM "dbl1pt.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1pt SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-ro;[
<!ENTITY dbl1ro   SYSTEM "dbl1ro.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1ro   SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-ru;[
<!ENTITY dbl1ru   SYSTEM "dbl1ru.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1ru   SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-sk;[
<!ENTITY dbl1sk SYSTEM "dbl1sk.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1sk SYSTEM "dbl1null.dsl" CDATA DSSSL>

<![%l10n-sv;[
<!ENTITY dbl1sv SYSTEM "dbl1sv.dsl" CDATA DSSSL>]]>
<!ENTITY dbl1sv SYSTEM "dbl1null.dsl" CDATA DSSSL>


<!ENTITY dblib.dsl   
  PUBLIC "-//Norman Walsh//DOCUMENT DSSSL Library V2//EN" CDATA DSSSL>

<!ENTITY dbparam.dsl  SYSTEM "dbparam.dsl" CDATA DSSSL>

<!ENTITY cmndbl10n.dsl  SYSTEM "../common/dbl10n.dsl">
<!ENTITY dbl10n.dsl  SYSTEM "dbl10n.dsl">

<!ENTITY VERSION SYSTEM "../VERSION">

<!-- The following are a minimal set of entities needed to utilize
     stylesheet/dsssl/docbook/nwalsh/html as determined by a process of
     addition until all error messages were eliminated. -->
<!ENTITY dbcommon.dsl SYSTEM "../common/dbcommon.dsl">
<!ENTITY dbautoc.dsl  SYSTEM "dbautoc.dsl">
<!ENTITY dbbibl.dsl   SYSTEM "dbbibl.dsl">
<!ENTITY dbblock.dsl  SYSTEM "dbblock.dsl">
<!ENTITY dbcompon.dsl SYSTEM "dbcompon.dsl">
<!ENTITY dbfootn.whre2beg.dsl  SYSTEM "dbfootn_whre2beg.dsl"> <!-- Modified, -RjC -->
<!ENTITY dbgraph.dsl  SYSTEM "dbgraph.dsl">
<!ENTITY dbhtml.whre2beg.dsl   SYSTEM "dbhtml_whre2beg.dsl"> <!-- Modified, -RjC -->
<!ENTITY dbnavig.dsl  SYSTEM "dbnavig.dsl">
<!ENTITY dbchunk.dsl  SYSTEM "dbchunk.dsl">
<!ENTITY dbpi.dsl     SYSTEM "dbpi.dsl">
<!ENTITY dbsect.dsl   SYSTEM "dbsect.dsl">
<!ENTITY dbtitle.dsl  SYSTEM "dbtitle.dsl">
<!ENTITY dbttlpg.dsl  SYSTEM "dbttlpg.dsl">
<!ENTITY dbverb.dsl   SYSTEM "dbverb.dsl">
<!ENTITY version.dsl  SYSTEM "version.dsl">

<!ENTITY dsl-filename "docbookr">

<!ENTITY doctype-declaration "<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN>">
<!-- April Theses:
  ENTITY doctype-declaration "<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN>">
-->

]>



<!-- ...................................................................... -->
<!-- ...................................................................... -->

<!--                             HTML CREATION:
Change at top of this file:
 1.
   force-absolute-links
 2.
   volumenum

Steps:
 1.
   jade -V nochunks
    -t sgml
    -d /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook_whre2beg.dsl
       /usr/lib/sgml/declaration/xml.decl whre2beg.xml >whre2beg.html 2>&1
 2.
                 emacs  ...  (validation)
 3.
                 emacs  ...  (manual edits)
 4.
        lynx spam.html  ...  (test)
DONE.
-->

<!--                             REFERENCE:
    "Introduction to DSSSL"
         http://www.prescod.net/dsssl/
         by Paul Prescod
         July, 1997

    "4.7 ...Processing modes are even more powerful when you use them
            to create an alternative formatting for an entire document..."
                                                                            -->

<!--                             NOTES:

      Edit output file from jade and make these manual changes:
        1. content in name="author" in meta.
        2. content in name="description" in meta.
        3. volume number in anchor to index for current volume.

      ..................................................................
      Output HTML file is for a single article, not whole book!

      Always include 'role="undefined"' in <para> (choices other
      than "undefined" are found in works-rd.css).

      Use element keycap to mark-up very first letter, using
      'role="cap"'.

      Translators put into authorgroup in bookinfo.

      This DSSSL specification based upon:
        /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl

      Use only para in footnotes due to "(element (footnote para)" in
      mode footnote-mode (dbfootn.dsl).

      Leave "%use-id-as-filename%" as "#f" in
        /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/dbparam.dsl
        (don't use id= value as filename).

      Useful guidance:
        ("-" before long option needs to be double-dash; cannot put 
             double-dashes inside this comment).
        wget -recursive -no-parent http://www.marxists.org/admin/workshop/
        wget -recursive -no-parent http://www.marxists.org/archive/css/
        wget http://www.marxists.org/archive/lenin/works/1917/apr/04.htm
        wget http://www.marxists.org/glossary/terms/p/r.htm
                                                                            -->
<!-- ...................................................................... -->
<!-- ...................................................................... -->


<style-sheet>
<style-specification id="&dsl-filename;"
    use="ca cs da de en es fi fr it ja nl no pl pt ro ru sk sv dbparam dblib">
<style-specification-body>

;;
;; What's in an element?
(declare-flow-object-class element
  "UNREGISTERED::James Clark//Flow Object Class::element")
;;
(declare-flow-object-class empty-element
  "UNREGISTERED::James Clark//Flow Object Class::empty-element")
;;
(declare-flow-object-class entity
  "UNREGISTERED::James Clark//Flow Object Class::entity")
;;
(declare-flow-object-class entity-ref
  "UNREGISTERED::James Clark//Flow Object Class::entity-ref")
;;
(declare-flow-object-class formatting-instruction
  "UNREGISTERED::James Clark//Flow Object Class::formatting-instruction")
;;
(define debug
  (external-procedure "UNREGISTERED::James Clark//Procedure::debug"))
;;
(define read-entity
  (external-procedure "UNREGISTERED::James Clark//Procedure::read-entity"))
;;
(define all-element-number
  (external-procedure "UNREGISTERED::James Clark//Procedure::all-element-number"))

;;
;; Make text that comes from unimplemented tags easy to spot:
(default
  (make element gi: "font"
	attributes: '(("color" "red"))
	(process-children)))

;; Selected from docbook.dsl:
&dbcommon.dsl;  <!-- Common ("stock") stylesheet functions                 -->
;;
&cmndbl10n.dsl; <!-- Common localization -->
&dbl10n.dsl;    <!-- Stylesheet-local localization -->
;;
&dbautoc.dsl;   <!-- Automatic TOC generation                              -->
&dbbibl.dsl;    <!-- Bibliographies                                        -->
&dbblock.dsl;   <!-- Miscellaneous block elements                          -->
&dbcompon.dsl;  <!-- Components; chapter-level elements                    -->
<!-- Footnotes         &dbfootn.dsl;                                       -->
&dbfootn.whre2beg.dsl;   <!-- Footnotes                                    -->
&dbgraph.dsl;   <!-- Graphics                                              -->
<!-- Html              &dbhtml.dsl;                                        -->
&dbhtml.whre2beg.dsl;    <!-- HTML specific things                         -->
&dbnavig.dsl;   <!-- Navigation                                            -->
&dbchunk.dsl;   <!-- Chunking                                              -->
&dbpi.dsl;      <!-- HTML PIs (dbhtml)                                     -->
&dbsect.dsl;    <!-- Sections                                              -->
&dbtitle.dsl;   <!-- Titles                                                -->
&dbttlpg.dsl;   <!-- Title Page                                            -->
&dbverb.dsl;    <!-- Verbatim (ProgramListing, LiteralLayout, etc.)        -->
&version.dsl;   <!-- Version -->


<!-- .................................................................. -->
<!-- .................................................................. -->
<!--      Here is where stuff specific to Internet Archive begins.      -->
<!-- .................................................................. -->
<!-- .................................................................. -->

;; MAIN:


;; Variables:
;;
(define %force-absolute-links%
  ;; REFENTRY force-absolute-links
  ;; PURP Force absolute links (used for CSS and navigation links)
  ;; DESC
  ;; Force links to be absolute (including ./ links) for local testing;
  ;; final version needs relative links with lots of ../../../.
  ;; /DESC
  ;; AUTHOR N/A
  ;; /REFENTRY
  &force-absolute-links;
  ) ;; Can be either "#t" or "#f".
;;
;;
;;
;;
;; RELATIVE and ABSOLUTE addresses
;;    (more like NETWORK and LOCAL addresses, because "./" is
;;     used to access a copy of a CSS stored locally).
;;
(define (choose-link-css)
  (if %force-absolute-links%
      "./works-rd.css"
      "../../../../css/works-rd.css"))
;;
;; http://www.marxists.org/archive/lenin/works/cw/volume02.htm
;; http://www.marxists.org/archive/lenin/works/cw/index.htm
;; http://www.marxists.org/archive/lenin/index.htm
;;
(define (choose-a-href argument #!optional (volumenum "99"))
  (let (
	(location
	 (case argument
	   (("collected-works-volume")
	    (if %force-absolute-links%
		(string-append
		 "http://www.marxists.org/archive/lenin/works/cw/volume"
		 volumenum
		 ".htm")
		(string-append
		 "../../cw/volume"
		 volumenum
		 ".htm")))
	   (("collected-works-toc")
	    (if %force-absolute-links%
		"http://www.marxists.org/archive/lenin/works/cw/index.htm"
		"../../cw/index.htm"))
	   (("lenin-works-archive")
	    (if %force-absolute-links%
		"http://www.marxists.org/archive/lenin/works/index.htm"
		"../../../index.htm"))
	   (("TEMPLATE")
	    (if %force-absolute-links%
		"http://www."
		"../../../index.htm")))))
    ;; (string-append "\"" location "\"")
    location))


;;
(define case-sensitive-p-gi "p")
;;
(define
  output-doctype
  "&#60;!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
        \"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\">
")
;; On 2001.06.17 was:
;; &#60;!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
;;

(define (make-special-br)
  (make formatting-instruction data: "&#60;br />")
  )

;;
;; Values to be used more than once:
;;
;; Generic tags used lots of places:
(element emphasis
  (make element gi: "em"))
;;
;;
;; Example:
;;       {glossterm xreflabel="orgs/r/u.htm#rsdlp"
;; 		 role="glossary">Social-Democrats{/glossterm>
;;
;; Entries in glossary (Wed,  4 Jul 2001 18:25:08 -0700):
;;      99	events
;;     257	orgs
;;     777	people
;;     119	periodicals
;;     411	terms
;;
(define roles-to-tag-emphasis "&roles-to-tag-emphasis;")
(element glossterm
  (let ((role (attribute-string "role"))
	(xreflabel (attribute-string "xreflabel")))
    (make element gi: "a"
	  attributes: (list (list "href" xreflabel))
	  (if (let loop
		  ((roles-to-tag-emphasis (split roles-to-tag-emphasis))
		   (roles-matched #f))
		(cond ((null? roles-to-tag-emphasis) roles-matched)
		      ((equal? role (car roles-to-tag-emphasis))
		       (loop (cdr roles-to-tag-emphasis)
			     (cons (car roles-to-tag-emphasis) roles-matched)))
		      (else
		       (loop (cdr roles-to-tag-emphasis)
			     roles-matched))))
	      (make element gi: "em"
		    (process-children))
	      (process-children)
	      ))))
;;
;;   p:
(define attrs-footnotes-title '(("class" "footnotes")))  ; Per DocBook.
(define content-footnotes-title "Footnotes")             ; Per DocBook.
(define element-footnotes-title "h4")                    ; Per DocBook.
;;
(define attrs-miscellaneous-fst "fst")
(define attrs-p-fst (list (list "class" attrs-miscellaneous-fst))) ; dbfoot_.dsl
;;
(define attrs-p-pagenoteb '(("class" "pagenoteb")))
(define attrs-sup-enote '(("class" "enote")))
(define attrs-p-footer '(("class" "footer")))
(define attrs-p-skip '(("class" "skip")))
(define content-p-skip "&#160;")
					; Same thing? ...
					; (make entity-ref name: "nbsp")

;;
;;
;;   a:
;;      ...what if this does not match person in XML editor and othercredit?
(define mailto-user-cymbala "mailto:rCymbala@marxists.org")
(define mailto-editor mailto-user-cymbala)
(define mailto-othercredit mailto-user-cymbala)
(define attrs-a-mailto-editor
  (list (list "href" mailto-editor)))
(define attrs-a-mailto-othercredit
  (list (list "href" mailto-othercredit)))
;;
;;  ?:
(define attrs-span '(("class" "info")))
(define attrs-releaseinfo '(("class" "pagenoteb")))
;;

;;   h[13]:
;; (define heading-level-for-title "h3")
(define heading-level-for-title "h1")

;; Attributes for elements
(define attrs-p-information '(("class" "information")))
(define attrs-p-title '(("class" "title")))
;;
(define attrs-meta-http-equiv '(
				("http-equiv" "content-type")
				("content" "text/html; iso-8859-1")
				))
;;
;;    hr:
(define attrs-hr-base '(("class" "base") ("size" "1")))
;; (define attrs-hr-end '(("class" "end")))
					; How to add ("noshade") ...
(define attrs-hr-end '(("size" "1") ("width" "88%")))
;;


;;   information:
					; SEE marxist@groups.yahoo.com on
					; 2001.05.27.
;;
(define info-tag-literal-translated    "Translated: ")
(define info-tag-literal-edited        "Edited by: ")
(define info-tag-literal-revhistory    "Online Version:")
(define info-tag-literal-date          "Written: ")
(define info-tag-literal-printhistory  "First Published: ")
(define info-tag-literal-othercredit   "Transcription & XML Markup (DocBk): ")
(define info-tag-literal-source        "Source: ")
(define info-tag-literal-publisher     "Publisher: ")
;;


;;
;; head element information:
;; (define css "../../../../css/works-rd.css")
(define attrs-link (list
		    (list "rel" "stylesheet")
		    (list "type" "text/css")
		    (list "href" css)))
;;
;; CSS:
(define css (choose-link-css))
					; April Theses:
					; "../../../../css/works-rd.css"
					; Email, D. Walters, 2001.05.30
					;  (and admin/workshop/info/html.htm):
					; "../../../../css/works.css"
					; 04.html, D. Walters:
					; "../../../../css/works-rd.css"


;; SOURCE:
;;   /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/dbhtml_whre2beg.dsl
;; Need to add 'class="value_from_role_attribute"'


;; .......................................................
;; ELEMENTS and root:
;;
;; root:
(root
    (make sequence
					;
      ;; DOCTYPE:
      (make formatting-instruction data: output-doctype)
					;
      (make element gi: "html"
	    (process-children))
					;
      (empty-sosofo)
      )
  )


;;
;; Book:

;;
;; HOW TO TAKE (DATA FROM volumenum AND USE IN A's HREF?
;;                  ...DSSSL-list...
;; ... 
;; Go back and get the releaseinfo element content from the context
;; where you need it. From any DSSSL rule, you can walk all over the
;; source tree.
;;                                         Be seeing you,
;;                                           norm
;; ...
;;    (data (current-node))
;; returns the #PCDATA as a string.  See 10.2.3 of standard
;; for complete details.
;; .......................................................


;;
;; EXAMPLE WHERE (data USED IN ATTRIBUTE:
;; dbhtml.dsl:
;;       ;; Add META NAME=KEYWORD tags
;;       (let loop ((nl kws))
;; 	(if (node-list-empty? nl)
;; 	    (empty-sosofo)
;; 	    (make sequence
;; 	      (make empty-element gi: "META"
;; 		    attributes: (list (list "NAME" "KEYWORD")
;; 				      (list "CONTENT" (data (node-list-first nl)))))
;; 	      (loop (node-list-rest nl)))
;; .......................................................


(element volumenum (process-children))
(element book
  ;;
  ;; What is it?
  ;;
  ;; (node-list->string (current-node))
  ;; "book(title()bookinfo(title(emphasis())author(firstname()othername()
  ;;       surname())pubdate()publisher(publishername()address())volumenum()
  ;;       date()authorgroup(author(firstname()surname())author(firstname()
  ;;       surname()))editor(firstname()surname()))article(artheader(title(
  ;;       footnote(simpara(emphasis()emphasis())))date()printhistory(para(
  ;;       emphasis()))artpagenums()editor(firstname()surname())othercredit(
  ;;       firstname()surname())revhistory(revision(revnumber()date()))
  ;;       author(firstname()othername()surname()))simpara(emphasis()
  ;;       footnote(simpara(emphasis()emphasis())para(emphasis()
  ;;       emphasis()))emphasis()emphasis()footnote(  etc.

  ;;   Hyperlinks backwards up the tree:
  ;;
  ;;   How to get volumenum from its element and use value in choose-a-href?
  ;;
  
  (make sequence
    ;;
    (make element gi: "head"
	  (with-mode head
	    (process-children))
	  )
    ;;
    (make element gi: "body"
	  (make sequence
	    ;;

	    ;; Paragraph of class title but not article title.
	    ; (make element gi: case-sensitive-p-gi
		  ; attributes: attrs-p-title
		  ; (with-mode author-internet-archive
		    ; (process-matching-children 'bookinfo))
		  ; )
	    ;; OR:
	    ;; H2
	    (make element gi: "H2"
		  (with-mode author-internet-archive
		    (process-matching-children 'bookinfo))
		  )

	    ;;
	    ;; H[13] with title.
	    (make element gi: heading-level-for-title
		  (with-mode just-the-title-from-article
		    (process-children))
		  )


	    ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
	    ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
	    ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
	    ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
	    ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
	    ;;
	    ;; Information, surrounded by horizontal rulers.
	    (make empty-element gi: "hr"
		  attributes: attrs-hr-base)
	    ;;
	    (make element gi: case-sensitive-p-gi
		  attributes: attrs-p-information
		  

					; "Written:"
		  (make element gi: "span"
			attributes: attrs-span
			(make paragraph
			  (literal info-tag-literal-date))
			)
		  (with-mode just-the-date-from-article
		    (process-children)
		    )
		  (make-special-br)
		  ;;

					; "First Published:"
		  (make element gi: "span"
			attributes: attrs-span
			(make paragraph
			  (literal info-tag-literal-printhistory))
			)
		  (with-mode just-the-printhistory
		    (process-children)
		    )
		  (make-special-br)
		  ;;

					; "Source:"
					;    THIS ONE PRESENTED GREATEST DIFFICULTIES!
		  (make element gi: "span"
			attributes: attrs-span
			(make paragraph
			  (literal info-tag-literal-source))
			)
		  (with-mode just-the-title-from-book
		    (process-children))
					; Comma after book title:
		  (make element gi: "em" (literal ","))
		  (literal " ")
					; Publisher:
		  (with-mode just-the-publishername
		    (process-children))
		  (literal ", ")
					; Publisher address:
		  (with-mode just-the-address-from-publisher
		    (process-children))
		  (literal ", ")
					; Pubdate:
		  (with-mode just-the-pubdate
		    (process-children))
		  (literal ", ")
					; Volume:
		  (literal "Vol. ")
		  (with-mode just-the-volumenum
		    (process-first-descendant 'volumenum))
		  (literal ", ")
					; Pages:
		  (literal "pp. ")
		  (with-mode just-the-pages
		    (process-children))
		  (literal ".")
		  ;;
		  (make-special-br)
		  ;;

					; "Translated:"
					; 
					; Note "and George" in
					; firstname.  See "(define
					; (author-list-string" in
					; dbcommon.dsl for how DocBook
					; handles AUTHORGROUP.
		  (make element gi: "span"
			attributes: attrs-span
			(make paragraph
			  (literal info-tag-literal-translated))
			)
		  (with-mode just-the-authorgroup
		    (process-children)
		    )
		  (make-special-br)
		  ;;
		  

					; "Editor:"
		  (make element gi: "span"
			attributes: attrs-span
			(make paragraph
			  (literal info-tag-literal-edited))
			)
		  (with-mode just-the-editor
		    (process-children)
		    )
		  (make-special-br)
		  ;;

		  
					; "Transcription:"
		  (make element gi: "span"
			attributes: attrs-span
			(make paragraph
			  (literal info-tag-literal-othercredit))
			)
		  (make element gi: "a"
			attributes: attrs-a-mailto-othercredit
			(with-mode just-the-othercredit
			  (process-children)
		    )
		  )
		  (make-special-br)
		  ;;
		  

					; "Online Version:"
		  (make element gi: "span"
			attributes: attrs-span
			(make paragraph
			  (literal info-tag-literal-revhistory)))
		  (make sequence
		    (with-mode multiple-revisions
		      (process-matching-children 'article)))
		  (make-special-br)
		  ;;
		  

		  ;; End of informational paragraph.
		  )
	    (make empty-element gi: "hr"
		  attributes: attrs-hr-base)
	    ;;
	    ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	    ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	    ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	    ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	    ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


	    ;; Main body of text.  Includes make endnotes.
	    ;;
	    (with-mode skipping-artheader
	      (process-first-descendant 'article))

	    ;; Endings taken from "April Theses" as of 2001.05.28.
	    ;;
	    (make element gi: case-sensitive-p-gi
		  attributes: attrs-p-skip
		  (literal content-p-skip)
		  )
	    (make empty-element gi: "hr"
		  attributes: attrs-hr-end)

					; Backward hyperlinks, deep to shallow.
	    (make element gi: case-sensitive-p-gi
		  attributes: attrs-p-footer

		  (let (
			(attrs-a-collected-works-toc
			 (list (list "href"
				     (choose-a-href "collected-works-toc"))))
			(attrs-a-collected-works-volume
			 (list (list "href"
				     (choose-a-href
				      "collected-works-volume"
				      "&volumenum;"
				      ))))
			(attrs-a-lenin-works-archive
			 (list (list "href" (choose-a-href "lenin-works-archive"))))
			(content-a-collected-works-volume
			 (string-append "Collected Works Volume "))
			(content-a-collected-works-toc
			 "Collected Works Table of Contents")
			(content-a-lenin-works-archive
			 "Lenin Works Archive")
			)
		    ;;
		    (make sequence
		      (make element gi: "a"
			    attributes:
			    attrs-a-collected-works-volume
			    (literal content-a-collected-works-volume)
			    ;;
			    (with-mode just-the-volumenum
			      (process-first-descendant 'volumenum))
			    )
		      (make-special-br)
		      (make element gi: "a"
			    attributes: attrs-a-collected-works-toc
			    (literal content-a-collected-works-toc)
			    )
		      (make-special-br)
		      (make element gi: "a"
			    attributes: attrs-a-lenin-works-archive
			    (literal content-a-lenin-works-archive)
			    )
		      (make-special-br)
		      )
		    )
		  )

	    ;; That's everything.
	    	    
	    ;; End of body's sequence.
	    )
	  ;; End of body.
	  )
    (empty-sosofo)
    ;;
    ;; End of make sequence.
    )
  )

;; .......................................................
;; MODES:
;;
;; "[AUTHOR] Internet Archive"
;;       (for layout of h[13] in body element
;;        from author in book [not article]):
;;
;; When a space needs to appear between text from consecutive tags:
(mode whitespace-author
  (element author (process-children))
  (element firstname
    (make sequence
      (process-children-trim)
      (literal " ")))
  (element othername
    (make sequence
      (process-children-trim)
      (literal " ")))
  (element surname
    (make sequence
      (process-children-trim)
      (literal " ")))
  )
;;
(mode author-internet-archive
  ;;
  ;; 2001.05.30 (D. Walters email): "[AUTHOR] Internet Archive"
  (element author
    (make sequence
      (with-mode whitespace-author
	(process-matching-children 'surname))
      (literal "Internet Archive")
      ))
  (element bookinfo
    (process-matching-children 'author)
    )
  )
;;
(define (p-close-p-open args)
  (make sequence
    (make formatting-instruction
      data: (string-append "&#60;" "/" case-sensitive-p-gi ">"))
    (make element gi: "p"
	  attributes: attrs-p-pagenoteb
	  (process-children))
    (make formatting-instruction
      data: (string-append
	     "&#60;" case-sensitive-p-gi
	     " class=\"" attrs-miscellaneous-fst "\"" ">"))
    )
  )
;;
(mode skipping-artheader-handle-blockquote
  ;;
  ;; Cannot put a p inside a p ("-//W3C//DTD HTML 4.0
  ;; Transitional//EN"), so formatting-instruction used to
  ;; close-and-(re)open paragraph that contains the blockquote.
  ;;
  (element simpara (p-close-p-open #f))
  (element para (p-close-p-open #f))
  (element formalpara (p-close-p-open #f))
 )
;;
(mode skipping-artheader
  (element artheader (empty-sosofo))
  ;;
  ;; Change fro "P" to "p" (see dbhtml_whre2beg.dsl for definition of $paragraph$).
  ;; Input attribute "role" to output attribute "class".
  (element para
    ($paragraph$ "p"))
  ;;
  ;; For first letter of first word of first paragraph of first section.
  (element keycap
    (make element gi: "span"
	  attributes: (list (list "class" (attribute-string "role")))))
  ;;
  ;; Blockquote used in DocBook for "*" notes appearing at bottom of
  ;; page (footnotes, really, but the term footnotes is used here for
  ;; endnote functionality).
  ;;
  (element (book article para blockquote para)
    (make element gi: "p" attributes: attrs-p-pagenoteb (process-children)))
  (element (book article para blockquote formalpara)
    (make element gi: "p" attributes: attrs-p-pagenoteb (process-children)))
  ;;
  (element blockquote
    (with-mode skipping-artheader-handle-blockquote
      (process-matching-children 'simpara 'para 'formalpara))
    )
  ;;
  (element article
    (make sequence

      ;; Paragraphs from main body of article.
      (process-children)

      ;; Horizontal rule between body and notes.
      (make empty-element gi: "hr"
	    attributes: attrs-hr-end)
      
      ;; Footnotes.
      ;; (See "..../sgml/stylesheet/dsssl/docbook/nwalsh/html/dbnavig.dsl".)
      ;;
      (make element gi: element-footnotes-title
	    attributes: attrs-footnotes-title
	    (literal content-footnotes-title))
      (make-endnotes)
      )
    
    )
  )

;;
;; Just the...
;;   (Article modes first, book modes second.)
;;   (Expects process-children.)
;;
(mode just-the-title-from-article
  ;;
  ;; Article title can have a footnote!
  ;;
  (element (book title) (empty-sosofo))
  (element (book bookinfo) (empty-sosofo))
  ;;  (element footnote
  ;;    (process-children))
  (element (book article) (process-matching-children 'artheader))
  (element (book article artheader) (process-matching-children 'title))
  (element (book article artheader title) (process-children))
  )
(mode just-the-pages
  (default (empty-sosofo))
  (element article (process-first-descendant 'artheader))
  (element artheader (process-first-descendant 'artpagenums))
  (element (book article artheader artpagenums) (process-children))
  )
(mode just-the-othercredit
  (default (empty-sosofo))
  (element othercredit
    (make sequence
      (with-mode whitespace-author
	(process-children))
      )
    )
  (element article (process-first-descendant 'artheader))
  (element artheader (process-first-descendant 'othercredit))
  )
(mode multiple-revisions
  (default (empty-sosofo))
  (element date
    (make sequence
      (literal " (")
      (process-children)
      (literal ")")))
  (element revnumber
    (make sequence
      (literal "")
      (process-children)))
  (element article (process-first-descendant 'artheader))
  (element artheader (process-first-descendant 'revhistory))
  (element revision
    (make sequence
      (literal " ")
      (process-matching-children 'revnumber)
      (process-matching-children 'date)
      (literal ";")))
  (element revhistory
    (make sequence
      (process-children)
      (literal "")))
  )
(mode just-the-title-from-book
  (default (empty-sosofo))
  (element emphasis (make element gi: "em"))
  (element book (process-first-descendant 'title))
  (element (book title) (process-children))
  )
(mode just-the-publishername
  (default (empty-sosofo))
  (element book (process-first-descendant 'publishername))
  (element bookinfo (process-first-descendant 'publishername))
  ;; -Not needed: (element publisher (process-first-descendant 'publishername))
  (element (book bookinfo publisher publishername) (process-children))
  )
(mode just-the-address-from-publisher
  (default (empty-sosofo))
  (element book (process-first-descendant 'address))
  (element bookinfo (process-first-descendant 'address))
  ;; -Not needed: (element publisher (process-first-descendant 'address))
  (element (book bookinfo publisher address) (process-children))
  )
(mode just-the-pubdate
  (default (empty-sosofo))
  (element book (process-first-descendant 'pubdate))
  (element bookinfo (process-first-descendant 'pubdate))
  (element (book bookinfo pubdate) (process-children))
  )
(mode just-the-volumenum
  (default (empty-sosofo))
  (element (book bookinfo volumenum) (process-children))
  )
(mode just-the-authorgroup
  (default (empty-sosofo))
  (element author
    (make sequence
      (with-mode whitespace-author
	(process-children)
	)
      )
    )
  (element bookinfo (process-matching-children 'authorgroup))
  (element authorgroup (process-matching-children 'author))
  )
(mode just-the-editor
  (default (empty-sosofo))
  ;;
  (element bookinfo (process-matching-children 'editor))
  (element editor
    (make sequence
      (with-mode whitespace-author
	(process-children))
      )
    )
  )

;;
;; Used to build the information paragraph at beginning of body, where
;; text from both book and article are combined (culprit: "Source:").
(mode just-the-date-from-article
  (default (empty-sosofo))
  (element article
    (process-first-descendant 'date))
  (element artheader
    (process-first-descendant 'date))
  (element (book article artheader date) (process-children))
  )
(mode just-the-printhistory
  (default (empty-sosofo))
  (element emphasis (make element gi: "em"))
  (element simpara (process-children))
  (element para (process-children))
  (element formalpara (process-children))
  ;;
  ;; (element footnote (process-children))
  ;;
  (element article
    (process-first-descendant 'printhistory))
  (element artheader
    (process-first-descendant 'printhistory))
  (element (book article artheader printhistory) (process-children))
  )
;;
;; Head:
(mode head
  (default (empty-sosofo))
  ;;
  ;; Get title from article header.
  (element (book article artheader title) (process-children))
  ;;
  ;; Head element in HTML only needs to look at article in XML.
  (element article
    (let (
	  (author "foo_author")
	  (description "foo_description")
	  )
      (make sequence

	;; dbhtml.dsl:
	;; Add the META NAME=GENERATOR tag
	(make empty-element gi: "meta"
	      attributes: (list (list "name" "generator")
				(list "content" (stylesheet-version))))

	(make empty-element gi: "meta"
	      attributes: attrs-meta-http-equiv)
	;;
	(make empty-element gi: "meta"
	      attributes: (list
			   (list "name" "author")
			   (list "content" author)
			   ))
	;;
	(make empty-element gi: "meta"
	      attributes: (list
			   (list "name" "description")
			   (list "content" description)
			   ))
	;;
	(make element gi: "title"
	      (process-first-descendant 'title)
	      )
	;;
	;; Note: link (not meta).
	(make empty-element gi: "link"
	      attributes: attrs-link)
	)
      )
    )
)
;;
;;


</style-specification-body>
</style-specification>

<external-specification id="dbparam" document="dbparam.dsl">
<external-specification id="dblib" document="dblib.dsl">

<external-specification id="ca" document="dbl1ca">
<external-specification id="cs" document="dbl1cs">
<external-specification id="da" document="dbl1da">
<external-specification id="de" document="dbl1de">
<external-specification id="en" document="dbl1en">
<external-specification id="es" document="dbl1es">
<external-specification id="fi" document="dbl1fi">
<external-specification id="fr" document="dbl1fr">
<external-specification id="it" document="dbl1it">
<external-specification id="ja" document="dbl1ja">
<external-specification id="nl" document="dbl1nl">
<external-specification id="no" document="dbl1no">
<external-specification id="pl" document="dbl1pl">
<external-specification id="pt" document="dbl1pt">
<external-specification id="ro" document="dbl1ro">
<external-specification id="ru" document="dbl1ru">
<external-specification id="sk" document="dbl1sk">
<external-specification id="sv" document="dbl1sv">

</style-sheet>

<!-- To-do:

 - "____" in author and description.

 - insert DOCTYPE in first line (enclose string in double-quotes).

 - use "let" to store "[AUTHOR] Internet Archive".

 - switch to choose link to CSS ("INCLUDE" entities).

 - source/publisher/translated information.

 - "For the visible title, we use either <h1> or <h3> tags, depending
    on the size of the title, we leave it up to you." (2001.05.26)

 - a way to functionalize insertion of element-em, element-para, etc.?

-->

<!-- The -->
<!-- End -->