Discussion:
Convert SGML to XML using James Clarke's tool
sa ku
2009-08-18 15:35:24 UTC
Permalink
Hi

I have a task of converting sgml to XML. The XML file has a schem=
a and the SGML file has a DTD<br><br>I downloaded James Clarke's tool.
But I am not clear as to how to run it. <br><br>Can anybody please help me
with a documentation that I can look at or with examples?



Thanks
saks

--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Michael Ludwig
2009-08-18 16:56:08 UTC
Permalink
I have a task of converting sgml to XML. The XML file has a schema
and the SGML file has a DTD<br><br>I downloaded James Clarke's tool.
But I am not clear as to how to run it. <br><br>Can anybody please
help me with a documentation that I can look at or with examples?
Both! The tool you want is sx. See:

http://www.jclark.com/sp/
http://www.jclark.com/sp/sx.htm

A simple example:

# type movie.dtd
<!ELEMENT movie - O (name,length,rating)>
<!ELEMENT name O O (#PCDATA)>
<!ELEMENT length - O (#PCDATA)>
<!ELEMENT rating - O (#PCDATA)>
<!ATTLIST length units (min|hour) min>

# type movie.sgml
<!DOCTYPE movie SYSTEM "movie.dtd">
<MOVIE>
Gladiator
<LENGTH UNITS="min">195
<RATING>MA

# sx movie.sgml
<?xml version="1.0"?>
<MOVIE
<NAME
Gladiator</NAME><LENGTH
UNITS="MIN"
195</LENGTH><RATING
MA</RATING></MOVIE>
--
Michael Ludwig

--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Syd Bauman
2009-08-18 19:12:45 UTC
Permalink
My recollection is that there were enough improvements made to osx to
use it over sx. (osx is the open source version of James Clark's sx
program. It is part of OpenSP, which was created by, and perhaps is
still maintained by, the OpenJade folks.)

In any case, although it's a bit old, you may find hte work of the
TEI task force on this topic helpful. It can be found at
http://www.tei-c.org/Activities/Workgroups/MI/. In particular, you
may find
http://www.tei-c.org/Activities/Workgroups/MI/miw03.xml#body.1_div.3_div.1
illuminating.

I note, however, that this is not really an XSLT question or issue,
so if you have further questions we should probably take them
off-list.

--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--

Loading...