|
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Using DSSSL with XML to read attrib, Dan Hable | Thread | Deriving unique href target?, Wroth, Mark |
| Re: SGML Java classes, Sebastian Rahtz | Date | Deriving unique href target?, Wroth, Mark |
| Month |