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
Version: 1.0.0
BasePath:/geoserver/rest
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html
Access
[ Jump to Models ]
Table of Contents
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
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 Attribute | \n Value | \n
\n \n \n \n \n \n | \n \n \n | \n
\n \n
\n \n \n \n \n\n \n"
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
application/xml
application/xslt+xml
application/json
text/html
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
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
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 request header;
the media type will be conveyed by the response header.
application/xml
application/json
text/html
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 request header:
application/xml
application/xslt+xml
application/json
text/html
Request body
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 request header:
application/xml
application/json
application/xslt+xml
Request body
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
[ Jump to Methods ]
Table of Contents
Transform
- transform
TransformList
- transforms
TransformListItem
- transform
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
name (optional)
String Name of the transformation
href (optional)
String URL to the transformation