CustomTarget_html.mk          |    2 ++
 help3xsl/online_transform.xsl |    4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 539abfa7c3bbc9f0b234402083c743890b965cf7
Author:     Olivier Hallot <olivier.hal...@libreoffice.org>
AuthorDate: Wed May 17 12:52:41 2023 -0300
Commit:     Olivier Hallot <olivier.hal...@libreoffice.org>
CommitDate: Thu Aug 10 12:21:02 2023 +0200

    tdf#155193 Do not deliver Help files with indexer=exclude
    
    + Add condition to skip indexer=exclude files.
    + delete empty files generated by exclude
    + delete empty directories generated by exclude
    
    Change-Id: Id992e6c83086d3cd3911b84890a50b309ad92c3b
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/151897
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org>

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index e73ea160e0..3bb5c0a19e 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -237,6 +237,8 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
            || exit \
        ; done <"$$RESPONSEFILE" \
        && rm "$$RESPONSEFILE" \
+       && find $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/$*) 
-type f -empty -delete \
+       && find $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/$*) 
-type d -empty -delete \
        && touch $@
        $(call gb_Trace_EndRange,$*/$(@F),XSL)
 
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 856dccbde0..d95425a593 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -118,8 +118,9 @@
 #############
 //-->
 
-<!-- Create the document skeleton -->
+<!-- Create the document skeleton, test if the indexer is to include in output 
 -->
 <xsl:template match="/">
+<xsl:if test="//topic[@indexer='include']">
     <xsl:variable name="htmlpage"><xsl:value-of 
select="concat(substring-before($filename,'.xhp'),'.html')"/></xsl:variable>
     <xsl:variable name="titleL10N">
         <xsl:call-template name="brand"><xsl:with-param 
name="string"><xsl:value-of 
select="$title"/></xsl:with-param></xsl:call-template>
@@ -278,6 +279,7 @@
     </footer>
     </body>
 </html>
+</xsl:if>
 </xsl:template>
 
 <!-- AHELP -->

Reply via email to