summaryrefslogtreecommitdiff
path: root/readlicense_oo
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-04-28 16:16:30 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-04-28 16:16:30 +0000
commit2318ec0f32aed427b0379dd31f37205244998467 (patch)
tree11282f57324376b1b86df2112e883a7a97381c4a /readlicense_oo
parent18ae241ecb941287053a8b4522a6b5e81fda2f1c (diff)
INTEGRATION: CWS ooo20030412 (1.1.4); FILE ADDED
2003/04/11 14:41:12 mh 1.1.4.1: add: localized readme, #i11592#
Diffstat (limited to 'readlicense_oo')
-rwxr-xr-xreadlicense_oo/docs/readme.xsl196
1 files changed, 196 insertions, 0 deletions
diff --git a/readlicense_oo/docs/readme.xsl b/readlicense_oo/docs/readme.xsl
new file mode 100755
index 000000000000..c5b83031dbed
--- /dev/null
+++ b/readlicense_oo/docs/readme.xsl
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xt="http://www.jclark.com/xt"
+ extension-element-prefixes="xt">
+
+ <xsl:output method = "HTML" doctype-public = "-//W3C//DTD HTML 3.2//EN" />
+
+ <!-- inputvariable declaration -->
+ <xsl:param name="os1"/>
+ <xsl:param name="gui1"/>
+ <xsl:param name="cp1" />
+ <xsl:param name="com1"/>
+ <xsl:param name="lang1"/>
+ <xsl:param name="type"/>
+ <xsl:param name="file"/>
+ <xsl:strip-space elements="*"/>
+
+<xsl:template match="/Readme">
+ <!-- creates the HTML-output-->
+ <xsl:if test="$type='html'">
+ <xt:document method="html" href="{$file}">
+ <html>
+ <!-- HTML utf-8 encoding enable -->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ </head>
+ <body>
+ <xsl:apply-templates/>
+ </body>
+ </html>
+
+ </xt:document>
+ </xsl:if>
+ <!-- creates the Textoutput -->
+ <xsl:if test="$type='text'">
+ <!-- the outputfilename for Textfiles -->
+ <xt:document method="text" href="{$file}">
+ <xsl:apply-templates/>
+ </xt:document>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="Section">
+ <xsl:apply-templates/>
+</xsl:template>
+
+
+<xsl:template match="Paragraph">
+ <!-- looks if the given parameters meet the xmlattributes or all -->
+ <xsl:if test="@os=$os1 or @os='all'">
+ <xsl:if test="@cpuname=$cp1 or @cpuname='all'">
+ <xsl:if test="@gui=$gui1 or @gui='all'">
+ <xsl:if test="@com=$com1 or @com='all'">
+ <xsl:if test="$type='html'">
+ <xsl:element name="{@style}">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:if>
+ <xsl:if test="$type='text'">
+ <xsl:if test="@style='h1' or @style='h2' or @style='h3' or @style='H1' or @style='H2' or @style='H3'">
+ <xsl:text>&#xA;------------------------------------------------------------&#xA;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@style='p' or @style='P'">
+ <xsl:text>&#xA;</xsl:text>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:if test="@style='h1' or @style='h2' or @style='h3' or @style='hr' or @style='H1' or @style='H2' or @style='H3' or @style='HR'">
+ <xsl:text>------------------------------------------------------------&#xA;</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="List">
+ <!-- creates the listoutput, the html-tags will be ignored if textoutput has been choosen -->
+ <xsl:choose>
+ <xsl:when test="@Enum='false'">
+ <ul type="circle">
+ <xsl:apply-templates/>
+ </ul>
+ </xsl:when>
+ <xsl:when test="@Enum='true'">
+ <ol>
+ <xsl:apply-templates/>
+ </ol>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="List//Text">
+ <!-- create the list -->
+ <xsl:if test="$type='html'">
+ <xsl:if test="@xml:lang=$lang1">
+ <li><xsl:apply-templates/></li>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$type='text'">
+ <xsl:if test="@xml:lang=$lang1">
+ <xsl:text>- </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+ </xsl:if>
+ </xsl:if>
+</xsl:template>
+
+<!-- the textoutput of normal paragraph nodes -->
+<!-- these template will be used if an attribute xml:lang exists -->
+<xsl:template match="Section/Paragraph/Text[@xml:lang]">
+ <xsl:if test="@xml:lang=$lang1">
+ <!-- make the output with the given template -->
+ <xsl:call-template name="out"/>
+ </xsl:if>
+</xsl:template>
+
+<!-- these tmplate will be used if no attribute xml:lang exists -->
+<xsl:template match="Section/Paragraph/Text[not (@xml:lang)]">
+ <xsl:call-template name="out"/>
+</xsl:template>
+
+<!-- creates the outputtemplate out -->
+<xsl:template name="out">
+ <!-- creates output with an extra CR/LF -->
+ <xsl:if test="@Wrap='true'">
+ <xsl:if test="$type='html'">
+ <xsl:if test=" @style='b ' or @style='B ' or @style='i ' or @style='I ' or @style='u ' or @style='U '">
+ <xsl:element name="{@style}">
+ <xsl:call-template name="linked"/>
+ </xsl:element>
+ </xsl:if>
+ <xsl:if test="@style='none'">
+ <xsl:call-template name="linked"/>
+ </xsl:if>
+ <xsl:element name="br"/>
+ </xsl:if>
+ <xsl:if test="$type='text'">
+ <xsl:text>&#xA;</xsl:text>
+ <xsl:call-template name="linked"/>
+ </xsl:if>
+ </xsl:if>
+
+ <!-- here without the extra CR/LF-->
+ <xsl:if test="@Wrap='false'">
+ <xsl:if test="$type='html'">
+ <xsl:if test=" @style='b ' or @style='B ' or @style='i ' or @style='I ' or @style='u ' or @style='U '">
+ <xsl:element name="{@style}">
+ <xsl:call-template name="linked"/>
+ </xsl:element>
+ </xsl:if>
+ <xsl:if test="@style='none'">
+ <xsl:call-template name="linked"/>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$type='text'">
+ <xsl:call-template name="linked"/>
+ </xsl:if>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="linked">
+ <xsl:if test="$type='html'">
+ <!--this template creates a link if an url attribute true -->
+ <xsl:if test="@url='false'">
+ <xsl:apply-templates/>
+ </xsl:if>
+ <xsl:if test="@url='true'">
+ <xsl:if test="@path='none'">
+ <a><xsl:attribute name="href"> <xsl:apply-templates/></xsl:attribute><xsl:apply-templates/></a>
+ </xsl:if>
+ <xsl:if test="@path='file'">
+ <a><xsl:attribute name="href"><xsl:text>file://localhost/</xsl:text><xsl:apply-templates/></xsl:attribute><xsl:apply-templates/></a>
+ </xsl:if>
+ <xsl:if test="@path='url'">
+ <a><xsl:attribute name="href"><xsl:text>http://</xsl:text><xsl:apply-templates/></xsl:attribute><xsl:apply-templates/></a>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="@url='ahead'">
+ <xsl:apply-templates/>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$type='text'">
+ <xsl:if test="@url='false'">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@url='true' or @url='ahead'">
+ <xsl:apply-templates/>
+ </xsl:if>
+ </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>