| 433 | === Endpoint custom extensions === |
| 434 | |
| 435 | The CLARIN-FCS protocol specification allows Endpoints to add custom data to their responses. This extension mechanism can for example be used to provide hints to an (XSLT/XQuery) application that works directly on CLARIN-FCS, e.g. to allow it to generate back and forward links to navigate in a result set. |
| 436 | |
| 437 | *WIP* |
| 438 | An Endpoint `MAY` add arbitrary XML fragments to a `<fcs:Resource>` element. Clients `SHOULD` ignore any custom extensions they do not understand. |
| 439 | |
| 440 | * Example: |
| 441 | {{{#!xml |
| 442 | <fcs:Resource xmlns:fcs="http://clarin.eu/fcs/1.0" pid="hdl:4711/0815"> |
| 443 | <fcs:DataView type="application/x-clarin-fcs-hits+xml"> |
| 444 | <hits:Result xmlns:hits="http://clarin.eu/fcs/1.0/hits"> |
| 445 | The quick brown <hits:Hit>fox</hits:Hit> jumps over the lazy <hits:Hit>dog</hits:Hit>. |
| 446 | </hits:Result> |
| 447 | </fcs:DataView> |
| 448 | |
| 449 | <!-- |
| 450 | NOTE: this is purly fictional and only serves to demonstrate how |
| 451 | to add custom extensions to the result representation |
| 452 | within CLARIN-FCS. |
| 453 | |
| 454 | A hypothetical Endpoint extension for navigation in a result set: |
| 455 | it basically provdes a set of hrefs, that a GUI can convert into |
| 456 | navigation buttions. |
| 457 | --> |
| 458 | <nav:navigation xmlns:nav="http://repos.example.org/navigation"> |
| 459 | <nav:curr href="http://repos.example.org/resultset/4711/4611" /> |
| 460 | <nav:prev href="http://repos.example.org/resultset/4711/4610" /> |
| 461 | <nav:next href="http://repos.example.org/resultset/4711/4612" /> |
| 462 | </nav:navigation> |
| 463 | </fcs:Resource> |
| 464 | }}} |
| 465 | |