RE: About XML to multiple language/multiple outputs

Subject: RE: About XML to multiple language/multiple outputs
From: "Didier PH Martin" <martind@xxxxxxxxxxxxx>
Date: Fri, 13 Aug 1999 17:50:03 -0400
HI Matthias,

After examining attentively the output, I noticed that even the attribute's
value was reversed, maybe not a very useful feature but for sure a very
powerful one. It also indicates that the value was processed as a node list,
so the grove model is quite complete.

regards
Didier PH Martin
mailto:martind@xxxxxxxxxxxxx
http://www.netfolder.com

-----Original Message-----
From: owner-dssslist@xxxxxxxxxxxxxxxx
[mailto:owner-dssslist@xxxxxxxxxxxxxxxx]On Behalf Of Matthias Clasen
Sent: Friday, August 13, 1999 5:17 PM
To: dssslist@xxxxxxxxxxxxxxxx
Subject: Re: About XML to multiple language/multiple outputs



I just got dsc 2.0 built with a little hacking - somehow the makefiles
didn't want to build the included sp-1.3, so I had to link dsc
manually against my installed sp-1.3.2 libs.

Here is the result of running one of the examples distributed with dsc:

clasen:[data] >../build/src/dsc -s reverse -c catalog idtrans.dsl -+
triv.sgm
>>> Evaluating specification . . . done.
>>>>>DSSSL read-eval-print loop (use (srep) for Scheme reader)<<<<<
dsc> (go)
<SIMP LANG='hsilgne'><BIT NAME='TWO'>2</BIT><BIT NAME='ONE'>1</BIT></SIMP>
dsc>

--------------------triv.sgm-----------------------------

<!doctype simp [
<!element simp o o (bit*)>
<!attlist simp lang CDATA "english">
<!element bit - - (#PCDATA)>
<!attlist bit name id #required
              lang CDATA #implied>
]>
<bit name=one>1</bit>
<bit name=two>2</bit>

--------------------idtrans.dsl--------------------------

<!doctype transformation-sheet PUBLIC
       "-//Henry S. Thompson//DTD DSSSL Transformation Sheet//EN">
<!-- examples of DSSSL transformations, based on an original by James Clark
       -->

<transformation-specification id=ident use='basic'>
;;; Identity transform

(=> (everything)
    (default-transform))

<transformation-specification id=basic>
;;; Corrected version of an original by James Clark

(define (everything)
  (subgrove (current-root)))

(define (default-transform)
  (if (origin-to-subnode-rel (current-node))
      ;; internal
      (identity-transform-by-origin)
    ;; root
    (create-root #f                     ; identifier for output grove
                 (copy-current))))

(define (identity-transform-by-origin)
  (create-sub (origin (current-node))
              (copy-current)
              property: (origin-to-subnode-rel (current-node))))

(define (copy-current)
  (subgrove-spec node: (current-node)))

;;; Reverse order of children

<transformation-specification id=reverse use='basic'>

(=> (everything)
    (if (or (node-list-empty? (parent (current-node)))
            (node-list-empty? (follow (current-node))))
        (default-transform)
      (create-follow (ifollow (current-node))
                     (copy-current))))



--
Matthias Clasen,
Tel. 0761/203-5606
Email: clasen@xxxxxxxxxxxxxxxxxxxxxxxxxx
Mathematisches Institut, Albert-Ludwigs-Universitaet Freiburg


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


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


Current Thread