2 | | = S3XML - XML/JSON Format = |
| 2 | = S3XML = |
| 3 | |
| 4 | S3XML is a generic RESTful data exchange interface for the S3 framework. |
| 5 | |
| 6 | It comes with a genuine XML data format, but also provides built-in data format conversion and transformation to support a variety of custom XML, JSON and CSV formats and schemas. |
| 7 | |
| 8 | == Minimum Requirements for Implementation == |
| 9 | |
| 10 | === Clients === |
| 11 | |
| 12 | Interfaces which want to exchange data with S3XML interfaces must implement the following: |
| 13 | |
| 14 | - an HTTP client which can perform GET and POST requests |
| 15 | - the native S3XML data format |
| 16 | |
| 17 | ''Note:'' |
| 18 | |
| 19 | - Where the target interface has built-in support for data format conversion/transformation (as in S3), it is sufficient if the client implements an S3XML-compatible data format (XML, JSON or CSV). |
| 20 | - S3 comes with a number of built-in transformation stylesheets for some standard data formats. Where other formats shall be used, clients can also provide their own XSLT transformation stylesheets. |
| 21 | |
| 22 | === Servers === |
| 23 | |
| 24 | Interfaces which want to provide native S3XML capabilities (e.g. for Synchronization) must implement the following: |
| 25 | |
| 26 | - an HTTP server interface accepting and performing GET, PUT and POST requests |
| 27 | - the RESTful API as described in this document |
| 28 | - the native S3XML data format |
| 29 | |
| 30 | Optionally they can provide: |
| 31 | |
| 32 | - JSON/CSV to S3XML conversion |
| 33 | - S3XML to JSON/CSV conversion |
| 34 | - XSLT-1.0 transformation |
| 35 | |
| 36 | == Conventions == |
| 37 | |
| 38 | === Name Space === |
| 39 | |
| 40 | Where a name space identifier for the native S3XML format is to be used, it shall be: |
| 41 | |
| 42 | - "http://eden.sahanafoundation.org/S3XML" |
| 43 | |
| 44 | In the current implementation of S3, no name space identifier shall be used. This is though subject to change in future versions. |
| 45 | |
| 46 | === Character Encoding === |
| 47 | |
| 48 | XML documents to be used for S3XML can specify their character encoding in the XML header. |
| 49 | |
| 50 | Where JSON or CSV formats are used, they are expected to be UTF-8 encoded. S3XML interfaces can support other encodings for JSON/CSV, but this is not a requirement. |
| 51 | |
| 52 | All exported data are always UTF-8 encoded. |
| 53 | |
| 54 | === URL format === |
| 55 | |
| 56 | Data format extensions in URLs must be all-lowercase. Where uppercase characters are used, they are converted into lowercase. |
| 57 | |
| 58 | == Interface == |
| 59 | |
| 60 | == XML Format == |
| 61 | |
| 62 | === Types of Sources === |
| 63 | |
| 64 | === Element Descriptions === |
| 65 | |
| 66 | == JSON Format == |
| 67 | |
| 68 | == CSV Format == |
| 69 | |
| 70 | == Examples == |