473,320 Members | 1,848 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,320 software developers and data experts.

SX- sgml to xml conversion problems

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" "-fE:\Project\error.log"
-xndata "E:\Project\xyz.dtd" "E:\Project\xyz.sgm" > "E:\Project\xyz.xml"

E:\Project\sx\sx.exe:E:\Project\xyz.sgm:15:55:W: reference to internal
SDATA entity "ldquo" not allowed in
XML
E:\Project\sx\sx.exe:E:\Project\xyz.sgm:15:77:W: reference to internal
SDATA entity "rdquo" not allowed in
XML
E:\Project\sx\sx.exe:E:\Project\xyz.sgm:18:79:W: reference to internal
SDATA entity "rdquo" not allowed in
XML
....
I have included entity files ISOTech, ISONum etc and ldquo, rdquo etc are
defined there (so should they really be considered as internal entities?).

Can anyone help resolve these problems and their cause.
Alternatively, after generating the resulting xml files which contains
references but not the declarations to such entities, how can we handle
those entitity references at XML post-processing time.

Thanks.
U
Jul 20 '05 #1
1 5319
In article <zz*********************@nnrp1.uunet.ca>,
"Usman" <Us*********@hotmail.com> writes:

E:\Project\sx\sx.exe:E:\Project\xyz.sgm:15:55:W: reference to internal
SDATA entity "ldquo" not allowed in
XML

SGML SDATA entities are different from XML entities just doing text
replacement.

So sx has no way to generate XML entity declarations in general.
For special charactars you can
- change the DTD to declare these entities as text replacement in sgml
(requires unicode handling, so this may be problematic).
Basically you have to change a declaration
<!ENTITIY bla SDATA "[bla ]">
to
<!ENTITIY bla "<whateverblastandsfor>">
Then the entities should be replaced and you should get xml with
apropirate unicode characters.
UNTESTED.
- ignore the warnings. sx will keep the entities. Simply add an apropriate
DTD declaring the entities for xml and things should work.
Works for me.

HTH
Morus
Jul 20 '05 #2

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

Similar topics

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...
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...
31
by: Bjørn Augestad | last post by:
Below is a program which converts a double to an integer in two different ways, giving me two different values for the int. The basic expression is 1.0 / (1.0 * 365.0) which should be 365, but one...
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...
3
by: jimmy.williamson | last post by:
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...
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.