RE: [dssslist] Character entities in DSSSL stylesheet

Subject: RE: [dssslist] Character entities in DSSSL stylesheet
From: "Maltby, David G" <david.g.maltby@xxxxxxxx>
Date: Wed, 07 Jul 2004 09:19:29 -0400
Raghavendra -

Since your style sheet is where the name "author" is declared and
managed, rather than using an entity to define "author" use a more
powerful and flexible procedure.

For example:
myfoo.dsl:
-------

<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN"
[
   <!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML
Stylesheet//EN" CDATA DSSSL>
   <!ENTITY % ISOnum.ent PUBLIC "ISO 8879:1986//ENTITIES Numeric and
Special Graphic//EN">
   %ISOnum.ent;
]>
 
 <style-sheet>
 <style-specification use="docbook">
 <style-specification-body>
 (declare-flow-object-class entity-ref
  "UNREGISTERED::James Clark//Flow Object Class::entity-ref")

 (define author-sosofo (make sequence
                         (literal "Fname")
                         (make entity-ref name: "nbsp")
                         (literal "Surname"))) 
 
 (element (article para)
   (make element gi: "P"
         (make sequence author-sosofo (literal " ")
(process-children))))
 
 </style-specification-body>
 </style-specification>
 <external-specification id="docbook" document="docbook.dsl"> 
 </style-sheet>
 

- David

> -----Original Message-----
> From: N. Raghavendra [mailto:raghu@xxxxxxxxxxxx] 
> Sent: Friday, July 02, 2004 9:04 AM
> To: dssslist@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [dssslist] Character entities in DSSSL stylesheet
> 
> At 2004-06-30T07:57:31-04:00, Maltby, David G wrote:
> 
> > I forgot to ask: Is the ENTITY author declared in your Docbook 
> > document or your DSSSL document?
> 
> Hi David,
> 
> Yes, I did.  Below is a sample SGML file, and a DSSSL stylesheet.
> 
> The command I used was
> 
>   openjade -t sgml -d foo.dsl foo.sgml
> 
> I got "FnameSurname: This is the author." in the HTML output.
> 
> Cheers,
> Raghavendra.
> 
> foo.sgml:
> --------
> 
> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
> 
> <article>
>   <para>This is the author.</para>
> </article>
> 
> foo.dsl:
> -------
> 
> <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style 
> Sheet//EN"
> [
>   <!ENTITY docbook.dsl
>            PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML 
> Stylesheet//EN"
>            CDATA DSSSL>
> 
>   <!ENTITY % ISOnum.ent
>     PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN">
>   %ISOnum.ent;
> 
>   <!ENTITY author "Fname&nbsp;Surname">
> ]>
> 
> <style-sheet>
> <style-specification use="docbook">
> <style-specification-body>
> 
> (element (article para)
>   (make element gi: "P"
>         (literal (string-append "&author;:\space;" (data 
> (current-node))))))
> 
> </style-specification-body>
> </style-specification>
> <external-specification id="docbook" document="docbook.dsl"> 
> </style-sheet>
> 
> --
> N. Raghavendra <raghu@xxxxxxxxxxxx> | See mail headers for contact
> Harish-Chandra Research Institute   | and OpenPGP details.
> 
> 
> --+------------------------------------------------------------------
> DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist
> To unsubscribe, go to: http://lists.mulberrytech.com/dssslist/
> or e-mail: <mailto:dssslist-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
> --+--
> 
> 

Current Thread