In answer to 1):

I think if your XML document specifies a DTD, the parser will try to use the
DTD, even if you tell it to use Val_Never.  My experience is that with
Val_Never, it will still check that the document is a well-formed XML
document - which seems to include getting the DTD (if specified), but won't
throw an exception if you include an attribute on an element that isn't
specified by the DTD.

-----Original Message-----
From: Alexey Miroshnichenko [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 3:41 AM
To: [EMAIL PROTECTED]
Subject: ValScheme question


Hi all,

  Pardon me if I address my problem not correctly. But may be anyone
  can help my with follow questions. I use xerces-c-1_3_0.

  1) I have well-formed xml file with DOCTYPE declaration but
  corresponding dtd file is absent. I do
  
    setValidationScheme(SAXParser::ValSchemes::Val_Never)

  and I suppose that dtd file do not needed in this case. But I catch
  exception: unnable open dtd file.
  I looked in source. At first we scan dtd file(XMLScanner.cpp,
  scanProlog()), then we set up Validation scheme(XMLScanner.cpp,
  scanDocument()).

  Is this behaviour of parser engine correct?

  2) I have well-formed xml file with empty DOCTYPE declaration
  <!DOCTYPE rootnodename> and I set ValSchemes::Val_Auto. After
  successful scanDTD() we set fHaveSubset = true. And after this
  we set fValidate = fHaveSubset, i.e. "true". The same place in
  XMLScanner.cpp. So, validation failed.

  The same question.

  May be I should go to bugzilla?

  Thanks before.
  
-- 
Best regards,
 Alexey                          mailto:[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to