XSLT and XPath are two key technologies used within SahanaPy to allow easy importing and exporting of information in a wide variety of formats. Support for importing and exporting data is mostly managed via XSLT templates. == Sahana Data Models == The underlying data models in {{{models/}}} define the resulting structure that will be within . More technical detail is [http://trac.sahanapy.org/wiki/S3XRC available here]. == Sahana XSLT Information == Sahana XSLT/XPath capability is provided by [http://codespeak.net/lxml/ lxml]. Currently Sahana only supports XSLT/XPath 1.0. == Sahana XML Representation == Here is a simplified blank XML document that highlights the key elements providing in the native XML within SahanaPy. {{{ }}} * {{{}}} - identifies the type of resource e.g. {{{name="hms_hospital"}}} * {{{}}} - represents a data field from the model e.g. if a resource is hms_hospital, then the data fields provided will be defined in {{{models/hms.py}}} - look for the resource definition for hospital * {{{}}} - contains information about things such as location e.g. {{{field="location_id" resource="gis_location"}}} == Exporting Data from Sahana == Sahana export templates are stored in: {{{static/xslt/export}}} == Importing Data from Sahana == Sahana import templates are stored in: {{{static/xslt/import}}} == Background Info and Resources == * [http://www.w3.org/TR/2007/REC-xslt20-20070123/ XSLT V2 reference] on W3C * [http://www.w3.org/TR/2007/REC-xpath20-20070123/ XPath V2 reference] on W3C * [http://www.w3schools.com/xsl/default.asp XSLT Tutorial] on w3schools * [http://www.w3schools.com/xpath/default.asp XPath Tutorial] on w3schools * [http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog interactive xslt environment]