RE: (dsssl) SGML to XML

Subject: RE: (dsssl) SGML to XML
From: Miroslaw Prywata <Miroslaw.Prywata@xxxxxxxxxx>
Date: Thu, 20 Feb 2003 14:11:06 +0100
> -----Original Message-----
> From: Narinder Garg [mailto:narinder_g@xxxxxxxxx]
> I am new to DSSSL. I wish to get SGML of some DTD to my XML. 
> Currently I am using James utility
> sx.exe to get an equivalent XML and doing XSL transformation 
> to my XML. Is there some way in DSSSL
> to get directly my xml. Jade can do it but I could not figure 
> out as I dont know the DSSSL syntax.
> Any help will be appreciated

It's very simple (provided your XSL is simple). If you only want to replace
some element by others use 

make element
make empty-element
.....

Syntax is easy and you won't have to make XSL transformations afterwards. I
use this method to produce XSL-FO documents from SGML documents.

Example:

(element FG (make element gi: "fo:inline" attributes: '(("vertical-align"
"super"))))
(element FD (make element gi: "fo:inline" attributes: '(("vertical-align"
"sub"))))


<FG>aaa</FG>   is transformed into  <fo:inline
vertical-align="super">aaa</fo:inline>



Remember about putting this  first:

(declare-flow-object-class element
  "UNREGISTERED::James Clark//Flow Object Class::element")

(declare-flow-object-class empty-element
  "UNREGISTERED::James Clark//Flow Object Class::empty-element")

(declare-flow-object-class document-type
  "UNREGISTERED::James Clark//Flow Object Class::document-type")

(declare-flow-object-class processing-instruction
  "UNREGISTERED::James Clark//Flow Object Class::processing-instruction")

(declare-flow-object-class entity
  "UNREGISTERED::James Clark//Flow Object Class::entity")

(declare-flow-object-class entity-ref
  "UNREGISTERED::James Clark//Flow Object Class::entity-ref")

(declare-flow-object-class formatting-instruction
  "UNREGISTERED::James Clark//Flow Object Class::formatting-instruction")

(declare-characteristic preserve-sdata?
  "UNREGISTERED::James Clark//Characteristic::preserve-sdata?" #t)


Mirek

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

Current Thread