Skip to content

Is p:set-properties too strict? #65

@ndw

Description

@ndw

I implemented an extension that added an additional property to documents. (I wanted a quick way to write some tests, so I added a cx:type property with the values "xml", "text", "binary", "map", "array", "integer", "decimal"... etc, to indicate what kind value was stored in the document.)

But then I failed the tests for set-property because they assume after p:set-properties that only the set properties will be present.

I'm not sure that the p:set-properties step says exactly that, but it's pretty close:

If [the merge option] is false, the document’s properties are replaced by the new set.

The property keys are QNames, so it feels to me like implementations should be free to automatically add properties.

In the short term, I rewrote the ten or so tests in question to use standard mechanisms, like

  <p:identity>
    <p:with-input select=". instance of map(*)"/>
  </p:identity>
  <p:cast-content-type content-type="text/plain"/>
  <p:wrap-sequence wrapper="type"/>

And I'm not sure making tests easier to right really counts as a profound use case.

I do not, however, that the technique I resorted to doesn't provide any (unambiguous) way to determine if the document type is binary. AFAICT.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions