[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

presentation pipeline [was] Re: Landscape print contro

Subject: presentation pipeline [was] Re: Landscape print control
From: "Mike Haarman" <mhaarman@xxxxxxxxxxxxxxxxxx>
Date: Fri, 5 Sep 2003 09:41:47 -0500
stylesheet print landscape
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>

> > > So do you maintain two completely separate stylesheets, one
> > > for html and one for pdf?  I'm about to do something similar
> > > and I can see issues where one has been updated without the
> > > other.  Is it simply the case when a change is required you
> > > have to make the change twice?
> >
> >
> > There are two ways of structuring this to achieve reuse between the
> two
> > transformations. One is to do a two-phase transformation in which the
> > first phase does all the work that is common. The other is to put all
> > the common code in a module that is imported into both the
> stylesheets.
>

<snip/>

> ..in your html-producing stylesheet and a corresponding template in your
> fo-producing stylesheet, what happens when its decided the background
> should be red?
>
> How can we arrange it so that change from blue to red is made in one
> place rather than both stylesheets?
>

I actually adopt a bit of both the solutions Mr Kay mentions.  Pipeline a pair
of SAX transformations: first bringing data into an intermediate reporting
markup; second grabs one of two presentation stylesheets.  Both presentation
layer stylesheets include properties stylesheet which makes heavy use of
attribute-sets to group common layout properties.

Recall that attribute-sets can reference other attribute-sets in their
definition.  I build them up incrementally into high-level groups of properties
and can reference the atomic properties when necessary.

I actually include three properties stylesheets which provide application,
installation and user-group levels of properties.  Include precedence determines
which properties are applied when I ask for use-attribute-sets in the templates.
If a set is defined in properties.installation, it overrides the definition in
properties.application, etc.

In practice, having separated print and web views, the two began to diverge to
take advantage of their relative strengths.  I began by short-cutting the
client's print button and ended up creating a consistent, attractive print
reporting regime, but I can still change blue to red in one place without
blowing away a local installation's preference for green.

I think CSS can be used to manage aspects of this requirement, as well, since
CSS2 is a subset of FO properties, but I don't have experience with that route.

Mike


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.