(dsssl) Re: DSSSList Digest V5 #120

Subject: (dsssl) Re: DSSSList Digest V5 #120
From: Suki Venkat <skvenkat@xxxxxxxxx>
Date: Sat, 22 Feb 2003 13:16:04 +0530
Hi,

You are in the right place (DSSSL) for this job.
Basically there are two ways of doing this:
(1) Use SGML+DTD to XMLize the syntax (you can use Jade+identity.dsl with xml-backend for this) and then use XSLT to transform to any other XML.
(2) You can also do a direct SGML transformation to your XML.


Regards

S.K.Venkat
TnQ Books and Journals, Chennai


At 02:30 AM 2/21/2003 -0500, you wrote:
DSSSList Digest Friday, February 21 2003 Volume 05 : Number 120



In this issue:

     (dsssl) SGML to XML
     Re: (dsssl) SGML to XML
     RE: (dsssl) SGML to XML
     Re: (dsssl) SGML to XML
     RE: (dsssl) SGML to XML
     (dsssl) display-group and jadetex

----------------------------------------------------------------------

Date: Thu, 20 Feb 2003 02:53:23 -0800 (PST)
From: Narinder Garg <narinder_g@xxxxxxxxx>
Subject: (dsssl) SGML to XML

Hi
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
Thanks
Narinder


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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

------------------------------

Date: Thu, 20 Feb 2003 13:04:41 +0100
From: Jany Quintard <jany.quintard@xxxxxxx>
Subject: Re: (dsssl) SGML to XML

* Narinder Garg [Thu, 20/02/2003 at 02:53 -0800]
> Hi
> 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


To output XML, use the xml backend (-t xml)
and some identity transformation

- -----------------------------------
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN"
>

<style-specification>

(default
  (if (node-property "must-omit-end-tag?" (current-node))
      (make empty-element attributes: (copy-attributes))
      (make element       attributes: (copy-attributes))))

</style-specification>
- ------------------------------------

You can find the copy-attribute fonction on the Openjade page

HiH. Jany
- --
- ------------------------------------------------------------------------
Jany Quintard         | How do you know so much about swallows?
jany.quintard@xxxxxxx | Well, you have to know these things when you are
                      | a king, you know. [Terry Jones & Graham Chapman]

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

------------------------------

Date: Thu, 20 Feb 2003 14:11:06 +0100
From: Miroslaw Prywata <Miroslaw.Prywata@xxxxxxxxxx>
Subject: RE: (dsssl) SGML to XML

> -----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

------------------------------

Date: Thu, 20 Feb 2003 14:35:21 +0100
From: "Juan R. Migoya" <jmigoya@xxxxxxxxxxx>
Subject: Re: (dsssl) SGML to XML

This is the batch file I use to transform from SGML to MXL:

osx -biso-8859-1 -fosx_err.log -xempty -xno-nl-in-tag -xcdata -xcomment -c\\webinge\d\docbookx\docbook.cat %1 %2

Of course, yo must change the path to "docbook.cat"

The arguments are the input and otuput files respectively.

Regards,
Juan R. Migoya

Narinder Garg wrote:
>
> Hi
> 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
> Thanks
> Narinder
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/
>
> DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist


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

------------------------------

Date: Thu, 20 Feb 2003 09:27:18 -0500
From: Didier PH Martin <martind@xxxxxxxxxxxxx>
Subject: RE: (dsssl) SGML to XML

Hi Narinder

You said:
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

Didier replies:
Yes you can do that, as Jany said, with the XML backend. Also, Miroslav also
gave you a good hint of what kind of OpenJade extensions to be used for that
purpose.

I will add though that the transformations you need to do have to be simple.
In other words, that the matching rule you can use is restricted to elements
matching and this latter is not available with the current OpenJade version.
This query construction rule (i.e. matching rule) allows more sophisticated
matching rules like, for instance, matching to an attribute or an other
special condition as you would do with XSLT. This is because, Openjade has
no implementations of the query construction rule. To know more about the
DSSSL construction rules read:
http://www.netfolder.com/DSSSL/DSSSL-markup-Rules.htm.

To get more resources about DSSSL and OpenJade (I updated that site last
week) you can go to: http://www.netfolder.com/DSSSL

In conclusion, if the matching process could be restricted to elements only,
then you may remove an unnecessary step and use OpenJade to directly
transform your SGML document into (I guess) an XML based rendering language.
Otherwise, unfortunately, you'll still need XSLT in the process.

Cheers
Didier PH Martin
http://www.didier-martin.com



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

------------------------------

Date: 20 Feb 2003 11:04:43 -0600
From: Adam DiCarlo <adam@xxxxxxxxxxxx>
Subject: (dsssl) display-group and jadetex

Hi. I've been doing the work to maintain the docbook-dsssl stylesheets
and in the print stylesheets I'm finding numerous bugs caused by the
fact that JadeTeX seems to add vertical spacing to display-group.  See
SourceForge bug 560872,
<URL:http://sourceforge.net/tracker/index.php?func=detail&aid=560872&group_id=28782&atid=394217>.

There are two possible approaches: (a) fix JadeTex, or (b) add
negative display-group spacing in docbook-dsssl to work-around it in
docbook-dsssl.

Obviously (a) is more desirable.  Is there any prospect that it could
be fixed in JadeTeX?  Are there any patches available?

- --
..Adam Di Carlo.......<adam@xxxxxxxxxxxx>...<URL:http://www.onshored.com/>


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


------------------------------

End of DSSSList Digest V5 #120
******************************


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

Current Thread