[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Does DTD validation work with namespaces?
Wayne Steele wrote: > DTD Validation is intended to allow documents to specify the model and > constraints they adhere to, not to force documents to conform to some > outside spec. Idle musings only... Given that DTDs are for parsing for validity, it might not be unreasonable to expect that the entire document will be checked against their various DTDs. Since a DOCTYPE declaration is used to signal the start of a new document, it would be ideal if that concept could just be extended, allowing a number of DOCTYPEs to coexist in a single compound document. Each time a new DOCTYPE was encountered, processing of the parent document would be suspended and the documents processed recursively. The existence of a nested document would have no impact on the structure of the parent document - it wouldn't even need to be anticipated in the DTD. Using OmniMark, you can parse all of the DTDs and have them ready for use. You could easily define a NOTATION for the namespace prefix and attach it to the elements on output, generating properly namespaced documents. The only thing preventing it is the fact that a DOCTYPE declaration in the middle of a document needs to result in an error. (A fairly well-sourced rumour has it that they have processed XML inside an SGML document in the OmniMark lab, so technically, nesting wouldn't be an issue.) Of course, the approach above locks you into the whole document being able to be processed for validity (validatable?) or not - no mixing could be supportted. There are probably numerous other reason that it isn't practical, but in the dataflow whereby data is validated at the source and then considered well-formed from that point on, it seems tantalisingly close to being possible. I'm not proposing change, just speculating about how in a specific scenario, namespaces and DTDs might work together. -- Regards, Marcus Carr email: mrc@a... ___________________________________________________________________ Allette Systems (Australia) www: http://www.allette.com.au ___________________________________________________________________ "Everything should be made as simple as possible, but not simpler." - Einstein
|
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
|