473,394 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

XML to SGML conversion

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?

Jun 23 '06 #1
3 2353
ji**************@gmail.com wrote:
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.)
Jun 23 '06 #2
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?

Joe Kesselman wrote:
ji**************@gmail.com wrote:
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.)


Jun 23 '06 #3
ji**************@gmail.com wrote:
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...
Jun 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Usman | last post by:
Dear friends, I would like to ask about James Clark sx.exe parser from SGML to XML. I write the batch file like this : "E:\Project\sx\sx.exe" -wall "-DE:\Project\sx\entities"...
0
by: Nick Kew | last post by:
Rationale ========= Many applications today benefit from an SGML and/or XML Entity Catalogue to dereference entities referenced by a Public Identifier. For a validating SGML parser this is an...
1
by: krammer | last post by:
Hello, I have the following questions that I have not been able to find any *good* answers for. Your help would me much appreciated!, fyi, I am a Java XML guy and I have no experience with SGML...
1
by: krammer | last post by:
Hello, Can any one please give me a short but concise pros and cons list of Unicode support in both SGML and XML? long story short, we are gonna port our leagacy SGML files to XML and the new...
4
by: Clifford W. Racz | last post by:
I am an XML author and I am needing to do some SGML work as well. I am using James Clark's SP (SX) to transform my SGML source into an XML source for use with XSLTs. I am needing to write XSLTs...
5
by: Lars | last post by:
Why doesn't the W3C's HTML Validator recognize € and what do I have to do to make my html-file valid?
6
by: S. | last post by:
if in my website i am using the sgml { notation, is it accurate to say to my users that the site uses unicode or that it requires unicode? is there a mathematical formula to calculate a unicode...
4
by: Steven Bethard | last post by:
I have some plain text data and some SGML markup for that text that I need to align. (The SGML doesn't maintain the original whitespace, so I have to do some alignment; I can't just calculate the...
2
by: Frantic | last post by:
I'm working on a list of japaneese entities that contain the entity, the unicode hexadecimal code and the xml/sgml entity used for that entity. A unicode document is read into the program, then the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.