Warning, /education/marble/tools/gen-sat-catalog/to-legacy-msc.xsl is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="utf-8" ?>
0002 <!--
0003     vim: et tabstop=4 shiftwidth=4
0004 
0005     SPDX-License-Identifier: LGPL-2.1-or-later
0006 
0007     This XSL stylesheet transforms the XML version of a Marble Satellite
0008     Catalog to the deprecated plain text comma separated format. It is
0009     used on marble servers to provide a legacy version of the satellite
0010     catalog for outdated versions of Marble's satellites plugin.
0011 
0012     In order to transform an XML catalog, use your favorite xslt processor.
0013     With 'xsltproc' the command would look as follows:
0014 
0015         xsltproc to-legacy-msc.xsl PlanetarySatellites.xml \
0016             > PlanetarySatellites.msc
0017 
0018     SPDX-FileCopyrightText: 2013 Rene Kuettner <rene@bitkanal.net>
0019 -->
0020 <xsl:stylesheet
0021     version="1.0"
0022     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
0023     xmlns:msc="http://marble.kde.org/satellitecatalog">
0024 
0025     <xsl:output method="text"
0026                 media-type="text/plain"
0027                 encoding="utf-8" 
0028                 omit-xml-declaration="yes"
0029                 indent="no" />
0030     <xsl:strip-space elements="*" />
0031 
0032     <xsl:template match="msc:satellite">
0033         <xsl:value-of select="msc:name" />
0034         <xsl:text>, </xsl:text>
0035         <xsl:value-of select="msc:category" />
0036         <xsl:text>, </xsl:text>
0037         <xsl:value-of select="msc:relatedBody" />
0038         <xsl:text>, </xsl:text>
0039         <xsl:if test="msc:mission/msc:start">
0040             <xsl:value-of select="msc:mission/msc:start" />
0041         </xsl:if>
0042         <xsl:text>, </xsl:text>
0043         <t><xsl:if test="msc:mission/msc:end">
0044             <xsl:value-of select="msc:mission/msc:end" />
0045         </xsl:if>
0046         <xsl:text>, -, -, </xsl:text>
0047         <xsl:value-of select="msc:stateVector/@mjd" />, </t>
0048         <xsl:value-of select="msc:stateVector/msc:position/@x" />
0049         <xsl:text>, </xsl:text>
0050         <xsl:value-of select="msc:stateVector/msc:position/@y" />
0051         <xsl:text>, </xsl:text>
0052         <xsl:value-of select="msc:stateVector/msc:position/@z" />
0053         <xsl:text>, </xsl:text>
0054         <xsl:value-of select="msc:stateVector/msc:velocity/@x" />
0055         <xsl:text>, </xsl:text>
0056         <xsl:value-of select="msc:stateVector/msc:velocity/@y" />
0057         <xsl:text>, </xsl:text>
0058         <xsl:value-of select="msc:stateVector/msc:velocity/@z" />
0059         <xsl:text>&#xA;</xsl:text>
0060     </xsl:template>
0061 
0062     <xsl:template match="msc:MarbleSatelliteCatalog">
0063         <xsl:text><![CDATA[# name, category, rel_body, m_start, ]]></xsl:text>
0064         <xsl:text><![CDATA[m_end, -, -, <mjd>, <state_vector>]]></xsl:text>
0065         <xsl:text>&#xA;</xsl:text>
0066         <xsl:apply-templates />
0067     </xsl:template>
0068 
0069 </xsl:stylesheet>