473,473 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Wellformedness in Xerces

Hello

Is it right that a XML document is only wellformed if all
entity references can be resolved in the document? this would
mean that Xerces needs to retrieve external DTD files
to get entity definitions. I always thought
that to check on wellformedness, no external files would
be needed. And IF the document is wellformed and you
retrieve a DOM tree, then Xerces has replaced already all
entities with the "replacing text" or how it is called.
Is Xerces required to do this during the wellformedness-checking as
requirement of the XML 1.0 specification or can this
feature be turned off so that the entities are somehow
encoded in the text nodes of the DOM tree? And if this is
possible, are there any specs which define such an encoding?
I have the expression "unparsed entity" in mind, and this should
need to be represented in a DOM tree somehow (maybe I confused
some terms now..).

THANKS
Jul 20 '05 #1
3 1560
indo3 wrote:
Hello

Is it right that a XML document is only wellformed if all
entity references can be resolved in the document? this would

Hi,

Yes. Entity references have to be resolved for an XML document to be
well-formed. It is possible to define the entity definitions within the
document itself - so that there is no need to go get an external DTD
document to verify well-formedness.

Regards,
Kenneth
Jul 20 '05 #2
In article <ca**************************@posting.google.com >,
indo3 <in****@gmx.de> wrote:
Is it right that a XML document is only wellformed if all
entity references can be resolved in the document?
Not exactly. In some circumstances an undeclared entity is only a
validity error. The idea of this is that a minimal parser doesn't
have to read anything but the main document (the document entity), so
if there is an external DTD it won't know whether it contains
declarations for entities.

If you want to check that all entities are defined, you need to use
a validating parser (or a non-validating parser that happens to read
the external subset).

If the document doesn't have an external DTD, or is declared be be
standalone, then all undeclared entities are a well-formedness error.
I have the expression "unparsed entity" in mind


This is something quite different. Its main use is to refer to things
which aren't XML, such as JPEG images. You can only refer to unparsed
entities as attribute values, and a parser will not attempt to read
them.

-- Richard
Jul 20 '05 #3
Richard Tobin wrote:
In article <ca**************************@posting.google.com >,
indo3 <in****@gmx.de> wrote:

Is it right that a XML document is only wellformed if all
entity references can be resolved in the document?

Not exactly. In some circumstances an undeclared entity is only a
validity error. The idea of this is that a minimal parser doesn't
have to read anything but the main document (the document entity), so
if there is an external DTD it won't know whether it contains
declarations for entities.

Richard,

I see that there is more to this than I had previously thought. Thanks
for the enlightening answer.

Kenneth
Jul 20 '05 #4

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

Similar topics

2
by: Bekkali Hicham | last post by:
hi, i have downloaded the latest version 2.4 of Xerces, and unziped it, i end up with a diectory hierarchy like this c:\xerces-2_4_0\XercesImpl.jar c:\xerces-2_4_0\XercesSamples.jar...
0
by: Waseem | last post by:
Hi I have looked and tried everything and i still cant sort this out i have no idea why this wont work I am using Xerces Perl on Windows and Debian to try this and it wont work on both of...
0
by: Jim Phelps | last post by:
After having memory leak issues with Xerces-c 2.3.0 for Solaris 2.7 for CC 6.2 I have decided to update to at least 2.4. I have downloaded the binary tarball and have installed it on my...
0
by: Dale Gerdemann | last post by:
I've been trying to use DOM level 3 with xerces-2_6_2. There's a sample called samples/DOM3.java, but I've had trouble with compilation. I've downloaded Xerces-J-bin.2.6.2 and...
18
by: jacksu | last post by:
I have a simple program to run xpath with xerces 1_2_7 XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); XPathExpression xp = xPath.compile(strXpr);...
3
by: Matt | last post by:
Hello, Summary: Where can one download a Xerces-C (XML pardser) dynamic library file (.DLL file) for Windows (Win98/WinNT/Win2k/WinXP/Win2003, including server flavors; don't need to support...
2
by: Vlad Zorinov | last post by:
I'm getting the following error after a couple of months of XML processing, using Xerces 2.0.0 in an apache tomcat. Does anyone have any ideas what this problem may be or what I should do to solve...
3
by: Raphael Tagliani | last post by:
(english version below) Bonjour! Je travaille sur un gros projet java, qui parse beaucoup de fichiers xml au lancement d'un serveur. Nous avons un problème de concurrence qu lancement. En...
9
by: mstilli | last post by:
Hi, I am trying to use schema for server side validation using xerces to catch the validation errors. validating this XML: <Content4> <textarea13></textarea13>...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.