Changes

Jump to: navigation, search

Xsl

117 bytes removed, 01:11, 12 February 2013
m
cleanup
[[Category:Developers/General]]
 
==Definition==
 
[http://www.w3.org/Style/XSL/ XSL] is a family of transformation languages which allows us to describe how files encoded in the XML standard are to be formatted or transformed.
We don't really iterate through the file, it is recursive. We retrieve data with XPath.
==Using XSL with gramps Gramps XML==
Some people use perl or python for retrieving some data from GEDCOM.
We may use XSL for this on GRAMPS XML.
GRAMPS XML is [http://gramps-project.org/xml/1.2.0/ documented] and coherent, we may use it for :
You may use XSL for this on Gramps XML, see [[media:Xpaths.gz|XPaths]]. Gramps XML is [http://gramps-project.org/xml/1.4.0/ documented] and coherent, we may use it for : * a database resume (output : HTML, XML, PS, PDF or SVG).* filtering some data and transforming result ([[Imagemedia:Ancestors.xsl.gz||||Ancestors.xsl]] , [[Imagemedia:Birthday.xsl.gz||||Birthday.xsl]] ).* a bridge between two open programs (GRAMPS Gramps <-> [[tellico|Tellico]]).* a web form.
==Examples==
* If you select GRAMPS Gramps object on XSL, and use this code with HTML output :
<img>
<xsl:attribute name="src">
</img>
:
then you will be able to display media objects on a HTML file. You may use all HTML codes or .css file for having what you want. Sample on a {{bug|2472}} bug-report.
* With XML, you will be able to make SVG. To generate a basic ancestors geographical map area with gramps Gramps coordinates.
For [[France]] area (dirty and quick test) :
You will get a layer according to specified dimensions on XSLT stylesheet.
Ex: [http://romjerome.ifrance.com/carte.png carte.png] It uses a custom [http://en.wikipedia.org/wiki/Coordinate_system#Geographical_systems frame of reference] <rect x="{(($long+(-4))*16)*120}" y="{(1000-$lat*20)*40}" width="5px" height="5px"/> <text x="{(($long+(-4))*16)*116}" y="{(1000-$lat*20)*40}" font-size="13px"><xsl:value-of select="ptitle"/>for displaying what we wantall places in France, not always practical but fast and effective. [[File:Fr_coordonnées_positives.png|300px|thumb|center|Areas on East France]] ==See also==* [[Geography]]
Also, you should have a look to [[Geographic_ReportCategory:Developers/General]].

Navigation menu