xml validation of entity text in txt files
Hello p2p forum,
I am teaching myself XML using the "Beginning XML, 3rd edition" book published by Wrox. In Chapter 4 their exercises use the free Schematron Validator by Topologi. This software works fine until I attempt to validate an Element tag in the XML against an Entity tag in the DTD. The Entity tag contains a reference to a TXT file where the attribute text is contained. For some reason, the validator does not get the code in the TXT file. When the text is contained directly in the Entity tag in the DTD, the text is obtained. I am not sure if this is an issue with the validator or with code that the book advocates using. I have proof-read the code against the book several times, and it looks the same. The code is below:
In the main XML file (dinosaurs4.xml):
<!DOCTYPE dinosaurs PUBLIC "-//Beginning XML//DTD Dinosaurs Example//EN" "dinosaurs4.dtd">
<dinosaurs version="1.0" source="Beginning XML 3E">
<carnivore kind="Tyrannosaurus_Rex" habitat="forest swamp jungle">
(some more sub-elements)
In the DTD file (dinosaurs4.dtd):
<!ELEMENT dinosaurs (carnivore | herbivore | omnivore)* >
<!ATTLIST dinosaurs version CDATA #FIXED "1.0"
source CDATA #IMPLIED>
<!ELEMENT carnivore (species, length, height, weight, speed, weapon, discoverer, location, description)>
<!ATTLIST carnivore kind ID #REQUIRED
habitat NMTOKENS #REQUIRED
period (Triassic | Jurassic | Cretaceous) "Cretaceous">
<!ENTITY tyrannosaurus PUBLIC "-//Beginning XML//Tyrannosaurus textual description//EN" "tyrannosaurus.txt">
In the text file (tyrannosaurus.txt):
The Tyrannosaurus Rex was the king of the terrible lizards. Though many now believe it was a hunter and a scavenger it is no less fearsome.
Can you help? I am also emailing Topologi about this issue. Thanks for any help you can give.