xproc / 3.0-steps

Repository for change requests to the standard step library and for official extension steps
10 stars 7 forks source link

Archive manifest processing #401

Closed xml-project closed 4 years ago

xml-project commented 4 years ago

The specs says (behind the second yellow box):

It is a dynamic error (err:XD0011) if the resource referenced by the href option does not exist, cannot be accessed or is not a file. These documents are stored in the archive “as is”; they must not be parsed and re-serialized.

I think taken together these two sentences might be missleading, saying

  1. that an error is raised and
  2. the missing document is ignored and the original doc (in the zip) is preserved.

Suggestion: Flip the two sentences around because "These" in the second sentence is related to found documents, not to missing ones.

Did I miss something?

xatapult commented 4 years ago

Agree. I would say: just do it.

xml-project commented 4 years ago

@xatapult But not now. Have to prepare for a meeting, you know ;-))

xml-project commented 4 years ago

Hhm, I think the problem is bigger than I thought. As I noted above, in the section on archive manifest we say that it is an error if the resource does not exists. But then in the next section (Handling of ZIP archives) we says, not a non existing resource is ignored for update, create (because create is like update), freshen (because freshen is like update). And for delete it does not matter. Could you please have a look at the specs and tell me that I am interpreting it right. Is this really the behaviour we intend? A least for "create" I would expect it to be an error if the resource is missing, but may be I am wrong or have the wrong use cases in mind.

xatapult commented 4 years ago

Hmm. IMHO:

Or we could decide not to throw errors on missing references in the manifest always. But then being sure your archive is correct (after creating, the most common case) is hardly verifiable. Hmmm.

I think this needs to be discussed in a call.

xml-project commented 4 years ago

Yap, some intuitions here.

xml-project commented 4 years ago

Addressed in pr #406

xml-project commented 4 years ago

Fixed with pr #406