Changeset 345 for trunk/SRC/Documentation/xmldoc/all_plots_docbook.xsl
- Timestamp:
- 04/16/08 11:15:20 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/xmldoc/all_plots_docbook.xsl
r191 r345 1 <?xml version="1.0" encoding="iso-8859-1" ?> 1 <?xml version="1.0" encoding="iso-8859-1"?> 2 <xsl:stylesheet 3 version="1.0" 4 xmlns:dbk="http://docbook.org/ns/docbook" 5 xmlns:xl="http://www.w3.org/1999/xlink" 6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 2 7 <!-- 3 module : 8 module : 4 9 generation of a docbook file for display all plots of firtsteps.xml 5 10 … … 8 13 9 14 update : 15 fplod 2008-04-15T12:40:25Z aedon.locean-ipsl.upmc.fr (Darwin) 16 adaptation to docbook 5 in and out 10 17 fplod 2006-05-17T09:59:52Z aedon.lodyc.jussieu.fr (Darwin) 11 18 fplod 2006-09-21T14:58:05Z aedon.locean-ipsl.upmc.fr (Darwin) … … 13 20 --> 14 21 15 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">16 22 17 <xsl:output 18 method="xml" 19 indent="yes" 20 encoding="iso-8859-1" 21 omit-xml-declaration="no" 22 doctype-public="-//OASIS//DTD DocBook XML V4.2//EN" 23 doctype-system="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"/> 23 <xsl:output 24 method="xml" 25 indent="yes" 26 omit-xml-declaration="no"/> 24 27 25 <xsl:template match="article"> 26 <article id="all_plots" lang="en"> 28 <xsl:template match="/"> 29 <xsl:element name="article"> 30 <xsl:attribute name="version">5.0</xsl:attribute> 31 <xsl:attribute name="xmlns">http://docbook.org/ns/docbook</xsl:attribute> 32 <xsl:attribute name="xml:lang">en</xsl:attribute> 33 <xsl:attribute name="xml:id">all_plots</xsl:attribute> 34 27 35 <title>All plots of SAXO demo</title> 28 < articleinfo>36 <info> 29 37 <authorgroup> 30 <author>< firstname>Sébastien</firstname> <surname>Masson</surname> <email>smasson_at_lodyc.jussieu.fr</email></author>31 <author>< firstname>Françoise</firstname> <surname>Pinsard</surname> <email>Francoise.Pinsard_at_lodyc.jussieu.fr</email></author>38 <author><personname><firstname>Sébastien</firstname> <surname>Masson</surname></personname> <email>smasson_at_lodyc.jussieu.fr</email></author> 39 <author><personname><firstname>Françoise</firstname> <surname>Pinsard</surname></personname> <email>Francoise.Pinsard_at_lodyc.jussieu.fr</email></author> 32 40 </authorgroup> 33 41 <keywordset> … … 35 43 <keyword>SAXO</keyword> 36 44 </keywordset> 37 </ articleinfo>38 <sect1 id="intro">45 </info> 46 <sect1 xml:id="intro"> 39 47 <title>Introduction</title> 40 48 <para> 41 This page gathers all plots used in < ulink url="firststeps.html">firststeps</ulink> and display them in one unique page to facilitate the search of plots examples.49 This page gathers all plots used in <link xl:href="firststeps.html">firststeps</link> and display them in one unique page to facilitate the search of plots examples. 42 50 </para> 43 51 </sect1> 44 <sect1 id="allplots">52 <sect1 xml:id="allplots"> 45 53 <title>All plots</title> 54 <xsl:element name="itemizedlist"> 46 55 47 <!-- for all ulink where urlis something .png48 plot it with the title of the closest ancestor which have an id attibutes56 <!-- for all links where xl:href is something .png 57 plot it with the title of the closest ancestor which have an xml:id attribute 49 58 --> 50 <xsl:for-each select="self::node()/descendant-or-self::node()/child::ulink[contains(@url,'png')]"> 51 <xsl:sort order="ascending" data-type="text" select="@url"/> 59 <!-- version dbk 4 pour mémoire 60 <xsl:for-each select="self::node()/descendant-or-self::node()/child::link[contains(@xl:href,'png')]"> 61 --> 62 <xsl:for-each select="//dbk:link[contains(@xl:href,'png')]"> 63 <xsl:sort order="ascending" data-type="text" select="@xl:href"/> 52 64 <xsl:call-template name="plot"> 53 <xsl:with-param name=" url" select="@url"/>54 <xsl:with-param name="id" select="(ancestor-or-self::node()/@ id)[last()]"/>55 <xsl:with-param name="title" select="(ancestor-or-self::node()/ title)[last()]"/>65 <xsl:with-param name="href" select="@xl:href"/> 66 <xsl:with-param name="id" select="(ancestor-or-self::node()/@xml:id)[last()]"/> 67 <xsl:with-param name="title" select="(ancestor-or-self::node()/dbk:title)[last()]"/> 56 68 </xsl:call-template> 57 69 </xsl:for-each> 70 </xsl:element> 58 71 </sect1> 59 </ article>60 </xsl:template> 72 </xsl:element> 73 </xsl:template> 61 74 62 <xsl:template name="plot"> 63 <xsl:param name="url"/> 64 <xsl:param name="id"/> 65 <xsl:param name="title"/> 66 <xsl:element name="para"> 67 <xsl:element name="mediaobject"> 75 <xsl:template name="plot"> 76 <xsl:param name="href"/> 77 <xsl:param name="id"/> 78 <xsl:param name="title"/> 79 <xsl:element name="listitem"> 80 <xsl:element name="para"> 81 [plot <xsl:value-of select="$href"/>] 82 </xsl:element> 83 <xsl:element name="para"> 84 <xsl:element name="mediaobject"> 68 85 <xsl:element name="imageobject"> 69 86 <xsl:element name="imagedata"> 70 <xsl:attribute name="fileref"><xsl:value-of select="$ url"/></xsl:attribute>87 <xsl:attribute name="fileref"><xsl:value-of select="$href"/></xsl:attribute> 71 88 <xsl:attribute name="format">PNG</xsl:attribute> 72 89 <xsl:attribute name="valign">top</xsl:attribute> 73 90 </xsl:element> 74 91 </xsl:element> 92 <xsl:element name="textobject"> 93 <xsl:element name="phrase"> 94 [plot <xsl:value-of select="$href"/>] 95 </xsl:element> 96 </xsl:element> 97 <xsl:element name="caption"> 98 <xsl:element name="para"> 99 cf. 100 <xsl:element name="link"> 101 <xsl:attribute name="xl:href">firststeps.html#<xsl:value-of select="$id"/></xsl:attribute> 102 <xsl:value-of select="$title"/> 103 </xsl:element> 104 <xsl:text> in </xsl:text><xsl:value-of select="//dbk:title"/> 105 </xsl:element> 106 </xsl:element> 107 </xsl:element> 108 </xsl:element> 75 109 </xsl:element> 76 <xsl:element name="textobject"> 77 <xsl:element name="phrase"> 78 [plot <xsl:value-of select="$url"/>] 79 </xsl:element> 80 </xsl:element> 81 <xsl:element name="caption"> 82 <xsl:element name="para"> 83 cf. <xsl:element name="ulink"> 84 <!-- 85 <xsl:attribute name="url">firststeps.html#<xsl:value-of select="$id"/></xsl:attribute> 86 --> 87 <xsl:attribute name="url">firststeps.html#<xsl:value-of select="$id"/></xsl:attribute> 88 <xsl:value-of select="$title"/> 89 </xsl:element> 90 <xsl:text>in First steps with SAXO</xsl:text> <!--++ récupérer le titre de l'article --> 91 </xsl:element> 92 </xsl:element> 93 </xsl:element> 94 </xsl:template> 110 </xsl:template> 95 111 96 112 </xsl:stylesheet>
Note: See TracChangeset
for help on using the changeset viewer.