You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Fabio Arrebola <fv...@gmail.com> on 2005/07/14 00:58:45 UTC

Validate memory buffer against DTD

Hi,

I have a XML input buffer that has the DOCTYPE flag and when I do its
parsing (memory) using XercesDOMParser I get and exception.
However, when I remove the DOCTYPE flag from the input buffer the
parsing goes ok. If I add the DTD specification to the input buffer it
also does the parsing with no errors.

Well, the question is: how do I validate a memory buffer that has the
DOCTYPE flag against its DTD?

Thanks in advance.

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: Validate memory buffer against DTD

Posted by Fabio Arrebola <fv...@gmail.com>.
The problem was somehow involved with debugging ... 

After setting the EntityResolver I still got the EndOfEntityException
during parse method ... but this only happened in debugging mode ...

Anyway ... problem solved ... thanks for your help.

For futher reference I'm using Borland Builder 6.

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: Validate memory buffer against DTD

Posted by Neil Graham <ne...@ca.ibm.com>.
Hi Fabio,

Have you set the systemId field on your MemBufInputSource?  When the 
parser finds something like an external subset with a relative URI 
reference, it needs something to absolutize it against--and the systemId 
is an excellent place to start.  Alternatively, have you set an 
EntityResolver on your parser so that you can hand it an InputSource 
encapsulating your external subset?

Cheers,
Neil
Neil Graham
Manager, XML Parser Development
IBM Toronto Lab
Phone:  905-413-3519, T/L 969-3519
E-mail:  neilg@ca.ibm.com





Fabio Arrebola <fv...@gmail.com> 
07/13/2005 06:58 PM
Please respond to
c-dev


To
c-dev@xerces.apache.org
cc

Subject
Validate memory buffer against DTD






Hi,

I have a XML input buffer that has the DOCTYPE flag and when I do its
parsing (memory) using XercesDOMParser I get and exception.
However, when I remove the DOCTYPE flag from the input buffer the
parsing goes ok. If I add the DTD specification to the input buffer it
also does the parsing with no errors.

Well, the question is: how do I validate a memory buffer that has the
DOCTYPE flag against its DTD?

Thanks in advance.

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org