Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » XML Validation against DTD(Validate an XML file against a dtd file where dtd extension has to be case insensitive)
XML Validation against DTD [message #741403] Wed, 19 October 2011 13:52 Go to next message
sivasankarir is currently offline sivasankarir
Messages: 7
Registered: April 2011
Junior Member
Hi,

I use DOM parser to parse XML file. In the XML, DTD file name will be mentioned as shown below, against which validation has to be done.
<!DOCTYPE XMI SYSTEM "sample.dtd">

The sample.dtd file with the same name will be placed in the same folder where xml file is placed. If the dtd file's name is exactly as given in the xml, parsing and validation works fine.

I want the parser to parse the xml file without considering dtd file name's case, ie, it should parse if either sample.DTD or sample.dTD is present.

This works in windows, but in linux, it throws IOException saying the dtd file with the exact name is not present. Is there a solution for this?

Thanks for reading!
Re: XML Validation against DTD [message #741424 is a reply to message #741403] Wed, 19 October 2011 14:08 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26089
Registered: July 2009
Senior Member
This question has nothing to do with the XSD model. It doesn't even
sound like an Eclipse question. Or are you using Eclipse's Web Tools
project? In that case, you'd be better to ask on the WTP newsgroup.


On 19/10/2011 3:52 PM, sivasankarir wrote:
> Hi,
>
> I use DOM parser to parse XML file. In the XML, DTD file name will be
> mentioned as shown below, against which validation has to be done.
> <!DOCTYPE XMI SYSTEM "sample.dtd">
>
> The sample.dtd file with the same name will be placed in the same
> folder where xml file is placed. If the dtd file's name is exactly as
> given in the xml, parsing and validation works fine.
>
> I want the parser to parse the xml file without considering dtd file
> name's case, ie, it should parse if either sample.DTD or sample.dTD is
> present.
>
> This works in windows, but in linux, it throws IOException saying the
> dtd file with the exact name is not present. Is there a solution for
> this?
>
> Thanks for reading!
Previous Topic:Exclude files/folders from validation programmatically
Next Topic:Resolving schema import "http://www.w3.org/2000/09/xmldsig"
Goto Forum:
  


Current Time: Thu Oct 02 08:38:40 GMT 2014

Powered by FUDForum. Page generated in 0.02188 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software