xsl-list
[Top] [All Lists]

Re: [xsl] Convert SGML to XML using James Clarke's tool

2009-08-18 12:56:44
sa ku schrieb:
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-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>