473,322 Members | 1,736 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,322 software developers and data experts.

Reasoning for load-external-dtd Xerces default setting?

Hi,

The Xerces XML parser is reading external DTD references in DOCTYPEs
by default, but is not doing anything with them because validation is
turned off by default. This is documented in
http://xml.apache.org/xerces2-j/feat...d-external-dtd

This setting causes many XML instances with broken DTD references in
the DOCTYPE to fail and adds some performance overhead. Is there
anything good that comes from this default setting? Is an XML file
considered not well-formed if the external DTD reference is broken?

thanks,
blu
Jul 20 '05 #1
4 3994
"blu4899" <bl*****@netscape.net> wrote in message
news:42**************************@posting.google.c om...
Hi,

The Xerces XML parser is reading external DTD references in DOCTYPEs
by default, but is not doing anything with them because validation is
turned off by default. This is documented in
http://xml.apache.org/xerces2-j/feat...d-external-dtd
This setting causes many XML instances with broken DTD references in
the DOCTYPE to fail and adds some performance overhead. Is there
anything good that comes from this default setting? Is an XML file
considered not well-formed if the external DTD reference is broken?


I can't find anywhere in the XML spec that says it is. If someone knows
better, I would be delighted to know about it, too.

Bob Foster
Jul 20 '05 #2
But, I hasten to add, all parsers I am aware of treat it an unresolvable DTD
URI as an error if validation is enabled (while only some treat an
unresolvable external entity URI as an error).

Tim Bray, in his Annotated XML comments had this to say about URIs: "If you
do something silly like using an empty identifier, or one that doesn't work,
anyone to whom you send the document has every right to complain that it's
broken."

Makes sense. But this doesn't seem to have found its way into the spec.

Bob Foster

"blu4899" <bl*****@netscape.net> wrote in message
news:42**************************@posting.google.c om...
Hi,

The Xerces XML parser is reading external DTD references in DOCTYPEs
by default, but is not doing anything with them because validation is
turned off by default. This is documented in
http://xml.apache.org/xerces2-j/feat...d-external-dtd
This setting causes many XML instances with broken DTD references in
the DOCTYPE to fail and adds some performance overhead. Is there
anything good that comes from this default setting? Is an XML file
considered not well-formed if the external DTD reference is broken?

thanks,
blu

Jul 20 '05 #3

"Bob Foster" <bo********@comcast.net> wrote in message news:wmplb.839537$YN5.950633@sccrnsc01...
"blu4899" <bl*****@netscape.net> wrote in message
news:42**************************@posting.google.c om...
Hi,

The Xerces XML parser is reading external DTD references in DOCTYPEs
by default, but is not doing anything with them because validation is
turned off by default. This is documented in

http://xml.apache.org/xerces2-j/feat...d-external-dtd

This setting causes many XML instances with broken DTD references in
the DOCTYPE to fail and adds some performance overhead. Is there
anything good that comes from this default setting? Is an XML file
considered not well-formed if the external DTD reference is broken?


I can't find anywhere in the XML spec that says it is. If someone knows
better, I would be delighted to know about it, too.


Not validating does not mean that the parser should not read external entities.
These can contain entity declarations and attribute default values which the
parser can use to resolve entity references and default attributes properly.

Karl
Jul 20 '05 #4
"Karl Waclawek" <ka**@waclawek.net> wrote in message
news:aO*********************@nnrp1.uunet.ca...
"blu4899" <bl*****@netscape.net> wrote in message
news:42**************************@posting.google.c om...
Hi,

The Xerces XML parser is reading external DTD references in DOCTYPEs
by default, but is not doing anything with them because validation is
turned off by default. This is documented in
http://xml.apache.org/xerces2-j/feat...d-external-dtd

This setting causes many XML instances with broken DTD references in
the DOCTYPE to fail and adds some performance overhead. Is there
anything good that comes from this default setting? Is an XML file
considered not well-formed if the external DTD reference is broken?


I can't find anywhere in the XML spec that says it is. If someone knows
better, I would be delighted to know about it, too.


Not validating does not mean that the parser should not read external

entities. These can contain entity declarations and attribute default values which the parser can use to resolve entity references and default attributes

properly.

One can pile up "should" and "can" as high as one likes, but a parser won't
do any of the things it should or can do unless it a) supports the option to
do them and b) is appropriately configured. ;-}

Bob Foster
Jul 20 '05 #5

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

Similar topics

6
by: Matthew Wells | last post by:
I am trying to load a form (load Me) without the form becoming visible. If I try me.hide or me.visible = false, they load the form and the form blinks before becoming invisible. Is there a way to...
6
by: JS | last post by:
EE instance DB2 v7.2.0 fixpack 3 on WIN2K. I select some data from a table A and write it to a file using the COALESCE function and whitespace as the null character: eg coalesce(col1, ' '). This...
2
by: **Developer** | last post by:
I have a Form (FV&C) containing a userconrtrol (CF&E) I do a ShowDialog for the form and the form's Load calls a method of the UserControl. The first time I do this the usercontrol appears on...
3
by: Kalpesh | last post by:
Hello All, What is the scenario in which creating & unloading appdomain (other than the default appdomain) is required ? Kalpesh
3
by: db2udbgirl | last post by:
Env: DB2 UDB 8.2, AIX 5.3 While trying to load data (73 Million rows, Medium size table uses 4K tablespace) into a table using cursor it fails with "SQL0964C The transaction log for the database...
1
by: dbagirltx | last post by:
We have done some testing with mixed and forgotten results. So I'm hoping that asking here can clarify some issues for us. Right now we do one weekly warm backup. Throughout the week there are...
1
by: huyuhui | last post by:
The following is a question of LOAD utility. Question: How does the DB2 enforce table check constraints for data added to table with the LOAD utility? A. With the BUILD phase of LOAD B. With the...
2
by: contractsup | last post by:
Environment: $ uname -a AIX <withheld2 5 000100614C00 $ db2level DB21085I Instance "<withheld>" uses "32" bits and DB2 code release "SQL08024" with level identifier "03050106"....
6
by: John B | last post by:
What is the reasoning for recommending that all events have the signature EventHandler(object sender, EventArgs e). Obviously I can create a custom delegate delegate void FooHandler(string foo)...
5
by: danfan46 | last post by:
Hi. I'm on DB2 9.5.0.1 on Linux AMD 64 and the database has four partitions where catalog is on partion 0 and user data on 1 thru 3. After a load failure (path to load file was wrong) I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.