[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: copyright notes and translation updates



On Sun, 3 Apr 2016 13:34:01 +0200
Holger Wansing wrote:

> And: could someone look into the syntax for the copyright notes in
> English? Currently only one copyright name is displayed, no matter how
> many are in the refcard.dbk file.
> There is this logic in preproc.xsl:

>   <!-- for the original English only one copyright note -->
>   <xsl:template match="copyright[position() != 1]">
>     <xsl:if test="/article/@lang != 'en-GB'">
>       <xsl:copy>
> 	<xsl:apply-templates select="*|@*|text()"/>
>       </xsl:copy>
>     </xsl:if>
>   </xsl:template>

> Maybe someone could overwork this, to get always two copyright notes
> instead of only one? I'm lacking the skills for that, sorry.

do not be afraid;
this does not need much skill; junior high or high school is enough

position() just goes step by step, so
this is where position() = 1:
    <copyright>
      <year>2004</year>
      <year>2010</year>
      <holder>W. Martin Borgert</holder>
    </copyright>
and this is where position() = 2:
    <copyright>
      <year>2004</year>
      <year>2010</year>
      <holder>Your Name ("Language")</holder>
    </copyright>

assumed you want new copyright like
    <copyright>
      <year>2016</year>
      <holger>Holger Wansing</holger>
    </copyright>
 at the 2nd position,
you want a condition that exclude #2 in addition to #1
position() is a natural number so you can use a condition
 that matches 3 and greater

so it will look like:
copyright[position() &gt; 2]

-- 
victory
no need to CC me :-)
http://userscripts.org/scripts/show/102724 0.0.1.4
http://userscripts.org/scripts/show/163846 0.0.1
http://userscripts.org/scripts/show/163848 0.0.1


Reply to: