Changes between Version 3 and Version 4 of S3/S3XML/Transformation
- Timestamp:
- 10/27/10 09:37:43 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3XML/Transformation
v3 v4 9 9 [[Image(s3xml.png)]] 10 10 11 The XSLT stylesheets to use for this transformation can be either :11 The XSLT stylesheets to use for this transformation can be either (fallback cascade in this order): 12 12 13 - integrated in Eden (folder static/xslt) 14 - in a static file elsewhere on the server 15 - anywhere on the web 16 - attached to the request (at import) 13 - a static file on the server or a web URL 14 - a file attached to the request (at import) 15 - an integrated stylesheet of Eden (folder static/xslt) 16 17 Note that formats *.xml and *.json will not be attempted to transform. 17 18 18 19 == Integrated Stylesheets == 19 20 20 These will automatically used if no other stylesheet is specified . The integrated stylesheets reside in:21 These will automatically used if no other stylesheet is specified (fallback). The integrated stylesheets reside in: 21 22 22 23 - static/xslt/export for export transformation (S3XML into other format) … … 27 28 - pfif.xsl transforms from/to *.pfif from *.xml 28 29 29 Formats *.xml and *.json will not be transformed.30 31 30 == XSLT Stylesheets on the Server == 32 31 33 - ''coming soon...'' 32 You can use the URL variable ?transform= to specify a transformation stylesheet at a file location on the server, e.g.: 33 34 {{{ 35 http://127.0.0.1:8000/vita/pr/person.pfif?transform=/home/me/stylesheets/export.pfif 36 }}} 37 38 ...to use the stylesheet {{{/home/me/stylesheets/export.pfif}}} for this export. 39 40 Note that you must not specify "xml" or "json" as data format of the resource, because that will suppress any transformation attempt. Also note that this currently assumes that the data format is an XML format and not JSON (subject to change in the near future). 34 41 35 42 == XSLT Stylesheets on the Web == 36 43 37 - ''coming soon...'' 44 You can use the URL variable ?transform= to specify a transformation stylesheet at a web URL to be used at import, e.g.: 45 46 {{{ 47 http://127.0.0.1:8000/vita/pr/person.pfif?transform=http://vita.sahanafoundation.org/eden/static/xslt/export/pfif.xsl 48 }}} 49 50 ...to use the stylesheet {{{http://vita.sahanafoundation.org/eden/static/xslt/export/pfif.xsl}}} for this export. 51 52 Note that you must not specify "xml" or "json" as data format of the resource, because that will suppress any transformation attempt. Also note that this currently assumes that the data format is an XML format and not JSON (subject to change in the near future). 38 53 39 54 == Attached XSLT Stylesheets == 40 55 41 - ''coming soon...'' 56 For data import, an XSLT stylesheet to transform foreign XML into S3XML can be attached to the request. The filename of the attached stylesheet is expected to be <resourcename>.xsl, where <resourcename> is the name of the target resource (without application prefix, e.g. "person" or "hospital"). 42 57 43 58 ----