Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > SX- sgml to xml conversion problems

Reply
Thread Tools

SX- sgml to xml conversion problems

 
 
Usman
Guest
Posts: n/a
 
      07-30-2003
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


 
Reply With Quote
 
 
 
 
Morus Walter
Guest
Posts: n/a
 
      07-30-2003
In article <zzSVa.49059$(E-Mail Removed)>,
"Usman" <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML to SGML conversion jimmy.williamson@gmail.com XML 4 10-29-2008 01:31 PM
XML-Schema to (SGML) DTD transcription Martin Froehlich XML 2 08-07-2004 10:29 PM
Good SGML DTD viewer *or* tool for translating SGML DTDs to XML DTDs Clifford W. Racz XML 4 02-13-2004 06:24 PM
???XML vs SGML for unicode support??? krammer XML 1 10-14-2003 03:55 PM
RFC: A Distributed Universal SGML/XML Catalogue Management System Nick Kew XML 0 09-10-2003 05:53 PM



Advertisments