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>-----------------------------------------------------------------