XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] Does an XML parser do DTD validation (in addition toparsing)? XML Parser = Parser + DTD Validator?

Ø  validating processor = non-validating processor + DTD validation

 

Ah, excellent. Thanks Ghislain.

Four Questions:

 

1. Are most XML processors validating XML processors?

 

2. Is Xerces-J a validating XML processor?

 

3. Does Xerces-J offer a non-validating processor? Or, does Xerces-J only offer a validating processor?

 

4. Is the Xerces-J XML Schema validator completely separate from the Xerces-J XML processor? That is, can I obtain just the Xerces-J XML processor without the Xerces-J XML Schema validator?

 

/Roger

 

 

 

From: Ghislain Fourny [mailto:g@28.io]
Sent: Friday, April 29, 2016 7:21 AM
To: Costello, Roger L. <costello@mitre.org>
Cc: xml-dev@lists.xml.org
Subject: Re: [xml-dev] Does an XML parser do DTD validation (in addition to parsing)? XML Parser = Parser + DTD Validator?

 

Hi Roger,

 

It has to do with well-formedness vs. validation, which are two different things. A parser in the strictest sense of the term only looks at well-formedness.

 

The XML specification explicitly distinguishes between non-validating processors and validating processors.

 

 

I'd express it more in terms of: validating processor = non-validating processor + DTD validation.

 

I hope it helps.

 

Kind regards,

Ghislain

 

 

On Fri, Apr 29, 2016 at 1:14 PM, Costello, Roger L. <costello@mitre.org> wrote:

Hi Folks,

 

Below is an XML instance document with a DOCTYPE declaration that references an external DTD.

 

When I “validate” the XML instance document (e.g., click on “validate” in Oxygen XML), what is doing the validation? Is it an XML parser that is doing the validation? If so, then an XML parser does both parsing and (DTD) validation, yes?

 

XML Parser = Parser + DTD Validator?

 

/Roger

 

aircraft.xml

-----------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE aircraft PUBLIC "-//example//aircraft//EN" "aircraft.dtd" >
<aircraft>
           
<model>Boeing 747</model>
           
<altitude units="feet">12000</altitude>
</aircraft>

-----------------------------------------------------------------

 

aircraft.dtd

-----------------------------------------------------------------

<!ELEMENT aircraft (model, altitude)>

<!ELEMENT model (#PCDATA)>

<!ELEMENT altitude (#PCDATA)>

<!ATTLIST altitude
             units (feet|meters) #REQUIRED>

-----------------------------------------------------------------

 

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS