[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: What effect does DOCTYPE have

Subject: Re: What effect does DOCTYPE have
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 31 Jan 2006 16:07:43 GMT
skipping doctype validation
> 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
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.