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 Adib Taraben <Ta...@wige-mic.de> on 2001/09/03 11:57:44 UTC

validation in Xerces

Hello,


I got an problem non validating an xml file.
I have an XML-file with DTD:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE SLC_2002_Sports PUBLIC "-//Ids//oris+//crs//CRS.dtd "
"ids/oris+/crs/CRSMain.dtd">
<SLC_2002_Sports RSC="SB0000000" Type="X02">
bla bla
</SLC_2002_Sports>
 
Running the parser I set ValScheme to DOMParser::Val_Never. But I get an
unspecified exception until I remove this DTD-line from the file.
I think the parser tries to load that files but fails with exception.
Is there any sense for that? Any solution?

I use Xerces 1.5.1 on Win32 compiled by BCB5

Thanks in advance,

Adib.
-- 

  Adib Taraben              taraben.a@wige-mic.de

  WIGE MIC                  Tel:  +49 (0)341-4621/100
  Wiesenring 11             Fax:  +49 (0)341-4621/400
  04159 LEIPZIG             mail: office@wige-mic.de
  GERMANY                   WWW:  www.wige-mic.de

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


Re: validation in Xerces

Posted by Juan Julian Merelo Guervos <jm...@geneura.ugr.es>.
Adib Taraben escribió:
> 
> Hello,
> 
> I got an problem non validating an xml file.
> I have an XML-file with DTD:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE SLC_2002_Sports PUBLIC "-//Ids//oris+//crs//CRS.dtd "
> "ids/oris+/crs/CRSMain.dtd">
> <SLC_2002_Sports RSC="SB0000000" Type="X02">
> bla bla
> </SLC_2002_Sports>
> 
> Running the parser I set ValScheme to DOMParser::Val_Never. But I get an
> unspecified exception until I remove this DTD-line from the file.
> I think the parser tries to load that files but fails with exception.
> Is there any sense for that? Any solution?

What's exactly the error? If you don't want validation, why do you
include a DTD definition?

J
-- 
OPEAL => http://opeal.sourceforge.net
EO => http://eodev.sourceforge.net
AEB'02 => http://aeb02.unex.es

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


Re: validation in Xerces

Posted by Adib Taraben <Ta...@wige-mic.de>.
Thanks Erik,

that's working.

Adib.

Erik Rydgren wrote:
> 
> The DTD is always loaded if a doctype is provided. The parser need it for
> resolving entities and this is standard xml behaviour.
> 
> Install a entity resolver and return a dummy DTD for the file
> /ids/oris+/crs/CRSMain.dtd. I dont think you even need to define the root
> element because you do not use validation. But this I'm not sure of.
> 
> Regards
> Erik Rydgren
> Mandarinen systems AB
> Sweden
>

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


RE: validation in Xerces

Posted by Erik Rydgren <er...@mandarinen.se>.
The DTD is always loaded if a doctype is provided. The parser need it for
resolving entities and this is standard xml behaviour.

Install a entity resolver and return a dummy DTD for the file
/ids/oris+/crs/CRSMain.dtd. I dont think you even need to define the root
element because you do not use validation. But this I'm not sure of.

Regards
Erik Rydgren
Mandarinen systems AB
Sweden

-----Original Message-----
From: Adib Taraben [mailto:Taraben.A@wige-mic.de]
Sent: den 3 september 2001 11:58
To: xerces-c-dev@xml.apache.org
Subject: validation in Xerces


Hello,


I got an problem non validating an xml file.
I have an XML-file with DTD:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE SLC_2002_Sports PUBLIC "-//Ids//oris+//crs//CRS.dtd "
"ids/oris+/crs/CRSMain.dtd">
<SLC_2002_Sports RSC="SB0000000" Type="X02">
bla bla
</SLC_2002_Sports>

Running the parser I set ValScheme to DOMParser::Val_Never. But I get an
unspecified exception until I remove this DTD-line from the file.
I think the parser tries to load that files but fails with exception.
Is there any sense for that? Any solution?

I use Xerces 1.5.1 on Win32 compiled by BCB5

Thanks in advance,

Adib.
--

  Adib Taraben              taraben.a@wige-mic.de

  WIGE MIC                  Tel:  +49 (0)341-4621/100
  Wiesenring 11             Fax:  +49 (0)341-4621/400
  04159 LEIPZIG             mail: office@wige-mic.de
  GERMANY                   WWW:  www.wige-mic.de

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


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