Henri Sivonen, > > Yes, but MSIE^H^H^H^Hsome xml processors (cough cough) still > > inappropriately > > use comments for that purpose. > > I am not familiar with that. What purpose exactly? Why should Atom > support it?
MSIE conditional comments. See other person's reply. > > Then there are example XML documents (i.e. for tutorials) that > > sometimes require comments be preserved. > > If you want people to read the source as is, it would make sense to > make it text/plain or put the source snippets in <code> or <pre> in an > (X)HTML tutorial. Except when it is a live example. Or when posting XHTML or XML content that is intended to be embedded (via object element) as a seperate, child document. It seems silly to allow anything NOT xml to be embedded unmodified (i.e. PNGs, sounds), while no XML content can have that guarantee. And yes: I know that Atom is not FTP or HTTP. I'm looking at the Atom entry uploader's POV rather than the downloader's perspective. The Atom API is a way to simplify managing web sites: it would be silly to make it unusable for associating XML in general while allowing any other type to be unmodified. > > Finally if you are posting content associated with an entry with the > > Atom API, then it is important that any documents uploaded are not > > modified. > > I think Atom processors should not be required to preserve > serialization artifacts. That is, IMO, they should not be required to > care about anything that is not exposed via SAX2 ContentHandler with > qNames ignored. So do I. That's why the spec should state that any XML fragments embedded into atom:content as an XML tree become part of that tree. So PIs become associated with the Atom document rather than the content, for example. If the entry MUST be preserved unmodified (Author's intention), the spec should either specify that it must be associated externally via @src or encoded via entities or base64 like any other non-xml-compatible formats in the current draft. > Vanilla XML processors don't act on PIs. They report them to the > application--in this case the Atom processor. So Atom Processors MUST be between any XML and PI processor stages? That sucks! It means just to display Atom, I can't use a generic XSLT processor like Saxon or MSIE. > Depending on an entity reference and not being able to accept the > straight replacement text is just wrong. I agree. I'm just bringing up possible incompatibilities for debate! > >>> DOCTYPE declaration(s) > >> > >> If DOCTYPE is essential for the receiving app, you've got bigger > >> problems than Atom. Hardwiring IDness based on namespaces is more > >> practical than relying on DTD-based data typing. > > > > I'm not necessarily talking about external document type definitions. > > Preventing DOCTYPEs would cause incompatibilities with XML > > well-formedness > > processing. From the spec: > > > > "[Definition: While they are not required to check the document for > > validity, > > they are REQUIRED to process all the declarations they read in the > > internal DTD > > subset and in any parameter entity that they read, up to the first > > reference to > > a parameter entity that they do not read; that is to say, they MUST > > use the > > information in those declarations to normalize attribute values, > > include the > > replacement text of internal entities, and supply default attribute > > values.]" > > That's a non-issue. You don't just throw away the DOCTYPE but parse the > original document with it and reserialize as a DOCTYPEless fragment. > You don't lose well-formedness or content. You only lose the shallow > attribute data typing provided by the DTD. Well, that data could be valuable. Some situations require them, and it would be really nice to have optional DOCTYPE info kept with the fragment. With DOCTYPE information associated with embedded content, it becomes possible to transform entries into valid XML or HTML documents. Some apps change their behavior with well-formed and valid modes. DOCTYPE switching may be evil, but it is currently a necessary evil. I see this as low risk (it doesn't break anything and could even be an OPTIONAL feature) while easing the pain when dealing with the existing web. > Atom's main purpose is to facilitate software to software > communication. When interop or implementation ease and readability > conflict, readability should yield. That's why I proposed they should be externally referenced (or base64ed), so the Atom processor doesn't touch them! This is a hint to authors on how to avoid a common error. > > There is nothing intrinsically bad about DOCTYPE sections > > Yes, there is. On the Web you cannot trust that the recipient is using > an XML processor that processes the DOCTYPE beyond checking the > internal subset for well-formedness. An optional feature that does not > degrade gracefully when not supported is bad. DOCTYPE is such a > feature. In the cases where the DOCTYPE can be gracefully ignored, the > DOCTYPE is pointless. No, any well formed XML processor MUST expand internal entities and add replaced attributes as well. This is NOT OPTIONAL. > > Remember that anything compatible with XML MUST allow its optional > > features to > > be in the markup (even if they are just ignored). So if you disallow > > DOCTYPE > > sections, then you can't claim to support XML. > > Atom is not claiming that you could embed the literal source of any XML > doc. You can embed the stuff that canonicalization would preserve. Yet you can do that with PNG, PDF, or other content via base 64 encodings. It is silly to allow that for them and not XML. > > Anything that could have any chance of dataloss - in this case, the > > loss of XML > > comments, PIs, and XML and DOCTYPE declarations � is bad. > > Would you consider changes in the order of attributes and the white > space between attributes data loss as well? I wouldn't in general, but XML never claimed to encode that data in the first place. -- Jimmy Cerra https://nemo.dev.java.net __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
