summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'helpers')
-rw-r--r--helpers/calc_text_func.pl26
-rw-r--r--helpers/calc_text_func.xsl2
-rw-r--r--helpers/calc_text_func0.xsl28
3 files changed, 55 insertions, 1 deletions
diff --git a/helpers/calc_text_func.pl b/helpers/calc_text_func.pl
new file mode 100644
index 0000000000..4fb5b72578
--- /dev/null
+++ b/helpers/calc_text_func.pl
@@ -0,0 +1,26 @@
+
+use 5.010;
+
+$hlp='helpers/calc_text_func.xsl'; #extract section
+$hlp0='helpers/calc_text_func0.xsl'; #replace section
+
+$source= 'source/text/scalc/01/04060110.xhp';
+$tmp = $source . '.tmp';
+
+@todo = qw/ CHAR CLEAN CODE CONCATENATE DECIMAL DOLLAR EXACT FIND FIXED LEFT LEFTB LEN LENB LOWER MID MIDB PROPER REPLACE REPT RIGHT RIGHTB SEARCH SUBSTITUTE T TEXT TRIM UNICHAR UNICODE UPPER /;
+
+
+for $F ( @ARGV) {
+ $f=lc $F;
+ say $F
+
+ system qq( xsltproc --stringparam func $F $hlp $source > source/text/scalc/01/func_$f.xhp );
+
+ system qq( xsltproc --stringparam func $f $hlp0 $source > $tmp );
+ rename $tmp, $source;
+
+ $mk .= qq( helpcontent2/source/text/scalc/01/func_$f \\\n);
+}
+
+say qq(TODO. add to git and AllLangHelp_scalc.mk :
+$mk);
diff --git a/helpers/calc_text_func.xsl b/helpers/calc_text_func.xsl
index e2d379d9e7..c2a491c41a 100644
--- a/helpers/calc_text_func.xsl
+++ b/helpers/calc_text_func.xsl
@@ -5,7 +5,7 @@
<xsl:param name="func" select="BASE"/>
<xsl:template match="/">
- <xsl:for-each select="//section/h2[contains(text(), $func)]">
+ <xsl:for-each select="//section/h2[text() = $func ]">
<xsl:call-template name="section"/>
</xsl:for-each>
diff --git a/helpers/calc_text_func0.xsl b/helpers/calc_text_func0.xsl
new file mode 100644
index 0000000000..eebdd12ecc
--- /dev/null
+++ b/helpers/calc_text_func0.xsl
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
+
+<xsl:param name="func" select="base"/>
+
+<xsl:template match="@* | node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@* | node()"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="//section">
+
+ <xsl:choose>
+ <xsl:when test="current()[@id = $func]">
+ <section id="{./@id}">
+ <embed href="text/scalc/01/func_{@id}.xhp#func_{@id}"/>
+ </section>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+</xsl:template>
+
+</xsl:stylesheet> \ No newline at end of file