Yes, SGML does have SDATA. This can not be configured at SX. I have to written a simple SAX parser tp replace them. As SAX is leaving those entity references unchanged, I need to declare them in a seperate file and then make the parser aware of that. However, there is a problem.


I have some declared entities (say in a separated dtd). The source XML file that I am parsing using a SAX Parser (written in JAVA) conforms to another DTD type and thus can not include a line like:
<!DOCTYPE Msttab SYSTEM "SAXXML.dtd">


Is there any way to make a SAX parser (based on Xerces) to be aware of those entities. A code snippet (in JAVA) will be of great help.

Many Thanks




From: "Nigel Peck - MIS Web Design" <[EMAIL PROTECTED]>
To: "US-man Syed" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Subject: RE: [www-talk] <none>
Date: Wed, 30 Jul 2003 17:42:51 +0100

I am no expert on SGML but does SGML have a data type of SDATA?

Because XML does not, this may be the problem, your entities may have a data type of SDATA, try setting them to CDATA.

(Disclaimer: This could be totally useless advice)

Cheers,
Nigel

MIS Web Design
http://www.miswebdesign.com/

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf
> Of US-man Syed
> Sent: 30 July 2003 17:27
> To: [EMAIL PROTECTED]
> Subject: [www-talk] <none>
>
>
> Hi All!
>
> I am converting a file from SGML to XML using the syntax:
>
> C:\SP1_3_4\bin\sx -wall -E0 -xndata -fC:\QABC\QABCErrors.txt
> -DC:\QABC\ents
> TIM.dtd TIM.sgm>C:\QABC\QABC_TIM.xml
>
> and am receiving errors like:
> W: reference to internal SDATA entity "ldquo" not allowed in XML
> W: reference to internal SDATA entity "rdquo" not allowed in XML
> W: reference to internal SDATA entity "deg" not allowed in XML
> W: reference to internal SDATA entity "mdash" not allowed in XML
> W: reference to internal SDATA entity "ndash" not allowed in XML
> W: reference to internal SDATA entity "nbsp" not allowed in XML
> W: reference to internal SDATA entity "amp" not allowed in XML
> .........
>
> The entities are defined in external entity file ISOTech, ISOPub,
> ISOnum and
> ISOGRk1 which are kept in C:\QABC\ents directory.
>
> Can anybody help me on how to resolve it and/or what could be the
> cause of
> such messages?
>
> Thanks
> Us
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>


_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail




Reply via email to