Skip to content

RESTXQ: TODO for 1.0 Release

Christian Gruen edited this page Feb 25, 2015 · 2 revisions

RESTXQ TODO

Use Cases for Constructing/Returning/Rewritting URIs

  1. Location header in the response
  2. Content Body - e.g. html etc

If functions are to be defined which of these are request module vs rest module? Request module must be standalone!

Fix to Default Parameters to Parameter Annotations

The XQuery 3.0 spec does not allow Sequences inside Annotations, because the values are simple literals, i.e. untyped in the XDM model. So how do we allow a sequence to be passed as a default value, the answer is to allow N literals:

e.g. The following is valid:

%rest:query-param("answer", "{$answer}", 42, 43, 44)

e.g. The following is INVALID:

%rest:query-param("answer", "{$answer}", (42, 43, 44))

Unify names Serialisation Annotations and Serialisation Properties

Unify names and code used in the Serialisation Annotations and Serialisation Properties set in rest:response

Implement missing annotations in EXQuery code

  • %rest:header-param

  • %rest:cookie-param

  • %output:byte-order-mark

  • %output:cdata-section-elements

  • %output:doctype-public

  • %output:doctype-systemmark

  • %output:escape-uri-attributes

  • %output:include-content-type

  • %output:normalization-form

  • %output:standalone

  • %output:undeclare-prefixes

  • %output:use-character-maps

  • %output:version

Fix the Type System

Refactor and fix the Type System i.e. XDM package stuff. See TODO comments in the eXist-db implementation code There should be no concrete types in EXQuery XDM package, remove StringValue and BinaryValue from EXQuery.

Make all Constraints Optional

e.g. At the moment %rest:path is mandatory on Resource Functions, make this and %rest:method optional.

HTTP mechanics

Resource Function Precedence

Add to the spec. the precedence of Resource Function selection against a Request

Most Specific First

  1. Method, Path, Media-Type etc
  2. Method, Path
  3. Path, Media Type
  4. Path
  5. Method, Media Type
  6. Method
  7. Media Type

URI Path Precedence

Add to the spec. what makes a path more specific e.g. segment length etc See https://github.com/exquery/exquery/issues/1 (comment 2 from Christian)

Media Type Precedence

Add to the spec. what makes a media type more specific e.g. application/* vs application/xml

Serialization Annotations and XML (output:)

Separate Output Annotations Document or chapter? - reference the W3C serialization spec. heavily

Extra Features for 1.0

See https://github.com/exquery/exquery/wiki/Feature-Requests

Error Codes

Test Suite

Complete test suite needed.

  • Loads Resource Functions to Processor (expectation).
  • HTTP invokes Resource Functions
  • Check responses of HTTP calls.
  • Make sure to test all error codes and http responses.