Subject: Re: XSL FO how to make things go. Re: Q: XML+XSL transforms to a print-ready format From: "James Tauber" <jtauber@xxxxxxxxxxx> Date: Mon, 11 Oct 1999 13:38:37 +0800 |
> I'll send my proposal in a separate message. Okay. Here is my proposal. There are problems with it, but I think it is a start. First of all, we need a way of specifying static-content on a per-master basis as well as a per-region basis so that, for example, odd and even pages can differ in header. My proposal for that is for static-content to have two additional properties: region and master. <fo:static-content jt:region="before" jt:master="right">...</fo:static> means that this is the static content to put in the before region on pages using the "right" master. Next we need two new FOs in order to achieve running headers (including dictionary-style). One, which produces area(s), occurs in static-content (eg the header), the other occurs in the body. The basic idea is that a section header, dictionary head word, or whatever, sets a field and the static-content can "retrieve" the first or last value set for that field on that page. In the absence of a field setting on a page, the last value set for the previous page in the page-sequence would be used, ultimately defaulting to an empty string. NOTE: The names of the FOs and their properties are just what occur to me. I have no problem changing them. To set a field one uses a "running-field-set" element with the name of the field in the "name" attribute and the value of the field the contents of the element. To retrieve a field one uses a "running-field" empty element with the name of the field in the "name" attribute and another attribute "which" which takes the value "first" or "last" which indicates which value of the field on that page to take. So, a section might result in a FO tree fragments like: <jt:running-field-set name="section">3.4 Formatting Model</jt:running-field-set> <fo:block space-before.optimum="2cm" space-after.optimum="1cm" font-size="24pt">3.4 Formatting Model</fo:block> <fo:block>In XSL, one creates a number of formatting objects...</fo:block> The static-content might then look like: <fo:static-content region="before" master="right"><fo:block font-size="10pt" font-style="italic" text-align-last="right"><fo:running-field name="section" which="last"/></fo:block></fo:static-content> In a dictionary, the body might have fragments like: <fo:running-field-set name="headword">example</fo:running-field-set> <fo:block><fo:inline-sequence font-weight="bold">example</fo:inline-sequence>, n. Fact, thing, illustrating general rule</fo:block> and then have static-content <fo:static-content region="before" master="right"><fo:block font-size="10pt" font-style="italic" text-align-last="right"><fo:running-field name="headword" which="first"/>&emdash;<fo:running-field name="headword" which="last"/></fo:block></fo:static-content> As I said at the start, there are problems with this. A more general solution is needed and I hope it will be in XSL eventually. James XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: XSL FO how to make things go. , James Tauber | Thread | Re: XSL FO how to make things go. , Jeremy H. Griffith |
Re: XSL FO how to make things go. , James Tauber | Date | FOP 0.11.0 released, James Tauber |
Month |