gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: File-tpye plug-in architecture for Arch?


From: Tupshin Harper
Subject: Re: [Gnu-arch-users] Re: File-tpye plug-in architecture for Arch?
Date: Mon, 22 Dec 2003 17:16:31 -0800
User-agent: Mozilla Thunderbird 0.5a (20031216)

Andrew Suffield wrote:

On Mon, Dec 22, 2003 at 04:13:33PM -0800, Tupshin Harper wrote:
Charles Duffy wrote:

Consider the case where an app loading a merged document presumes that
each style element will have a distinct "name" value, but where each
branch added a different style element with the same name; a DTD cannot
validate that this did not occur, and so may produce a document which
validates against the DTD but still crashes the app which created the
document.


DTDs can't handle this level of specifity, but XSDs can.

No they can't. They're more detailed than DTDs; they are not a
description of the semantics of the file (schemas are just more syntax
constraints).
Yes they can (agreed about syntax vs. semantics, though)...a very specific example was raised, where two style elements get the same name. XSDs can disallow duplicate keys for any particular class of node. See the "True key representation" of the URL that I included in my previous e-mail: http://www-106.ibm.com/developerworks/xml/library/x-sbsch.html

particularly the part that says: "In Listing 3, the key definition in the complex type for the |elementOne| element declares that the |elementOneKey| attribute must be present for all |elementOne| elements, and that it must be unique across all |elementOneKey| attributes on |elementOne| elements:

You can go through the entire discussion and replace "DTD" with
"schema" and it's stlll all accurate. Unless you can guarantee that
validation against the schema means the file is acceptable to the
application, you can't even be sure it's safe. And the schema is no
help in doing something useful when merging.

(Random example: let the file contain some data and a gpg signature of
that data. You can't describe that with a schema.)
No, and that is clearly the role of the application to tell you whether the gpg signature is valid. It is obviously a bug in the app if it crashes (or even behaves in a stupid way) when a gpg signature doesn't match the data being signed.

-Tupshin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]