Subject: RE:Color and font size of cells within a table From: "Jordi Mulet" <jmulet@xxxxxxxxxx> Date: Fri, 13 Mar 1998 11:02:41 +0100 |
Hello, When we execute Jade we obtain the message: conveni3.dsl:114:16:E: unexpected token "$pi-font-size$" The tags in the instance are: ... <INFORMALTABLE frame="ALL"><?font-size 4pt><TGROUP align="LEFT" ..... <ENTRY ><para><?font-size 7pt>Notarías</para></ENTRY> ...... Thanks in advance for your help, Jordi Editorial Praxis Here is my code: <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ <!ENTITY docbook.dsl SYSTEM "docbook.dsl" CDATA DSSSL> <!--<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>--> ]> <style-sheet> <style-specification id="docbook-plain" use="docbook"> <style-specification-body> ;; $Id: plain.dsl 1.1 1998/02/15 22:38:07 nwalsh Exp $ ;; ;; This file is part of the Modular DocBook Stylesheet distribution. ;; See ../README or http://www.berkshire.net/~norm/dsssl/ ;; ;; Example of a customization layer on top of the modular docbook style ;; sheet. Definitions inserted in this file take precedence over ;; definitions in the 'use'd stylesheet(s). (define %generate-toc% #f) (define %generate-lot-list% '()) (define %generate-titlepage% #f) (define %chapter-autolabel% #f) (define %spacing-paras% #t) ;; per estudiar en diferents browsers.Teniem f (define %default-quadding% 'justify) (define %chap-app-running-heads% #f) (define %chap-app-running-head-autolabel% #f) (define %component-title-quadding% 'center) (define %component-subtitle-quadding% 'center) (define %body-start-indent% 1pi) (define %smaller-size-factor% 0.7) (define %verbatim-size-factor% 0.7) ;; era 0.9 ;; Returns the value of the (?piname value) PI (if one exists) ;; as a child of component, otherwise returns #f ;; (define (pi-value component piname) (let loop ((nl (children component))) (if (node-list-empty? nl) #f (if (and (equal? (node-property 'class-name (node-list-first nl)) 'pi) (> (string-length (node-property 'system-data (node-list-first nl))) (string-length piname)) (equal? piname (substring (node-property 'system-data (node-list-first nl)) 0 (string-length piname)))) (substring (node-property 'system-data (node-list-first nl)) (+ (string-length piname) 1) (string-length (node-property 'system-data (node-list-first nl)))) (loop (node-list-rest nl)))))) (define (inherited-pi-value component piname) (let loop ((value #f) (nd component)) (if (or value (node-list-empty? nd)) value (loop (pi-value nd piname) (parent nd))))) ;*************************************************************** ; These are the definitions of pi-font-size and pi-font-color ;*************************************************************** (define ($pi-font-size$) (let ((fontsize (inherited-pi-value (current-node) "font-size"))) (if fontsize fontsize #f))) (define ($pi-font-color$) (let ((fontcolor (inherited-pi-value (current-node) "font-color"))) (if fontcolor fontcolor #f))) ;**************************************************************** ; End of definitions of pi-font-size and pi-font-color ;***************************************************************** ;; This list provides the mapping that would ordinarily be supplied ;; by the element construction rules. If the block element "FOO" ;; occurs inside a table cell, use the $process-foo$ function to ;; process it's _contents_: (define %cell-block-element-list% `(;; ("FOO" . ,$process-foo$) ("PARA" . ,$process-cell-para-contents$) )) ;**************************************************************** ; Here we redefine the code with the help of Norman ;****************************************************************** (define ($process-cell-para-contents$ para colnum align body) (let ((font-name (case body (("THEAD") %title-font-family%) (("TFOOT") %title-font-family%) (else %body-font-family%))) (weight (case body (("THEAD") 'bold) (("TFOOT") 'bold) (else 'medium)))) ;***************************************************** ; lets of fontsize and fontcolor ;***************************************************** (let fontsize ($pi-font-size$) ) (let fontcolor($pi-font-color$) ) (let ((%factor% (if %verbatim-size-factor% %verbatim-size-factor% 1.0) )) ;***************************************************** ; end of lets ;****************************************************** (make paragraph font-family-name: font-name font-weight: weight font-size: (if fontsize fontsize (inherited-font-size)) ;**************************************************************** ; This is commented for de problems with the DSSSL color spaces ; color: (if fontcolor fontcolor ( inherited-font-color)) ;***************************************************************** quadding: align (process-node-list (children para) ) ) ) ) ) ; ) ) ; ******************************************* ; This is commented ; ******************************************* ; (define ($find-color-pi$) ; (let ((color (inherited-pi-value (current-node) "cell-color"))) ; (if color ; color ; #f))) </style-specification-body> </style-specification> <external-specification id="docbook" document="docbook.dsl"> </style-sheet> DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
DD: Source links, Pawson, David | Thread | Re: Color and font size of cells , Chris Maden |
DD: Source links, Pawson, David | Date | Re: Applying style to XML documents, Henry S. Thompson |
Month |