GeoServer XSLT transforms

A transform contains a style sheet that can be used to generate a new textual output format of user choosing for WFS
More information: http://geoserver.org/comm/
Contact Info: geoserver-users@sourceforge.net
Version: 1.0.0
BasePath:/geoserver/rest
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

Methods

[ Jump to Models ]

Table of Contents

Default

Default

Up
delete /services/wfs/transforms/{transform}
Delete transformation (deleteTranform)
Deletes a transformation.

Path parameters

transform (required)
Path Parameter — Name of the transformation.

Responses

200

OK

401

Unauthorized

Up
delete /services/wfs/transforms
(deleteTransform)
Invalid.

Responses

405

Method Not Allowed

Up
get /services/wfs/transforms/{transform}
Retrieve a transformation. (getTransform)
Retrieves a single transformation.

Path parameters

transform (required)
Path Parameter — Name of the transformation.

Return type

Transform

Example data

Content-Type: application/xml
"\n  test1\n  text/xml; subtype=gml/2.1.2\n  text/html\n  test1.xslt\n\n"

Example data

Content-Type: application/json
"{\n  \"transform\": {\n    \"name\": \"test1\",\n    \"sourceFormat\": \"text/xml; subtype=gml/2.1.2\",\n    \"outputFormat\": \"text/html\",\n    \"xslt\": \"test1.xslt\"\n  }\n}\n"

Example data

Content-Type: application/xslt+xml
"\n\n  \n    \n      \n      \n        

\n \n \n \n \n \n \n \n \n \n \n \n \n
AttributeValue
\n \n \n \n
\n
\n \n \n
\n
\n \n"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK Transform

Example data

Content-Type: application/xml

  test1
  text/xml; subtype=gml/2.1.2
  text/html
  test1.xslt

Example data

Content-Type: application/json
{
  "transform": {
    "name": "test1",
    "sourceFormat": "text/xml; subtype=gml/2.1.2",
    "outputFormat": "text/html",
    "xslt": "test1.xslt"
  }
}

Example data

Content-Type: application/xslt+xml


  
    
      
      
        

Attribute Value

Up
get /services/wfs/transforms
List available transformations. (getTransforms)
Displays a list of all the transforms information available on the server. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/styles.xml" for XML).

Return type

TransformList

Example data

Content-Type: application/xml
"\n  \n    test\n    \n  \n  \n    test1\n    \n  \n\n"

Example data

Content-Type: application/json
"{\n  \"transforms\": {\n    \"transform\": [\n      {\n        \"name\": \"test\",\n        \"href\": \"http://localhost:8080/geoserver/restng/services/wfs/transforms/test.json\"\n      },\n      {\n        \"name\": \"test1\",\n        \"href\": \"http://localhost:8080/geoserver/restng/services/wfs/transforms/test1.json\"\n      }\n    ]\n  }\n}\n"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK TransformList

Example data

Content-Type: application/xml

  
    test
    
  
  
    test1
    
  

Example data

Content-Type: application/json
{
  "transforms": {
    "transform": [
      {
        "name": "test",
        "href": "http://localhost:8080/geoserver/restng/services/wfs/transforms/test.json"
      },
      {
        "name": "test1",
        "href": "http://localhost:8080/geoserver/restng/services/wfs/transforms/test1.json"
      }
    ]
  }
}

Up
post /services/wfs/transforms/{transform}
(postTranform)
Invalid.

Responses

405

Method Not Allowed

Up
post /services/wfs/transforms
Add a new transform (postTransform)
Adds a new transform to the server. If the content type used is application/xml the server will assume a definition is being posted, and the XSLT will have to be uploaded separately using a PUT request with content type application/xslt+xml against the transformation resource. If the content type used is application/xslt+xml the server will assume the XSLT itself is being posted, and the name, sourceFormat, outputFormat, outputMimeType query parameters will be used to fill in the transform configuration instead.

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

transformBody Transform (required)
Body Parameter — Transform body to upload.

Query parameters

name (optional)
Query Parameter — Name of the transformation.
sourceFormat (optional)
Query Parameter — Source format of the transformation.
outputFormat (optional)
Query Parameter — Output format of the transformation.
outputMimeType (optional)
Query Parameter — Output mime type of the transformation.
fileExtension (optional)
Query Parameter — The extension of the file generated by the transformation.

Responses

201

Created

Up
put /services/wfs/transforms/{transform}
Modify a single transform (putTranform)
Modifies a single transform.

Path parameters

transform (required)
Path Parameter — Name of the transformation.

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

transformBody Transform (required)
Body Parameter — Transform body to upload.

Responses

200

OK

401

Unauthorized

Up
put /services/wfs/transforms
(putTransform)
Invalid. Use POST for adding a new transformation.

Responses

405

Method Not Allowed

Models

[ Jump to Methods ]

Table of Contents

  1. Transform - transform
  2. TransformList - transforms
  3. TransformListItem - transform

Transform - transform Up

name (optional)
String Name of the transformation
sourceFormat (optional)
String Source format accepted by the transformation
outputFormat (optional)
String Output format produced by the transformation
xslt (optional)
String Style sheet associated with the transformation

TransformList - transforms Up

TransformListItem - transform Up

name (optional)
String Name of the transformation
href (optional)
String URL to the transformation