473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Referecing a DTD within an XML file

Stu
I have the following syntax in my XML file

<!DOCTYPE config SYSTEM "config.dtd">

And also have my xml file and dtd file in the same directory, yet when I use
the following XML validator

http://www.stg.brown.edu/service/xmlvalid/

to validate my document I get this error.

I:\exec\pbh\config.xml:
error (563): can't resolve System ID: config.dtd

Can somebody please give me the correct syntax on how to specify a DTD within
an XML file or is this a problem with the XML validator.

FYI, if I encapsulate the DTD within the XML file it appears to work fine.

Thanks in advance for all who answer this post.
Jul 20 '05 #1
1 2170
be********@hotmail.com (Stu) writes:
I have the following syntax in my XML file

<!DOCTYPE config SYSTEM "config.dtd">

And also have my xml file and dtd file in the same directory, yet when I use
the following XML validator

http://www.stg.brown.edu/service/xmlvalid/

to validate my document I get this error.

I:\exec\pbh\config.xml:
error (563): can't resolve System ID: config.dtd
You're using a Web-based validator. It does not have access to your
local file system. It had BETTER not have access to the entire
directory from which you uploaded the XML file you are asking it to
validate. If it's using the normal file-upload interface, I don't
think it knows what directory the file came from (I could be wrong
here, it's been a few years since I read the spec on file uploading
from HTML forms).

So the validator is having trouble resolving the relative URL you have
specified in the system identifier. Your LOCAL validator may be
perfectly happy with it -- most XML parsers will say "well, I am
reading file F in the file system, so I'll just absolutize this to
also be a file:// URL ...", and they are right to do so. But it's
not really fair to expect the software at Brown to hack into your
local file system just to validate a document.
Can somebody please give me the correct syntax on how to specify a DTD within
an XML file or is this a problem with the XML validator.
You're using the correct syntax. (Or A correct syntax.)

The validator is also doing the Right Thing.

The problem appears to be what the old mainframe error-code manuals
used to call Probable Operator Error. You are expecting the wrong
thing. If you want a web-based validator to get access to files,
you either have to hand it the files (by uploading them with the
forms data) or the files have to be on the Web somewhere.

So: put the DTD on the Web somewhere, and give its full URI
in the system identifier of the XML document. And try again.
And then, when you have five minutes to spare, install RXP or SP
or expat locally.
Thanks in advance for all who answer this post.


I hope this helps.

-C. M. Sperberg-McQueen
World Wide Web Consortium
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Deane Barker | last post by:
I have a function that selects a file to include, then includes is. The file is including within the function, like so: function include_file($file_name) { require $file_name; return; }
0
by: Stian Søiland | last post by:
all examples performed with: Python 2.3+ (#2, Aug 10 2003, 11:09:33) on linux2 (2, 3, 0, 'final', 1) This is a recursive import:
0
by: Beginner | last post by:
In Visual Studio.NET, you can add a reference to Excel, it ends up something like this in project file: <Reference Name = "Excel" Guid = "{00020813-0000-0000-C000-000000000046}" VersionMajor =...
7
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
4
by: Jan Michalski | last post by:
Does anyone know how to incorporate classes with different namespaces within a project? I have two classes with the same name but different namespace. When I try to add the the second class of the...
2
by: Jon Pope | last post by:
Is it possible to view the contents of a CHM file within IE? I've attempted to do this by right-clicking on a CHM file then selecting "Open With..." and finally selecting "IE", but nothing...
2
by: Randall Powell | last post by:
I am in the process of developing a Windows Service which will: (1) monitor multiple network shares; (2) marshal text file transfers into an SQL Server 2000 instance; and (3) provide messaging...
3
by: Jerad Rose | last post by:
This is regarding Visual Studio 2003 (framework 1.1). We have several projects/libraries. Of course, many of these reference each other. If we only had one solution, we would simply add all of...
5
by: herenbdy | last post by:
I've been working on a Java based game in order to learn Java, but the game is functional only within my IDE (Eclipse). This image shows the file structure of my project:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.