At 11:36 PM -0400 7/21/02, Aleksander Slominski wrote:

>i must disagree ...
>
>XML is used now in all possible places and that what was perfect for
>hand-writing XML documents does not necessarily is useful when
>XML is machine processed - in such situation DTD is not only unnecessary
>but adds extra weight to XML parser implementations
>(and size of implementation  is very important factor for J2ME ...)
>

You are working under the misapprehension that this is your choice to 
make. It isn't. No matter how valid your criticisms of XML are, you 
do not get to decide what is and isn't in the language. That was 
decided years ago by the XML working group and the W3C. Sometimes 
they decided right. Sometimes they decided wrong. But they have 
decided, and it is now up to implementers to follow the spec as it's 
written, not to write their own half-XML/half meat-by-product parser.

If you are truly convinced that the XML spec is fundamentally broken, 
and you are willing to throw out the advantage of working with a 
standard language, flawed but a standard nonetheless; then you should 
feel free to invent your own markup language and parsers for it. This 
is what the MinML and YAML folks have done, for example. However, 
please do not tell people that your tools and parsers are XML. 
They're not. Misleading people about what they get when they use 
XMLPULL does a disservice to your users and the broader XML community.

>moreover XML schemas are replacing DTD so in many situation
>support for DTD is no longer needed at all ...

So what? Schemas do not change any aspect of XML 1.0, or relax any 
restrictions on what a conforming parser must provide.

>i think that XML 1.0 conformance is crucial for XML parser
>- with XMLPULL API the user code can request XML 1.0
>validating or non validating parser and if parser is created it
>is guaranteed to be XML 1.0 compliant - short example:

The user should not have to make special requests to get a fully 
conformant parser. This should be the default, and it should not be 
possible to produce a non-conformant parser. Anything less is a 
violation of XML 1.0.


>unfortunately it seems that we may failed in trying to get
>this fundamental API design choice explained ...

I've had this conversation with you before. I understand you quite 
well. I understand your choice, and why you made the choice you did. 
I *disagree* with your choice, and find that choice to be 
fundamentally incompatible with XML. You have convinced me that pull 
parsing is a useful model in general, which I was extremely skeptical 
of before. However, I remain convinced that the existing parsers in 
Java and the XMLPULL API in particular are deeply flawed. Unless you 
are willing to reconsider the principles that underlie the design of 
XMLPULL, it will not become a suitable API for XML processing.

>in MPX1 i have currently support for proposed XML 1.1 character
>checking as it seems better reflecting current UNICODE usage patterns
>(http://www.w3.org/TR/xml11/#sec2.3)

Thanks for confirming that. This is another area in which the parser 
is deliberately not following the spec, and is likely to confuse 
users and cause problems for interoperability. If you wish to write 
an experimental XML 1.1 parser, feel free. However, please label it 
as such so users are not confused. Furthermore, you should realize 
that it is likely that even XML 1.1 parsers will still be required to 
make full name checks according to XML 1.0 rules for documents that 
are not explicitly labelled as version="1.1".

>i would like to ask that when making comments about XMLPULL API
>to be precise if it is API that has flaws (this is serious problem!)
>or particular implementation that needs fixing (that i think is 
>minor problem).
>

Noted. However, it seems to me that the flaws in API design and the 
flaws in implementation both stem from the same false preconceptions. 
In particular:

1. XML 1.0 correctness is negotiable
2. Size and speed are more important than a clean design

Thus the flaws in the API and the implementations are very closely related.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | [EMAIL PROTECTED] | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to