OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] The subsetting has begun

[ Lists Home | Date Index | Thread Index ]

Hi Jon,

I'm glad you chimed in. Just so you know, my whining was more directed
to Mike than it was to the authors of this spec. We go way back on this
;-)

> The footprint requirements just don't appear allow it. There are more
> productions to process the DTD than the XML document, and that's
before
> you have to deal with what you find there.
> 
> As always, we'd be happen to be proved wrong. Given a way to be fully
> compliant, within the limitations of the devices, we would use it. The
EG
> spent quite some time looking for such a solution...

I share your hope that there is yet a way to be XML-conformant within
the J2ME memory limitations, about which I am ignorant. However, having
now actually taken a look at the spec, I find the stated rationale for
rejecting DTDs interesting, the entire text of which I've included
below.[1]

If anything, the stated rationale gives me hope that either:

  a) there are some misunderstandings about what is actually required of
a non-validating processor (as Elliotte speculated), or
  b) the real reason for the decision is not so much footprint
restrictions as it is the reason actually stated in the spec (in which
case further scrutiny may be of help).

Evan


[1] <http://jcp.org/aboutJava/communityprocess/review/jsr172/index.html>

<excerpt>
Section 2.6

Most J2ME platforms will likely provide a non-validating XML parser, as
it is much less resource intensive than its validating counterpart. If
an implementation provides a non-validating XML parser, that parser must
conform to the XML Specification per section 5.1 with the following
exception:

* if a non-validating parser encounters a Document Type Definition
(DTD), the parser MUST throw a SAXParseException

The reasoning for this change of behavior on the J2ME platform is
clearly described in the XML Specification Section 5.2 (Using XML
Processors). When a non-validating processor ignores a DTD reference, it
may not normalize attribute values or supply default values. Therefore,
application code which utilizes a non-validating parser to process
certain XML may report different results than application code which
utilizes a validating parser. In favor of predictability, this
specification has chosen to explicitly disallow DTD references in XML
data processed by its non-validating parsers. The goal is to avoid
unexpected and hard-to-find application errors when the same XML data is
used between a J2SE JAXP application and a J2ME JAXP application.
</excerpt>





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS