"Fossies" - the Fresh Open Source Software Archive

Member "recoll-1.26.3/filters/opendoc-meta.xsl" (4 Sep 2019, 1886 Bytes) of package /linux/privat/recoll-1.26.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <?xml version="1.0"?>
    2 <xsl:stylesheet version="1.0"
    3   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    4   xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
    5   xmlns:xlink="http://www.w3.org/1999/xlink" 
    6   xmlns:dc="http://purl.org/dc/elements/1.1/" 
    7   xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
    8   xmlns:ooo="http://openoffice.org/2004/office"
    9   exclude-result-prefixes="office xlink meta ooo dc"
   10   >
   11 
   12 <xsl:output method="html" encoding="UTF-8"/>
   13 
   14 <xsl:template match="/office:document-meta">
   15   <xsl:apply-templates select="office:meta/dc:description"/>
   16   <xsl:apply-templates select="office:meta/dc:subject"/>
   17   <xsl:apply-templates select="office:meta/dc:title"/>
   18   <xsl:apply-templates select="office:meta/meta:keyword"/>
   19   <xsl:apply-templates select="office:meta/dc:creator"/>
   20 </xsl:template>
   21 
   22 <xsl:template match="dc:title">
   23 <title> <xsl:value-of select="."/> </title><xsl:text>
   24 </xsl:text>
   25 </xsl:template>
   26 
   27 <xsl:template match="dc:description">
   28   <meta>
   29   <xsl:attribute name="name">abstract</xsl:attribute>
   30   <xsl:attribute name="content">
   31      <xsl:value-of select="."/>
   32   </xsl:attribute>
   33   </meta><xsl:text>
   34 </xsl:text>
   35 </xsl:template>
   36 
   37 <xsl:template match="dc:subject">
   38   <meta>
   39   <xsl:attribute name="name">keywords</xsl:attribute>
   40   <xsl:attribute name="content">
   41      <xsl:value-of select="."/>
   42   </xsl:attribute>
   43   </meta><xsl:text>
   44 </xsl:text>
   45 </xsl:template>
   46 
   47 <xsl:template match="dc:creator">
   48   <meta>
   49   <xsl:attribute name="name">author</xsl:attribute>
   50   <xsl:attribute name="content">
   51      <xsl:value-of select="."/>
   52   </xsl:attribute>
   53   </meta><xsl:text>
   54 </xsl:text>
   55 </xsl:template>
   56 
   57 <xsl:template match="meta:keyword">
   58   <meta>
   59   <xsl:attribute name="name">keywords</xsl:attribute>
   60   <xsl:attribute name="content">
   61      <xsl:value-of select="."/>
   62   </xsl:attribute>
   63   </meta><xsl:text>
   64 </xsl:text>
   65 </xsl:template>
   66 
   67 </xsl:stylesheet>