You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Jeffrey Rodriguez <je...@hotmail.com> on 2000/07/01 00:01:00 UTC

Re: Entities not supported in DTDs

Mr. Guldbaek,
I am not able to reproduce your claim.

This is what I tried :

This is my xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE FOO SYSTEM "foo5.dtd" >
<FOO>
   <FOOFOO ident="123"/>
</FOO>

This is my dtd file foo5.dtd:

<!ENTITY % ident "ident NMTOKEN #REQUIRED" >
<!ELEMENT FOO  (FOOFOO|BAR?)>
<!ELEMENT BAR (MOCHA*)>
<!ELEMENT FOOFOO (#PCDATA)>
<!ATTLIST FOOFOO %ident; >

When I run sax.SAXCount  with validation turn on:

syslitbug5.xml: 3194 ms (2 elems, 1 attrs, 0 spaces, 5 chars)


Would you please send to jeffreyr@us.ibm.com a testcase that
reproduces you claim.



THanks,
Jeffreyr Rodriguez
IBM Cupertino












>From: pkg@netnord.dk (Peter Guldbaek - Netnord A/S)
>Reply-To: general@xml.apache.org
>To: <ge...@xml.apache.org>
>Subject: Entities not supported in DTDs
>Date: Fri, 30 Jun 2000 13:00:00 +0200
>
>Hi,
>
>I seems to have problems using Xerces for Java to parse XML documents 
>having
>a DTD containing <!ENTITY> definitions like "<!ENTITY % ident "ident 
>NMTOKEN
>#REQUIRED">". The parser exits with
>"java.lang.StringIndexOutOfBoundsException" when it parses through the DTD
>specified in the XML document. The exception is no longer thrown if I 
>remove
>all definitions of parameter entities from the DTD.
>
>The problems started when I changed to Xerces for Java version 1.1.2. I 
>have
>previously used version 1.0.3 (which did not have problems with entities).
>Does anyone have a tip to get around this or is it a bug? Thanks in advance
>:-)
>
>- Peter K. Guldbaek
>
>
>---------------------------------------------------------------------
>In case of troubles, e-mail:     webmaster@xml.apache.org
>To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
>For additional commands, e-mail: general-help@xml.apache.org
>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


RE: Entities not supported in DTDs

Posted by Peter Guldbaek - Netnord A/S <pk...@netnord.dk>.
I turned validation on and everything seems to be running fine - my mistake.
Thanks :-)

 - Peter K. Guldbaek

> -----Original Message-----
> From: Jeffrey Rodriguez [mailto:jeffreyr_97@hotmail.com]
> Sent: Saturday, July 01, 2000 12:01 AM
> To: general@xml.apache.org
> Subject: Re: Entities not supported in DTDs
>
>
> Mr. Guldbaek,
> I am not able to reproduce your claim.
>
> This is what I tried :
>
> This is my xml file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE FOO SYSTEM "foo5.dtd" >
> <FOO>
>    <FOOFOO ident="123"/>
> </FOO>
>
> This is my dtd file foo5.dtd:
>
> <!ENTITY % ident "ident NMTOKEN #REQUIRED" >
> <!ELEMENT FOO  (FOOFOO|BAR?)>
> <!ELEMENT BAR (MOCHA*)>
> <!ELEMENT FOOFOO (#PCDATA)>
> <!ATTLIST FOOFOO %ident; >
>
> When I run sax.SAXCount  with validation turn on:
>
> syslitbug5.xml: 3194 ms (2 elems, 1 attrs, 0 spaces, 5 chars)
>
>
> Would you please send to jeffreyr@us.ibm.com a testcase that
> reproduces you claim.
>
>
>
> THanks,
> Jeffreyr Rodriguez
> IBM Cupertino
>
>
>
>
>
>
>
>
>
>
>
>
> >From: pkg@netnord.dk (Peter Guldbaek - Netnord A/S)
> >Reply-To: general@xml.apache.org
> >To: <ge...@xml.apache.org>
> >Subject: Entities not supported in DTDs
> >Date: Fri, 30 Jun 2000 13:00:00 +0200
> >
> >Hi,
> >
> >I seems to have problems using Xerces for Java to parse XML documents
> >having
> >a DTD containing <!ENTITY> definitions like "<!ENTITY % ident "ident
> >NMTOKEN
> >#REQUIRED">". The parser exits with
> >"java.lang.StringIndexOutOfBoundsException" when it parses
> through the DTD
> >specified in the XML document. The exception is no longer thrown if I
> >remove
> >all definitions of parameter entities from the DTD.
> >
> >The problems started when I changed to Xerces for Java version 1.1.2. I
> >have
> >previously used version 1.0.3 (which did not have problems with
> entities).
> >Does anyone have a tip to get around this or is it a bug? Thanks
> in advance
> >:-)
> >
> >- Peter K. Guldbaek
> >
> >
> >---------------------------------------------------------------------
> >In case of troubles, e-mail:     webmaster@xml.apache.org
> >To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> >For additional commands, e-mail: general-help@xml.apache.org
> >
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
>
>