Re: (dsssl) Include some defines?

Subject: Re: (dsssl) Include some defines?
From: Jens Poenninghaus <jpoennin@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Mar 2003 08:43:31 +0100
Hi Tim,

give entities a chance :-)
The snipplets below should be possible solutions to your problem:


First, straight forward:
[code1.dsl]

<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY extensions SYSTEM "extensions.dsssl">
]>

some bracketed stuff


%extensions;




second, more complicated but more flexible as well: 
 

[Code.dsl] 
---8<---8<---8<---
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY % Configuration SYSTEM "Configuration.dcl">
%Configuration;
 
]>     
<style-sheet>
<style-specification id="XY">
 
<style-specification-body>
&extensions.dsssl;
 
<![%CONDITIONAL;  [ 
 some stuff depending on value of CONDITIONAL

]]>
<![%notConditional; [
  'else' part of CONDITIONAL 


---8<---8<---8<--

[Configuration.dcl]
---8<---8<---8<--
<!ENTITY extensions.dsssl SYSTEM  "extensions.dsl" > 
<!ENTITY % CONDITIONAL "IGNORE">
<!ENTITY % notConditional "INCLUDE">
.
.
---8<---8<---8<--



Hope this help and have a nice, peaceful day!

Jens P. 


On Tue, Mar 18, 2003 at 09:36:49PM -0600, Tim McDaniel wrote:
> In my Jade .dsl file, I hve several style-specification blocks.  I am
> developing more defines that are used in different blocks.  I would
> like to cut down on the maintenance effort by having one copy of each
> define instead of several.  I could do a simple include mechanism,
> even in command.com in Windows:
> 
>     type common  >> all.dsl
 
> This would be inelegant, though.  Is there a way to do include files
> in DSSSL using Jade?  Ideally, it would be in one file, like a
>     <style-specification ID="common">
>     ...
>     </style-specification>
> 
>     <style-specification ID="printloar">
>     <include file="#common">
>     ...
>     </style-specification>
> 
>     <style-specification ID="HTML">
>     <include file="#common">
>     ...
>     </style-specification>
> 
> But a separate file would be OK.
> 
> -- 
> Tim McDaniel (home); Reply-To: tmcd@xxxxxxxxx; work is tmcd@xxxxxxxxxxx
> 
>  DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist

-- 
Jens Poenninghaus

 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist

Current Thread