XML to SGML conversion

J

jimmy.williamson

Hi,

I'm currently working on a project where I am required to investigate
how to convert SGML to XML, and then back again.
From what I've seen on the web so far, James Clark's SP software can
convert SGML to XML, but thus far I cannot find anything that will go
the other way.

I realize that in converting SGML to XML I will lose a few things in
the conversion (as XML is a subset of SGML), so I'm not looking to
recreate the SGML 100%. I'm just looking for something that will
convert the XML back into valid SGML.

Is there anything out there that can do this?
 
J

Joe Kesselman

From what I've seen on the web so far, James Clark's SP software can
convert SGML to XML, but thus far I cannot find anything that will go
the other way.

XML was originally a fairly clean subset of SGML, and most XML should
run happily through an XML parser. Do you have a specific problem, or is
the problem that you want to convert to a specific SGML language which
is different from the XML language the file is starting in?

(If the latter... that's a transcoding problem, and XSLT might be all
you need.)
 
J

jimmy.williamson

Maybe I should explain myself a little better :)

Firstly, I need to be able to convert an input SGML file to XML and
store it.

Secondly, the XML content may change during its lifecycle (the client
may wish to modify the XML content).

Finally, I need to be able to convert the XML file back into SGML if
the client desires to do so. (This conversion "should" be into the
same/similiar SGML language as the original SGML file).

Forgive me, for my knowledge of SGML is somewhat lacking. Are you
suggesting that because XML is a fairly clean subset of SGML, that the
existing SGML parser should have no problem in handling the converted
XML?
 
J

Joe Kesselman

Forgive me, for my knowledge of SGML is somewhat lacking. Are you
suggesting that because XML is a fairly clean subset of SGML, that the
existing SGML parser should have no problem in handling the converted
XML?

The SGML parser will probably be able to handle the XML. If the changes
made in getting into XML and processing the document there don't
break/change the document structure in ways that are incompatable with
the SGML document definition, I would say that you've got good odds that
the application(s) invoking that parser also have good odds of being
able to use the altered doc without having to convert the syntax back to
its more complicated form.

This depends in part on what you're doing in the SGML that XML can't
handle. If it's just things like implicit end-tags, making them explicit
shouldn't bother SGML. If it's other things...
 
Joined
Oct 29, 2008
Messages
1
Reaction score
0
HI ,
I need a tool to convert sgml to xml.
I am having sgml files with graphics tag.
I installed James Clark's SP software for converting this.
But I am not able to do. Though by sx.exe I am able to see some output in command prompt as I am using command prompt to execute sx.exe.
Even I used Jade James DSSL engine
But I am not able to do. Can you please help me to find out the solution.
Can please tell me what is going with my installation or usage.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top