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

RE: Re WF, V, and MSXML

  • From: Peter@u... (Peter Murray-Rust)
  • To: xml-dev@i...
  • Date: Tue, 10 Jun 1997 22:11:34 GMT

msxml adding dtd
In message <011290D45A8ACF119B8B00805FD471D6033DA955@R...> David Schach writes:
[...]
> 	[David Schach]  The XML spec seems to address this issue in
> section 2.20 Required Markup Declaration. 

	My problem is with the equivalence or not of the words 'parse',
'process' and 'validate'.  I hope this isn't being seen as mindless pickiness.

> 
> 		In an RMD, the value NONE indicates that an XML
> processor can parse the document correctly without first reading  any
                ^^^^^
If RMD=NONE then the document cannot be validated.  Therefore "parse"!="validate"

> part of the DTD.  The value INTERNAL indicates that the XML processor
> must read and process the internal subset of the DTD, if provided, to
                ^^^^^^^
Presumable means extract the structure of the DTD for 'processing' the document.

> parse the containing document correctly.  The value ALL indicates that
> the XML processor must read and process the declarations in both the
                                  ^^^^^^^
i.e. interpret the DTD subset(s)

> subsets of the DTD, if provided, to parse the containing document
                                      ^^^^^
> correctly.
> 
> 		...
> 
> 		If no RMD is provided, an XML processor must behave as
> though an RMD had been provided with the value ALL.    [David Schach]
> (emphasis added) 

Here is a possible document

<?XML VERSION="1.0" RMD="INTERNAL"?> <!-- Parser, you have to parse me -->
<!DOCTYPE FOO [                      
<!ELEMENT FOO EMPTY>
<!ATTLIST FOO XYZZY CDATA #FIXED "Y2"> 
]>                  <!-- my internal subset is for adding Attvals -->
<FOO BAR="PLUGH"/>

Now, on the argument above (document is in control) the processor parses the 
document.  It cannot be valid, but does the processor try?  If yes, it fails.
The result is either a null document, *or* error recovery to WF parsing.
If the parser does not try to validate, the result is

<FOO XYZZY="Y2" BAR="PLUGH"/>

However, although the spec [5] mentions processors that validate and 
non-validate, in other places (e.g. [2.8]) it uses the phrase 'reads the 
DTD'.  This implies that there are (possibly) three classes of processor:

- a validator (which must always read the DTD)
- a busy non-validator (which reads the DTD not for validation, but for 
	extracting DTD-based markup)
- a lazy non-validator (which does not read the DTD).

The lazy non-validator will produce a different output from the busy 
non-validator, i.e.:

<FOO BAR="PLUGH"/>

The lazy non-validator could be in violation of the spec if the RMD requires
it to parse the DTD subset(s).  Maybe it parses them but throws them away
(i.e. 'does not read' == 'reads and forgets').

	P.



-- 
Peter Murray-Rust, domestic net connection
Virtual School of Molecular Sciences
http://www.vsms.nottingham.ac.uk/

xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@i... the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@i...)


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.