xproc / 3.0-steps

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

p:http-request is underspecified with respect to document properties as headers #369

Closed ndw closed 4 years ago

ndw commented 4 years ago

The spec says:

If a single document appears on the source port, then document properties on that document may be added as additional headers. All of the document properties will be used as headers except “base-uri”, “serialization” and any property...

I think we should say that only document properties in no-namespace are added. Otherwise, what do you do with a document property named ex:foo. You can't use "ex:foo" as a name. Even if { and } are allowed in header names (which I doubt), you can't use the Q{} syntax because the URI is almost always going to contain a colon.

We could say that you use the local name, but then you will always have errors if there are different properties with the same local name.

ndw commented 4 years ago

I wonder, actually, if we should say that only headers in a particular namespace should be copied over. Today we have the situation that implementations are free to add additional properties. So it's difficult for users to predict what properties will exist.

(I just discovered this because I provide additional http properties as document properties, but that means if you copy them blindly across, you can wind up with weird http issues.)

ndw commented 4 years ago

Or maybe I should put those extra properties in a namespace?

Conal-Tuohy commented 4 years ago

I agree that not all document properties should be turned into headers. An XML namespace for HTTP headers seems on the face of it a good idea to me

ndw commented 4 years ago

General agreement at the editor's call on 18 March that we'll say that properties in [namespace to be determined] will be copied as headers using the local-name as the header.