transform uri fragment
/members/{member}/groups/{group}/uris/{uri}/fragments/{+fragment}/transform [POST]
| API Support | Available since | Last updated | Output |
|---|---|---|---|
| 6.0000 | 6.2000 | xml |
Description
Transform fragment's content using XSLT.
If preview=true or diffx=true, no edit is created and the result of the transformation is returned. Parameters labels, lastmodifed, note, note-title and note-labels are ignored then.
Parameters
| Name | Description | Required | Type | Default value |
|---|---|---|---|---|
| diffx | If 'true', edit is not created but result of transformation diff is in the output | no | boolean | false |
| labels | Comma-separated list of edit labels | no | string | [transformed *fragment/@labels] |
| lastmodified | The last modified date/time (ISO 8601) of the fragment (prevents edit clashes) | no | string | |
| note | content for edit notes (if exists creates a note) | no | string | |
| note-labels | Comma-separated list of labels for the note (if exists creates a note) | no | string | |
| note-title | title for edit note | no | string | Edit note |
| preview | If 'true', edit is not created but result of transformation is in the output | no | boolean | false |
| reload | If 'true', the transformation script cache is cleared | no | boolean | false |
| transformation | Name of the XSLT to use (without .xsl extension). Maps to /quickfix/[transformation].xsl in project template. | yes | string | |
| parameter.* | Any parameter used by the XSLT, with the parameter name after the dot. | no | string |
Permission
This service requires contributor or higher.
Response
The output has the following format:
<fragment-transform [preview="true"] [diff="true"]> <!-- Transformed fragment (no transcluded content) --> </fragment-transform>
Error Handling
| 0x120B | Error processing xrefs |
|---|---|
| 0x120C | Error creating fragment |
| 0x120D | Content validation error |
| 0x120E | lastmodified date is invalid |
| 0x120F | Someone has modified the fragment while you were editing |
| 0x122D | The fragment is invalid (no match) |
| 0x1225 | The fragment is invalid (wrong case) |