[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Does DTD validation work with namespaces?
"Paul W. Abrahams" wrote: > There is, to be sure, a way around this. The DTD can prefix every name with an > entity reference, and the calling document can declare that entity reference to > have as its value the correct prefix, effectively parameterizing the DTD. But > this is a kludge - an ugly, awkward kludge that I don't think anyone is defending > as an adequate solution. Parameter entities are there to parameterize the DTD. It is not kludgy to use them for that purpose. But in this specific case, I don't really understand how using PEs allows redefinition of names. Doesn't XML 1.0 preclude that? 4.4.8 Included as PE Just as with external parsed entities, parameter entities need only be included if validating. When a parameter-entity reference is recognized in the DTD and included, its replacement text is enlarged by the attachment of one leading and one following space (#x20) character; the intent is to constrain the replacement text of parameter entities to contain an integral number of grammatical tokens in the DTD. The reason for this rule is to simulate the effect of SGML's Entity End signal: this is a signal in the parsed document that an entity has ended. People who followed the C Preprocessor's evolution would remember that some early cpp versions allowed token construction after replacement: this was regarded as unsafe and obscure and so they ended up creating a specific operator (##) to indicate text replacement with no spacing (this is from memory, I am sure others have better grasp on the facts here). I know the DTD for XML Schemas use it, but I have never bothered to check up on why. Now that I look at it, I am a little confused. Rick Jelliffe
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|