Subject: Re: Attributes of Top-Most Element From: Daniel Speck <dspeck@xxxxxxxxxxxx> Date: Mon, 06 Apr 1998 16:07:15 -0400 |
Chuck Darney wrote: > Is it possible to use attributes assigned to the top-most element within > the style sheet to change some processing options? Is it, as suggested > by David Pawson, a limitation based on the "side-effects" discussion of > a while ago? Yes, you can use attributes on almost any element in the document to control processing. You just need to create a function that can retrieve the value of the attribute whenever and whereever required. > I have several types of deliverables I want to produce. The style of > these deliverables is the same with certain exceptions. All use the > same DTD. It would seem rather silly to maintain a separate DSL for > each deliverable when the only difference might be the use (or lack of) > of a footer. Remember that you can include multiple style specifications within a single style sheet using the style-sheet DTD provided by Jade: <!doctype style-sheet "-//James Clark//DTD DSSSL Style Sheet//EN"> <style-sheet> <style-specification id="print" use="common"> ... </style-specification> <style-specification id="web" use="common"> ... </style-specification> <style-specification id="common"> ... </style-specification> The definitions and rules in higher-level style-specifications can override those in lower-level style specifications. By default, the first style-specification is used if one is not specified explicitly on the command line. To specify another style specification, use the following: jade -d "mystyle.dsl#web" ... > Passing the "deliverable type" as an attribute of my top-most element > seemed the logical thing to do. Is there another way I should appraoch > this problem? Will I need to maintain several, almost identical, DSLs? See above. I think that "deliverable type" is not really part of the document proper and should be communicated outside of it (but that's just my opinion). -dan -- Daniel Speck e-mail: dspeck@xxxxxxxxxxxx Systems Engineer voice: +1 301.548.7818 Thomson Technology Services Group fax: +1 301.527.4094 1375 Piccard Drive, Rockville, MD 20850 WWW: www.thomtech.com
begin: vcard fn: Daniel Speck n: Speck;Daniel org: Thomson Technology Services Group adr: 1375 Piccard Drive;;Suite 250;Rockville;MD;20850;USA email;internet: dspeck@xxxxxxxxxxxx title: Research Engineer tel;work: (301) 548-7818 tel;fax: (301) 527-4094 x-mozilla-cpt: ;0 x-mozilla-html: TRUE version: 2.1 end: vcard
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Attributes of Top-Most Element, Norman Walsh | Thread | RE: Attributes of Top-Most Element, Reynolds, Gregg |
RE: Attributes of Top-Most Element, Reynolds, Gregg | Date | Does/Will/Might Jade handle Japanes, David Megginson |
Month |