Re: Using DSSSL with XML to read attribute values

Subject: Re: Using DSSSL with XML to read attribute values
From: Daniel Speck <dspeck@xxxxxxxxxxxx>
Date: Thu, 04 Jun 1998 09:24:59 -0400

Dan Hable wrote:

> I'm looking for a simple solution to this rather complex problem. I want
> to have my DSSSL stylesheet format the output according to a set of
> attribuite values in a XML document. I'm using Jade to process all of my
> documents. Is this possible? If so, could someone point me in the right
> direction. Thanks!

 The short answer is, yes this is possible. It would be helpful if you could
provide more details about what you are trying to do but there is a standard
DSSSL function, (attribute-string) that will return the value of an
attribute as a string. You can then use this value (appropriately converted)
to specify the characteristics of flow objects:

DTD:

<!ELEMENT p    - -    (#PCDATA)>
<!ATTLIST p
           indent    NUMBER #REQUIRED>

Instance:

<p indent="2">This paragraph should be indented two units from the left
margin</p>

DSSSL style sheet:

(element p
    start-indent: (* (string->number (attribute-string "indent")) 1pica)
    (process-children))

-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



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


Current Thread
  • Using DSSSL with XML to read attribute values
    • Dan Hable - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id RAA15754Wed, 3 Jun 1998 17:19:02 -0400 (EDT)
      • Daniel Speck - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id JAA04699Thu, 4 Jun 1998 09:32:14 -0400 (EDT) <=