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

Parser Question.

  • From: "Brown, Bryan" <bryanb@u...>
  • To: "'xml-dev@x...'" <xml-dev@x...>
  • Date: Wed, 31 May 2000 15:14:22 -0700

xml internal decl
I have written a parser and I have a couple of questions that someone might
be kind enough to answer for me.

Question 1.
In the XML spec it states that the internal dtd subset occurs before an
external dtd subset if both are declared.

So if I have an external dtd like the following mydtd.dtd
<!NOTATION gif PUBLIC "gifviewer.exe">

and a document like
<DOCTYPE doc SYSTEM "mydtd.dtd" [
<!ENTITY picture SYSTEM "picture.gif" gif>

A parser should issue an error because the entity decl in the internal
subset references a notation "gif" which has not yet been declared. But in
the XML conformance tests in one of the sun tests a very similiar example
arises and the Conformace test says that it should be a valid document. Is
this correct ?

Question 2.
There is a validity constraint on the Standalone decl, which seems
complicated to implement, and the XML spec goes out of the way to note that
the standalone decl only denotes the presence of external stuff, it makes no
statement as to parser behaviour. ( this is also mentioned in Tim Bray's
annotated spec).

So the question is, if you are validating do you do anything with the
Standalone Decl, and if so when in the parsing process (everytime you parse
an entity,attribute, and element content)?

Question 3.
In the external subset PEs can occur anywhere, this seems to me to make the
process of parsing an external production very complicated because I need to
check at each step of the way if the next token is a PE reference, does
anyone have a better way ? Why is this allowed in the spec is there really
that much value in being able to specify

<!ENTITY % e2 "(e3|e4)">
<!ELEMENT e2 %e2;>

instead of
<!ENTITY % e2 "<!ELEMENT e2 (e3|e4)>">
%e2;

Seems to me that is the same effect without having to make a parser
implementors life a hell of alot more difficult.

Question 4.
The spec states that if a SystemLiteral has a fragment identifier the parser
may signal an error, yet the conformance tests offer a document which is
supposed not-wf because it has a SystemLiteral with a fragment identifier.
So is it an error or is it the parser option what to do ?

Question 5.
Is checking to make sure element content is deterministic an option or
required for a conforming parser ?

Bryan






***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

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.