SX- sgml to xml conversion problems

Discussion in 'XML' started by Usman, Jul 30, 2003.

  1. Usman

    Usman Guest

    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
     
    Usman, Jul 30, 2003
    #1
    1. Advertising

  2. Usman

    Morus Walter Guest

    In article <zzSVa.49059$>,
    "Usman" <> 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
     
    Morus Walter, Jul 30, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nick Kew
    Replies:
    0
    Views:
    334
    Nick Kew
    Sep 10, 2003
  2. krammer
    Replies:
    1
    Views:
    611
    Patrick TJ McPhee
    Oct 14, 2003
  3. Clifford W. Racz
    Replies:
    4
    Views:
    2,039
    Clifford W. Racz
    Feb 13, 2004
  4. Martin Froehlich

    XML-Schema to (SGML) DTD transcription

    Martin Froehlich, Aug 6, 2004, in forum: XML
    Replies:
    2
    Views:
    429
    Peter Flynn
    Aug 7, 2004
  5. Replies:
    4
    Views:
    5,347
    agradip2004
    Oct 29, 2008
Loading...

Share This Page