Advanced

Advanced topics

Services 1.0 (Draft)

A schema for the defining and mapping the services to URLs.

Warning!

Please note: This structure is not final.

Entities

Allowed HTTP method on resources.

<!ENTITY  % HTTP_METHOD "( GET | POST | PUT | DELETE )"              >

A URI Pattern as defined in the URI Template specifications:

<!ENTITY  % URI_PATTERN "CDATA"                                      >

A valid Cache-Control header as specified by HTTP/1.1 - 14.9 Cache-Control .

<!ENTITY  % CACHE_CONTROL "CDATA"                                    >

A string which contain dynamic tokens and is resolved dynamically.

{...} (curly brackets) indicate that the value is dynamically constructed

      - @ prefixes the name config property

      - $ prefixes the name an HTTP parameter

      - # prefixes the name an URL Pattern parameter or a variable

any other value is considered static and transmitted 'as is'.

<!ENTITY  % TOKENIX "CDATA"                                          >

Elements

<services>

Top level element, identifies a service configuration.

<resource> A resource

<!ELEMENT services                                     ( resource* ) >
<!ATTLIST services version CDATA                        #FIXED "1.0" >

<resource>

Defines a resource at the specified URI pattern where it can be accessed, modified, removed. 

<method> A method allowed on this resource.

<path> A URI Pattern to access the resource.

@cache-control How should this resource be cached.

<!ELEMENT resource                                       ( method+ ) >
<!ATTLIST resource path          %URI_PATTERN;              #REQUIRED
                   cache-control %CACHE_CONTROL;            #IMPLIED >

<method>

A method allowed for the enclosing resource. 

<generator> How the request for the resource will be handled.

@type The method for accessing the resource.

<!ELEMENT method                                       ( generator ) >
<!ATTLIST method type %HTTP_METHOD;                        #REQUIRED >

<generator>

Specifies a content generator to use for this resource.

<parameter> Parameters to transmit the generator when invoked; they are ordered.

@class The content generator class.

<!ELEMENT generator                                   ( parameter* ) >
<!ATTLIST generator class NMTOKEN                          #REQUIRED >

<parameter>

A parameter to pass to a Java servlet.

@name The name of the parameter that the servlet receives

@value How the value is constructed.

<!ELEMENT parameter                                            EMPTY >
<!ATTLIST parameter name  NMTOKEN                          #REQUIRED 
                    value %TOKENIX;                         #IMPLIED >

Created on , last edited on