Henri Sivonen wrote:
If the input can smuggle in its own rules the way DOCTYPE and schemaLocation allow it to do, the app can no longer trust the validation stage, which defeats the whole point of embedding the validator. Therefore, I think a PI for the input to specify its own schema is totally wrong considering case 1).
There is a big difference between DOCTYPE and schemaLocation on one side and Murata-san proposal on other side. XML and XML Schema specifications say that schema specified by DOCTYPE (or schemaLocation) must be used and that it augments infoset of document. OTOH proposed PI doesn't say that you must use those schemas for validation. It only says that if you need to know schema of document you can use it as a hint which will help you find schema.
QA tools would regress to a less useful level if the user of a QA tool only knew that the document is internally consistent without knowing whether it adheres to the particular grammar the user is interested in. Therefore, I think a PI for the input to specify its own schema would harm case 2).
If you write QA tool you will simple ignore this PI and use other mean for specifying schema. Where is problem?
I agree that in case 3) it is desirable to use a RELAX NG schema for editing assistance. However, I think such use is a private matter between the user and his/her editor and, therefore, it is not necessary to expose such private editing method details to whoever subsequently receives the document. Moreover, the schema repository is likely to be local, so the most obvious references ie. installation-specific file system paths would be useless to others making the PI useful only privately. OTOH, registering common identifiers for schemas and abstracting away the file paths would probably be an overkill and for the same effort you could use some configurable association method that does not contaminate the document.
I think that it is quite common that schemas for shared vocabularies are available at http:// location and this location is used to identify schema. If you work with some schema often, you will store local copy of it on your system and use XML catalog file for redirect request for remote resource to local one.
Also, having to contaminate the document itself with editing process-specific artifacts can be a sign of a design flaw in the editor. In the common cases, the schema could be bound to the root namespace or to the filename extension (as is customary with programming language-specific syntax highlighting in text editors).
Users are design flaws. Software engineers can fix broken software, but they can't fix broken users ;-)
Since case 3) seems more like a private issue, I think central endorsement of a standard PI is not necessary for case 3).
Is it private if I (or group of users) is switching between three editors? -- ------------------------------------------------------------------ Jirka Kosek e-mail: [EMAIL PROTECTED] http://www.kosek.cz ------------------------------------------------------------------ Profesionální školení a poradenství v oblasti technologií XML. Podívejte se na náš nově spuštěný web http://DocBook.cz Podrobný přehled školení http://xmlguru.cz/skoleni/ ------------------------------------------------------------------
smime.p7s
Description: S/MIME Cryptographic Signature
