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 to parsing)? XML Parser = Parser + DTD Validator?

The XML specification talks of an XML Processor rather than an XML Parser, and I think one could argue that the XML Processor does parsing plus validation. The products we (inaccurately) call XML parsers additionally do things like tree building. 

In user-land the term "parsing" means almost anything. When you read "I want to write an XML parser to do X" on a help forum it usually means "I want to write an application that takes XML input and does X.". Users frequently refer to Saxon as a parser. They have no idea what the word means, they just use it as a buzzword.

Michael Kay
Saxonica

On 29 Apr 2016, at 12:14, 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