Subject: Re: About XML to multiple language/multiple outputs From: Matthias Clasen <clasen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 13 Aug 1999 23:17:22 +0200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: About XML to multiple language/, Didier PH Martin | Thread | RE: About XML to multiple language/, Didier PH Martin |
RE: Unix login name and full name i, Avi Kivity | Date | RE: About XML to multiple language/, Didier PH Martin |
Month |