|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: What effect does DOCTYPE have
> Do parsers display reliable or defined behavior when confronted with a > dummy DTD? > ... > Any links or references to what a sufficient, minimal DTD or schema looks > like? In the case of a dtd, it looks like this: Unlike an XML document which must have at least one element tag, a dtd can be empty. the behaviour is well defined in the XML spec, A non validating parser will treat this the same as having no dtd (except it may raise an error if it can't load the empty file for whatever reason) a validating parser will report validation errors as the document will clearly be invalid (as there must be at least one element which hasn't been declared). A harder question is if the DTD was not only declaring elements and attributes, but defaulting attributes and declaring some of them to be type ID, what's the minimum DTD that produces the same input for XSL. To answer that, you need to traverse the DTD, following any external references within the dtd and copy any attribute decarations that declare ID or attribute defaults (you don't need to declare the elements). This may require expanding parameter entities, skipping marked sections etc (ie it needs a full XML parser, you can't really do it with a text editor) No idea what a minimal schema looks like. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
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
|

Cart








