【记录】docbook的docbook-xsl-ns-1.78.1中的webhelp:优化使得共用之前的chunk等公共的xsl配置

【背景】

折腾:

【记录】使用docbook的docbook-xsl-ns-1.78.1替换旧的ant改用make去编译webhelp

期间,

优化完了:

【记录】docbook的docbook-xsl-ns-1.78.1中的webhelp:优化使得共享webhelp的(css和js等)模板文件

就该去继续优化:

使得此处的webhelp,能够共用之前关于chunk方面的xsl公共配置了。

即,自己定制对应的webhelp.xsl,且集成之前chunk方面的配置。

【折腾过程】

1.继续共用xsl配置之前,先去继续搞懂,上面的:

【记录】docbook的docbook-xsl-ns-1.78.1中的webhelp:优化使得共享webhelp的(css和js等)模板文件

期间所遇到的一个问题:

为何命令行传入:

–stringparam webhelp.autolabel 1

给:

xsltproc

但是却没起效果。

2.去看看xsltproc是否有哪些参数,可以显示内部执行过程的详细信息,以便调试:

Administrator@PC-20130611GART /cygdrive/e/Dev_Root/docbook/dev/books/docbook_dev_note/src
$ which xsltproc
/usr/bin/xsltproc

Administrator@PC-20130611GART /cygdrive/e/Dev_Root/docbook/dev/books/docbook_dev_note/src
$ xsltproc --help
Unknown option --help
Usage: xsltproc [options] stylesheet file [file ...]
   Options:
        --version or -V: show the version of libxml and libxslt used
        --verbose or -v: show logs of what's happening
        --output file or -o file: save to a given file
        --timing: display the time used
        --repeat: run the transformation 20 times
        --debug: dump the tree of the result instead
        --dumpextensions: dump the registered extension elements and functions to stdout
        --novalid skip the DTD loading phase
        --nodtdattr do not default attributes from the DTD
        --noout: do not dump the result
        --maxdepth val : increase the maximum depth (default 3000)
        --maxvars val : increase the maximum variables (default 15000)
        --maxparserdepth val : increase the maximum parser depth
        --html: the input document is(are) an HTML file(s)
        --encoding: the input document character encoding
        --param name value : pass a (parameter,value) pair
               value is an UTF8 XPath expression.
               string values must be quoted like "'string'"
 or            use stringparam to avoid it
        --stringparam name value : pass a (parameter, UTF8 string value) pair
        --path 'paths': provide a set of paths for resources
        --nonet : refuse to fetch DTDs or entities over network
        --nowrite : refuse to write to any file or resource
        --nomkdir : refuse to create directories
        --writesubtree path : allow file write only with the path subtree
        --catalogs : use SGML catalogs from $SGML_CATALOG_FILES
                     otherwise XML Catalogs starting from
                 file:///etc/xml/catalog are activated by default
        --xinclude : do XInclude processing on document input
        --xincludestyle : do XInclude processing on stylesheets
        --load-trace : print trace of all external entites loaded
        --profile or --norman : dump profiling informations

Project libxslt home page: http://xmlsoft.org/XSLT/
To report bugs and get help: http://xmlsoft.org/XSLT/bugs.html

Administrator@PC-20130611GART /cygdrive/e/Dev_Root/docbook/dev/books/docbook_dev_note/src
$

有对应的:

–verbose

可以用。

所以就去把makefile中改为:

webhelp_chunk:
	xsltproc \
        --verbose \
        --xinclude --output xincluded-profiled.xml  \
          --stringparam  profile.arch ${PROFILE.ARCH} \
          --stringparam  profile.audience ${PROFILE.AUDIENCE} \
          --stringparam  profile.condition ${PROFILE.CONDITION} \
          --stringparam  profile.conformance ${PROFILE.CONFORMANCE} \
          --stringparam  profile.lang ${PROFILE.LANG} \
          --stringparam  profile.os ${PROFILE.OS} \
          --stringparam  profile.revision ${PROFILE.REVISION} \
          --stringparam  profile.revisionflag ${PROFILE.REVISIONFLAG} \
          --stringparam  profile.role ${PROFILE.ROLE} \
          --stringparam  profile.security ${PROFILE.SECURITY} \
          --stringparam  profile.status ${PROFILE.STATUS} \
          --stringparam  profile.userlevel ${PROFILE.USERLEVEL} \
          --stringparam  profile.vendor ${PROFILE.VENDOR} \
          --stringparam  profile.wordsize ${PROFILE.WORDSIZE} \
          --stringparam  profile.attribute ${PROFILE.ATTRIBUTE} \
          --stringparam  profile.value ${PROFILE.VALUE} \
          $(TOOLS_XSL_NS_PROFILING)/profile.xsl  \
          $(MAIN_SRC_FILE)
	xsltproc --verbose ${WEBHELP_OTHER_XSLTPROC_ARGS} $(TOOLS_XSL_NS_WEBHELP)/xsl/webhelp.xsl xincluded-profiled.xml 

看看效果:

但是执行输出的内容太多,无法看清。

3.再去改为:

webhelp_chunk:
	xsltproc \
        --verbose \
        --xinclude --output xincluded-profiled.xml  \
          --stringparam  profile.arch ${PROFILE.ARCH} \
          --stringparam  profile.audience ${PROFILE.AUDIENCE} \
          --stringparam  profile.condition ${PROFILE.CONDITION} \
          --stringparam  profile.conformance ${PROFILE.CONFORMANCE} \
          --stringparam  profile.lang ${PROFILE.LANG} \
          --stringparam  profile.os ${PROFILE.OS} \
          --stringparam  profile.revision ${PROFILE.REVISION} \
          --stringparam  profile.revisionflag ${PROFILE.REVISIONFLAG} \
          --stringparam  profile.role ${PROFILE.ROLE} \
          --stringparam  profile.security ${PROFILE.SECURITY} \
          --stringparam  profile.status ${PROFILE.STATUS} \
          --stringparam  profile.userlevel ${PROFILE.USERLEVEL} \
          --stringparam  profile.vendor ${PROFILE.VENDOR} \
          --stringparam  profile.wordsize ${PROFILE.WORDSIZE} \
          --stringparam  profile.attribute ${PROFILE.ATTRIBUTE} \
          --stringparam  profile.value ${PROFILE.VALUE} \
          $(TOOLS_XSL_NS_PROFILING)/profile.xsl  \
          $(MAIN_SRC_FILE)
	xsltproc ${WEBHELP_OTHER_XSLTPROC_ARGS} $(TOOLS_XSL_NS_WEBHELP)/xsl/webhelp.xsl xincluded-profiled.xml 

再试试:

结果也是输出太多。没看调试。

4.再去改为:

webhelp_chunk:
	xsltproc \
        --xinclude --output xincluded-profiled.xml  \
          --stringparam  profile.arch ${PROFILE.ARCH} \
          --stringparam  profile.audience ${PROFILE.AUDIENCE} \
          --stringparam  profile.condition ${PROFILE.CONDITION} \
          --stringparam  profile.conformance ${PROFILE.CONFORMANCE} \
          --stringparam  profile.lang ${PROFILE.LANG} \
          --stringparam  profile.os ${PROFILE.OS} \
          --stringparam  profile.revision ${PROFILE.REVISION} \
          --stringparam  profile.revisionflag ${PROFILE.REVISIONFLAG} \
          --stringparam  profile.role ${PROFILE.ROLE} \
          --stringparam  profile.security ${PROFILE.SECURITY} \
          --stringparam  profile.status ${PROFILE.STATUS} \
          --stringparam  profile.userlevel ${PROFILE.USERLEVEL} \
          --stringparam  profile.vendor ${PROFILE.VENDOR} \
          --stringparam  profile.wordsize ${PROFILE.WORDSIZE} \
          --stringparam  profile.attribute ${PROFILE.ATTRIBUTE} \
          --stringparam  profile.value ${PROFILE.VALUE} \
          $(TOOLS_XSL_NS_PROFILING)/profile.xsl  \
          $(MAIN_SRC_FILE)
	xsltproc --verbose ${WEBHELP_OTHER_XSLTPROC_ARGS} $(TOOLS_XSL_NS_WEBHELP)/xsl/webhelp.xsl xincluded-profiled.xml 

再试试:

结果同上,输出内容太多。无法看清。

5.再去改为加上–debug看看:

webhelp_chunk:
	xsltproc \
        --xinclude --output xincluded-profiled.xml  \
          --stringparam  profile.arch ${PROFILE.ARCH} \
          --stringparam  profile.audience ${PROFILE.AUDIENCE} \
          --stringparam  profile.condition ${PROFILE.CONDITION} \
          --stringparam  profile.conformance ${PROFILE.CONFORMANCE} \
          --stringparam  profile.lang ${PROFILE.LANG} \
          --stringparam  profile.os ${PROFILE.OS} \
          --stringparam  profile.revision ${PROFILE.REVISION} \
          --stringparam  profile.revisionflag ${PROFILE.REVISIONFLAG} \
          --stringparam  profile.role ${PROFILE.ROLE} \
          --stringparam  profile.security ${PROFILE.SECURITY} \
          --stringparam  profile.status ${PROFILE.STATUS} \
          --stringparam  profile.userlevel ${PROFILE.USERLEVEL} \
          --stringparam  profile.vendor ${PROFILE.VENDOR} \
          --stringparam  profile.wordsize ${PROFILE.WORDSIZE} \
          --stringparam  profile.attribute ${PROFILE.ATTRIBUTE} \
          --stringparam  profile.value ${PROFILE.VALUE} \
          $(TOOLS_XSL_NS_PROFILING)/profile.xsl  \
          $(MAIN_SRC_FILE)
	xsltproc --verbose ${WEBHELP_OTHER_XSLTPROC_ARGS} $(TOOLS_XSL_NS_WEBHELP)/xsl/webhelp.xsl xincluded-profiled.xml 

结果是:

xsltproc --debug --stringparam webhelp.base.dir ../output/webhelp  --stringparam webhelp.autolabel 1  --stringparam webhelp.indexer.language zh --stringparam webhelp.common.dir file:///E:/Dev_Root/docbook/tools/docbook-xsl-ns-1.78.1/webhelp/template/common/ E:/Dev_Root/docbook/tools/docbook-xsl-ns-1.78.1/webhelp/xsl/webhelp.xsl xincluded-profiled.xml
language: zh
Writing ../output/webhelp/background_docbook_come.html for sect2(background_docbook_come)
Writing ../output/webhelp/screenshot_docbook_one_in_multi_out.html for sect3(screenshot_docbook_one_in_multi_out)
Writing ../output/webhelp/what_is_the_docbook.html for sect2(what_is_the_docbook)
Writing ../output/webhelp/what_is_docbook.html for sect1(what_is_docbook)
Writing ../output/webhelp/why_use_docbook.html for sect1(why_use_docbook)
Writing ../output/webhelp/preface.html for preface(preface)
Writing ../output/webhelp/our_target.html for sect2(our_target)
Writing ../output/webhelp/format_convert_knowledge.html for sect2(format_convert_knowledge)
Writing ../output/webhelp/should_know_before_docbook.html for sect1(should_know_before_docbook)
Writing ../output/webhelp/ch01s02s01.html for sect2
Writing ../output/webhelp/download_xsltproc_win.html for sect2(download_xsltproc_win)
Writing ../output/webhelp/download_xsl_ns.html for sect2(download_xsl_ns)
Writing ../output/webhelp/download_fop.html for sect3(download_fop)
Writing ../output/webhelp/config_fop_home.html for sect3(config_fop_home)
Writing ../output/webhelp/add_fop_xconf.html for sect3(add_fop_xconf)
Writing ../output/webhelp/download_fop_add_conf.html for sect2(download_fop_add_conf)
Writing ../output/webhelp/prepare_docbook_src_xml.html for sect2(prepare_docbook_src_xml)
Writing ../output/webhelp/prepare_xml_config.html for sect3(prepare_xml_config)
Writing ../output/webhelp/convert_xml_to_html.html for sect3(convert_xml_to_html)
Writing ../output/webhelp/from_xml_generate_html.html for sect2(from_xml_generate_html)
Writing ../output/webhelp/prepare_pdf_config.html for sect3(prepare_pdf_config)
Writing ../output/webhelp/convert_xml_to_fo.html for sect3(convert_xml_to_fo)
Writing ../output/webhelp/convert_fo_to_pdf.html for sect3(convert_fo_to_pdf)
Writing ../output/webhelp/from_xml_generate_pdf.html for sect2(from_xml_generate_pdf)
Writing ../output/webhelp/pure_win_docbook_dev_env.html for sect1(pure_win_docbook_dev_env)
Writing ../output/webhelp/install_cygwin.html for sect2(install_cygwin)
Writing ../output/webhelp/download_fop_for_cygwin.html for sect2(download_fop_for_cygwin)
Writing ../output/webhelp/cygwin_docbook_dev_env.html for sect1(cygwin_docbook_dev_env)
Writing ../output/webhelp/ch01_build_env.html for chapter(ch01_build_env)
Writing ../output/webhelp/docbook4_vs_docbook5.html for sect1(docbook4_vs_docbook5)
Writing ../output/webhelp/entity_definition.html for sect1(entity_definition)
Writing ../output/webhelp/qanda_usage.html for sect1(qanda_usage)
Writing ../output/webhelp/fop_font_config.html for sect2(fop_font_config)
Writing ../output/webhelp/fop_notes.html for sect1(fop_notes)
Writing ../output/webhelp/docbook_some_concept.html for sect1(docbook_some_concept)
Writing ../output/webhelp/docbook_id_abbrev.html for sect3(docbook_id_abbrev)
Writing ../output/webhelp/docbook_best_practice.html for sect2(docbook_best_practice)
Writing ../output/webhelp/docbook_dev_notes.html for sect1(docbook_dev_notes)
Writing ../output/webhelp/example_docbook_debug_pdf.html for sect2(example_docbook_debug_pdf)
Writing ../output/webhelp/docbook_debug.html for sect1(docbook_debug)
Writing ../output/webhelp/docbook_focus_content.html for sect2(docbook_focus_content)
Writing ../output/webhelp/docbook_vs_building.html for sect2(docbook_vs_building)
Writing ../output/webhelp/docbook_summary.html for sect1(docbook_summary)
Writing ../output/webhelp/dobook_evolution_process.html for sect1(dobook_evolution_process)
Writing ../output/webhelp/ch02_notes.html for chapter(ch02_notes)
Writing ../output/webhelp/ch03_faq.html for chapter(ch03_faq)
Writing ../output/webhelp/intro_explain_docbook_materials.html for sect1(intro_explain_docbook_materials)
Writing ../output/webhelp/docbook_refer_materials.html for sect1(docbook_refer_materials)
Writing ../output/webhelp/ch04_materials.html for chapter(ch04_materials)
Writing ../output/webhelp/unknown_code_syntax_highlight.html for sect1(unknown_code_syntax_highlight)
Writing ../output/webhelp/unknown_zhcn_hypernate.html for sect1(unknown_zhcn_hypernate)
Writing ../output/webhelp/unknown_callout_co_re_number.html for sect1(unknown_callout_co_re_number)
Writing ../output/webhelp/ch05_issues.html for chapter(ch05_issues)
Writing ../output/webhelp/example_chapter_section.html for sect1(example_chapter_section)
Writing ../output/webhelp/example_para.html for sect1(example_para)
Writing ../output/webhelp/example_figure.html for sect1(example_figure)
Writing ../output/webhelp/example_table.html for sect1(example_table)
Writing ../output/webhelp/example_callout.html for sect1(example_callout)
Writing ../output/webhelp/example_link_xref.html for sect1(example_link_xref)
Writing ../output/webhelp/example_equation.html for sect1(example_equation)
Writing ../output/webhelp/example_list.html for sect1(example_list)
Writing ../output/webhelp/example_simplelist_literallayout.html for sect1(example_simplelist_literallayout)
Writing ../output/webhelp/example_xinclude.html for sect1(example_xinclude)
Writing ../output/webhelp/example_filename.html for sect1(example_filename)
Writing ../output/webhelp/example_admonitions_note.html for sect2(example_admonitions_note)
Writing ../output/webhelp/example_admonitions_caution.html for sect2(example_admonitions_caution)
Writing ../output/webhelp/example_admonitions_warning.html for sect2(example_admonitions_warning)
Writing ../output/webhelp/example_admonitions_tip.html for sect2(example_admonitions_tip)
Writing ../output/webhelp/example_admonitions_important.html for sect2(example_admonitions_important)
Writing ../output/webhelp/example_admonitions.html for sect1(example_admonitions)
Writing ../output/webhelp/ch06_examples.html for chapter(ch06_examples)
Writing ../output/webhelp/docbook_released_basic.html for sect1(docbook_released_basic)
Writing ../output/webhelp/docbook_released_embedded.html for sect1(docbook_released_embedded)
Writing ../output/webhelp/docbook_released_upper.html for sect1(docbook_released_upper)
Writing ../output/webhelp/docbook_released_other.html for sect1(docbook_released_other)
Writing ../output/webhelp/appendix.html for appendix(appendix)
Writing ../output/webhelp/index.html for book
Writing ../output/webhelp/search/l10n.js
DOCUMENT
version=1.0
encoding=UTF-8
standalone=true

Administrator@PC-20130611GART /cygdrive/e/Dev_Root/docbook/dev/books/docbook_dev_note/src
$

即:

–debug,只是最后多输出了几行:

但是不知道结果如何。

再去调用webhelp_index看看结果:

最后生成的webhelp的页面,目录还是没有索引编号。

6.另外,也注意到有个:

–param name value

有空,可以去试试:

–param webhelp.autolabel 1

即改为:

WEBHELP_OTHER_XSLTPROC_ARGS_COMMON = \
    --stringparam webhelp.base.dir $(OUTPUT_DIR_WEBHELP) \
    --param webhelp.autolabel 1 \
    --stringparam webhelp.indexer.language $(WEBHELP_INDEX_LANGUAGE)

看看是否有效。

结果还是不行。

7.另外,看起来感觉是:

或许是:

webhelp_chunk

期间,xsltproc中的:

–stringparam webhelp.autolabel 1

已经生效。

但是对于:

webhelp_index

调用java处理,然后其中或许也是需要配置类似的参数才可以的。

所以,可以去看看之前的ant build中间,是否有这样的参数传入index阶段中去。

E:\Dev_Root\docbook\dev\ant\webhelp\build.xml

然后看到之前的index阶段,也只是:

       <java classname="com.nexwave.nquindexer.IndexerMain" fork="true"> 
         <sysproperty key="htmlDir" value="${output-dir}/content"/>
         <sysproperty key="indexerLanguage" value="${webhelp.indexer.language}"/>
         <sysproperty key="htmlExtension" value="${html.extension}"/>
         <sysproperty key="doStem" value="${enable.stemming}"/>
         <sysproperty key="tocFile" value="${toc.file}"/>

没有对应的设置webhelp的autolabel之类的参数。

8.算了,不在这方面去验证此参数了。

还是想办法,集成webhelp.xsl去吧。

经过大量的优化调整,目前是:

(1)E:\Dev_Root\docbook\dev\config\docbook.mk

代码如下:

# [Fcuntion]
# Generate output from DocBook xml sources
#
# [Author]
# Crifan Li
#
# [Version]
# v2.0, 2013-09-28
#
# [Contact]
# http://www.crifan.com/about/me/
#
# [Note]
# 1. this is the main makefile for docbook
# 2. set proper enviroment variables before use this makefile
# ==office==
# (1) CLASSPATH = .;%JAVA_HOME%\lib\rt.jar;
# not need add D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\docbook\tools\fop\lib\xmlgraphics-commons-1.4.jar; 
# into CLASSPATH after fixe fop cygpath bug:
# http://www.crifan.com/fop_java_lang_noclassdeffounderror_xmlgraphics_cygpath_bug_path_truncated/
# (2) FOP_HOME = /home/CLi/develop/docbook/tools/fop
# (3) JAVA_HOME = C:\Program Files (x86)\Java\jre6
# (4) PATH contain: D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\docbook\tools\fop
#
# ==home==
# (1) CLASSPATH = .;%JAVA_HOME%\lib;
# (2) FOP_HOME = /cygdrive/e/Dev_Root/docbook/tools/fop-1.0
#  for MSYS/MingW, set to E:\Dev_Root\docbook\tools\fop-1.0
# later find out, for cygwin, set to E:\Dev_Root\docbook\tools\fop-1.0 also can work
# (3) JAVA_HOME = D:\Program Files\Java\jre7
# (4) PATH contain: 
#  hhc的路径:  E:\dev_install_root\HTML Help Workshop;
#  7z的路径:   D:\Program Files\7-Zip;
#  fop的路径:  E:\Dev_Root\docbook\tools\fop-1.0;
#
# 3. this makefile should be include in Makefile of src directory
# ==office==
# pwd = /home/CLi/develop/docbook/books/xxx/src
# [home]
# pwd = /cygdrive/e/Dev_Root/docbook/dev/books/xxx/src
# 
# [History]
# [v2.0, 2013-09-27]
# 1. add project name for process each target

################################################################################
# Some Fixed Varaibles
################################################################################
ONLINE_RES_DOCBOOK = http://www.crifan.com/files/res/docbook

################################################################################
# Enviroment Settings
################################################################################

# ----------------------- home config -----------------------
TOOLS_ROOT_CMD = E:/Dev_Root/docbook/tools
#TOOLS_ROOT_CMD = /E/Dev_Root/docbook/tools
CONFIG_ROOT_CMD = E:/Dev_Root/docbook/dev/config
#CONFIG_ROOT_CMD = /E/Dev_Root/docbook/dev/config
LOCAL_RELEASE_PARENT_CMD = E:/Dev_Root/www_crifan_com/files/doc/docbook
#LOCAL_RELEASE_PARENT_CMD = /E/Dev_Root/www_crifan_com/files/doc/docbook
LOCAL_PDF_CMD = E:/tmp/books
#LOCAL_PDF_CMD = /E/tmp/books

# ----------------------- office config -----------------------
#TOOLS_ROOT_CMD = D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools
#CONFIG_ROOT_CMD = D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config
#LOCAL_RELEASE_PARENT_CMD = D:/to_del/docbook
#LOCAL_PDF_CMD = D:/to_del/docbook

################################################################################
# ----------------------- common config -----------------------
# follow config_root and tools_root are soft-link
CONFIG_ROOT_CYGWIN = /home/develop/docbook/config_root
#CONFIG_ROOT_CYGWIN = /E/Dev_Root/docbook/dev/config
TOOLS_ROOT_CYGWIN = /home/develop/docbook/tools_root
#TOOLS_ROOT_CYGWIN = /E/Dev_Root/docbook/tools

################################################################################
FOP_CFG_ROOT_CMD = $(CONFIG_ROOT_CMD)/fop/conf

XML_CATALOG_ROOT_CYGWIN = $(CONFIG_ROOT_CYGWIN)/catalog
XML_CATALOG_FILES = $(XML_CATALOG_ROOT_CYGWIN)/catalog.xml

#DOCBOOK_XSL_NS_NAME=docbook-xsl-ns-1.76.1
#DOCBOOK_XSL_NS_NAME=docbook-xsl-ns-1.77.0
#DOCBOOK_XSL_NS_NAME=docbook-xsl-ns-1.77.1
DOCBOOK_XSL_NS_NAME=docbook-xsl-ns-1.78.1

CONFIG_XSL_NS_ROOT_CYGWIN = $(CONFIG_ROOT_CYGWIN)/$(DOCBOOK_XSL_NS_NAME)

TOOLS_XSL_NS_BASE_CMD = $(TOOLS_ROOT_CMD)/$(DOCBOOK_XSL_NS_NAME)
CONFIG_XSL_NS_BASE_CMD = $(CONFIG_ROOT_CMD)/$(DOCBOOK_XSL_NS_NAME)

SYS_IMG_PATH_LOCAL  = $(CONFIG_ROOT_CMD)/images/system
SYS_IMG_PATH_RELEASE= $(ONLINE_RES_DOCBOOK)/images

MAKE_FILE=$(CONFIG_ROOT_CYGWIN)/docbook.mk

TOOLS_XSL_NS_FO = $(TOOLS_XSL_NS_BASE_CMD)/fo
TOOLS_XSL_NS_HTML = $(TOOLS_XSL_NS_BASE_CMD)/html
TOOLS_XSL_NS_HTMLHELP = $(TOOLS_XSL_NS_BASE_CMD)/htmlhelp
TOOLS_XSL_NS_WEBHELP = $(TOOLS_XSL_NS_BASE_CMD)/webhelp
TOOLS_XSL_NS_WEBSITE = $(TOOLS_XSL_NS_BASE_CMD)/website

TOOLS_XSL_NS_PROFILING = $(TOOLS_XSL_NS_BASE_CMD)/profiling
TOOLS_XSL_NS_EXTENSIONS = $(TOOLS_XSL_NS_BASE_CMD)/extensions

# ----------------------- common environment variable -----------------------
OS_NAME = $(shell uname -o)
OS_NAME_LOWCASE = $(shell echo $(OS_NAME) | tr '[A-Z]' '[a-z]')

################################################################################
# Configuration/Settings
################################################################################

# ================== Common related ==================
#<xsl:param name="callout.graphics" select="1"></xsl:param>
#<xsl:param name="callout.graphics.path">images/system/callouts/</xsl:param>
#<xsl:param name="callout.graphics.number.limit">30</xsl:param>
#<xsl:param name="callout.graphics.extension">.svg</xsl:param>
#CFG_CALLOUT_GRAPHICS=0
CFG_CALLOUT_GRAPHICS=1
CALLOUT_NUMBER_LIMIT=30

CALLOUT_GRAPHICS_PATH_LOCAL=$(SYS_IMG_PATH_LOCAL)/callouts/
CALLOUT_GRAPHICS_PATH_RELEASE=$(SYS_IMG_PATH_RELEASE)/callouts/

FO_CALLOUT_GRAPHICS_EXTENSION=.svg
HTML_CALLOUT_GRAPHICS_EXTENSION=.png

#<xsl:param name="admon.graphics">1</xsl:param>
#<xsl:param name="admon.graphics.extension">.svg</xsl:param>
#<xsl:param name="admon.graphics.path">images/system/colorsvg/</xsl:param>
#CFG_ADMON_GRAPHICS=0
CFG_ADMON_GRAPHICS=1

FO_ADMON_GRAPHICS_EXTENSION=.svg
FO_ADMON_GRAPHICS_PATH=$(SYS_IMG_PATH_LOCAL)/colorsvg/

HTML_ADMON_GRAPHICS_EXTENSION=.png
HTML_ADMON_GRAPHICS_PATH_LOCAL=$(SYS_IMG_PATH_LOCAL)/
HTML_ADMON_GRAPHICS_PATH_RELEASE=$(SYS_IMG_PATH_RELEASE)/


# ================== HTMLS related ==================
#<xsl:param name="navig.graphics">1</xsl:param>
#<xsl:param name="navig.graphics.extension">.png</xsl:param>
#<xsl:param name="navig.graphics.path">images/system/</xsl:param>
#CFG_NAVIG_GRAPHICS=0
CFG_NAVIG_GRAPHICS=1
NAVIG_GRAPHICS_EXTENSION=$(HTML_ADMON_GRAPHICS_EXTENSION)
NAVIG_GRAPHICS_PATH_LOCAL=file:///$(HTML_ADMON_GRAPHICS_PATH_LOCAL)
NAVIG_GRAPHICS_PATH_RELEASE=$(HTML_ADMON_GRAPHICS_PATH_RELEASE)


# ================== HTML related ==================

JS_PATH_LOCAL=$(CONFIG_XSL_NS_BASE_CMD)/html/js
JS_PATH_RELEASE=$(ONLINE_RES_DOCBOOK)/js
#JS_FILE=statistic_page_view.js
#JS_FILE_LOCAL=$(JS_PATH_LOCAL)/$(JS_FILE)
#JS_FILE_RELEASE=$(JS_PATH_RELEASE)/$(JS_FILE)
INSERT_JS_FILE_LOCAL=$(JS_PATH_LOCAL)/insert_local_pageview_js.txt
INSERT_JS_FILE_RELEASE=$(JS_PATH_LOCAL)/insert_online_pageview_js.txt

#equation/programlisting/... setting
#<xsl:param name="html.stylesheet.type">text/css</xsl:param>
#<xsl:param name="html.stylesheet">css/common_html.css</xsl:param>
#CFG_HTML_CSS=0
CFG_HTML_CSS=1
HTML_STYLESHEET_TYPE = text/css
CSS_PATH_LOCAL = $(CONFIG_XSL_NS_BASE_CMD)/html/css
CSS_PATH_RELEASE = $(ONLINE_RES_DOCBOOK)/css
# current only support single css file
#HTML_STYLESHEET_LOCAL = $(CSS_PATH_LOCAL)/common_html.css
HTML_STYLESHEET_LOCAL = file:///$(CSS_PATH_LOCAL)/common_html.css
HTML_STYLESHEET_RELEASE = $(CSS_PATH_RELEASE)/common_html.css

#HTMLS_OUTPUT_BASE_CMD = ../output

################################################################################
# Different Format Settings
################################################################################

# HTMLS
HTMLS_MAIN_FILENAME = index

################################################################################
# Common Tools and Parameters Settings
################################################################################

#===============================================================================
# XSLT related
#===============================================================================
#using tools
XSLT = xsltproc
XSLT_FLAGS_COMMON = \
    --xinclude \
    --stringparam callout.graphics $(CFG_CALLOUT_GRAPHICS) \
    --stringparam admon.graphics $(CFG_ADMON_GRAPHICS) \

ifeq ($(CFG_CALLOUT_GRAPHICS), 1)
XSLT_FLAGS_COMMON += --stringparam callout.graphics.number.limit $(CALLOUT_NUMBER_LIMIT)
endif

# ================== FO related ==================
XSLT_FLAGS_FO = $(XSLT_FLAGS_COMMON) \

# callout settings
ifeq ($(CFG_CALLOUT_GRAPHICS), 1)
XSLT_FLAGS_FO += --stringparam callout.graphics.extension $(FO_CALLOUT_GRAPHICS_EXTENSION)
XSLT_FLAGS_FO += --stringparam callout.graphics.path $(CALLOUT_GRAPHICS_PATH_LOCAL)
endif

# admon settings
ifeq ($(CFG_ADMON_GRAPHICS), 1)
XSLT_FLAGS_FO += --stringparam admon.graphics.extension $(FO_ADMON_GRAPHICS_EXTENSION)
XSLT_FLAGS_FO += --stringparam admon.graphics.path $(FO_ADMON_GRAPHICS_PATH)
endif

# ================== HTML related ==================
XSLT_FLAGS_COMMON_HTML = $(XSLT_FLAGS_COMMON)

# callout settings
ifeq ($(CFG_CALLOUT_GRAPHICS), 1)
XSLT_FLAGS_COMMON_HTML += --stringparam callout.graphics.extension $(HTML_CALLOUT_GRAPHICS_EXTENSION)
endif
# admon settings
ifeq ($(CFG_ADMON_GRAPHICS), 1)
XSLT_FLAGS_COMMON_HTML += --stringparam admon.graphics.extension $(HTML_ADMON_GRAPHICS_EXTENSION)
endif
# css settings
ifeq ($(CFG_HTML_CSS), 1)
XSLT_FLAGS_COMMON_HTML += --stringparam html.stylesheet.type $(HTML_STYLESHEET_TYPE)
endif

XSLT_FLAGS_HTML_COMMON_LOCAL = 
ifeq ($(CFG_CALLOUT_GRAPHICS), 1)
XSLT_FLAGS_HTML_COMMON_LOCAL += --stringparam callout.graphics.path $(CALLOUT_GRAPHICS_PATH_LOCAL)
endif
ifeq ($(CFG_ADMON_GRAPHICS), 1)
XSLT_FLAGS_HTML_COMMON_LOCAL += --stringparam admon.graphics.path $(HTML_ADMON_GRAPHICS_PATH_LOCAL)
endif
ifeq ($(CFG_HTML_CSS), 1)
XSLT_FLAGS_HTML_COMMON_LOCAL += --stringparam html.stylesheet $(HTML_STYLESHEET_LOCAL)
endif

XSLT_FLAGS_HTML_LOCAL  = $(XSLT_FLAGS_COMMON_HTML)
XSLT_FLAGS_HTML_LOCAL += $(XSLT_FLAGS_HTML_COMMON_LOCAL)

XSLT_FLAGS_HTML_COMMON_RELEASE = 
ifeq ($(CFG_CALLOUT_GRAPHICS), 1)
XSLT_FLAGS_HTML_COMMON_RELEASE += --stringparam callout.graphics.path $(CALLOUT_GRAPHICS_PATH_RELEASE)
endif
ifeq ($(CFG_ADMON_GRAPHICS), 1)
XSLT_FLAGS_HTML_COMMON_RELEASE += --stringparam admon.graphics.path $(HTML_ADMON_GRAPHICS_PATH_RELEASE)
endif
ifeq ($(CFG_HTML_CSS), 1)
XSLT_FLAGS_HTML_COMMON_RELEASE += --stringparam html.stylesheet $(HTML_STYLESHEET_RELEASE)
endif

XSLT_FLAGS_HTML_RELEASE = $(XSLT_FLAGS_COMMON_HTML)
XSLT_FLAGS_HTML_RELEASE += $(XSLT_FLAGS_HTML_COMMON_RELEASE)

#HTML_CSS_FILE = $(CONFIG_XSL_NS_ROOT_CYGWIN)/html/css/common_html.css

# ====== HTMLs related ======
XSLT_FLAGS_HTMLS = $(XSLT_FLAGS_COMMON_HTML) \
    --stringparam manifest $(PROJECT_NAME).html.manifest \
#    --stringparam root.filename $(PROJECT_NAME) \
#    --stringparam base.dir $(HTMLS_OUTPUT_BASE_CMD)/html/multi/ \

XSLT_FLAGS_HTMLS_LOCAL  = $(XSLT_FLAGS_HTMLS)
XSLT_FLAGS_HTMLS_LOCAL += $(XSLT_FLAGS_HTML_COMMON_LOCAL)
XSLT_FLAGS_HTMLS_LOCAL += --stringparam navig.graphics $(CFG_NAVIG_GRAPHICS)
ifeq ($(CFG_NAVIG_GRAPHICS), 1)
XSLT_FLAGS_HTMLS_LOCAL += --stringparam navig.graphics.extension $(NAVIG_GRAPHICS_EXTENSION)
XSLT_FLAGS_HTMLS_LOCAL += --stringparam navig.graphics.path $(NAVIG_GRAPHICS_PATH_LOCAL)
endif

XSLT_FLAGS_HTMLS_RELEASE  = $(XSLT_FLAGS_HTMLS)
XSLT_FLAGS_HTMLS_RELEASE += $(XSLT_FLAGS_HTML_COMMON_RELEASE)
XSLT_FLAGS_HTMLS_RELEASE += --stringparam navig.graphics $(CFG_NAVIG_GRAPHICS)
ifeq ($(CFG_NAVIG_GRAPHICS), 1)
XSLT_FLAGS_HTMLS_RELEASE += --stringparam navig.graphics.extension $(NAVIG_GRAPHICS_EXTENSION)
XSLT_FLAGS_HTMLS_RELEASE += --stringparam navig.graphics.path $(NAVIG_GRAPHICS_PATH_RELEASE)
endif

# ====== CHM related ======
XSLT_FLAGS_CHM = $(XSLT_FLAGS_HTMLS_LOCAL) \
    --stringparam htmlhelp.chm $(PROJECT_NAME).chm \


#===============================================================================
# Webhelp related
#===============================================================================

#WEBHELP_INDEX_LANGUAGE = en
WEBHELP_INDEX_LANGUAGE = zh

# A list of files to exclude from indexing
INDEXER_EXCLUDED_FILES = ix01.html

#WEBHELP_XSL_FILE=$(TOOLS_XSL_NS_WEBHELP)/xsl/webhelp.xsl
WEBHELP_XSL_FILE=$(CONFIG_XSL_NS_BASE_CMD)/webhelp/webhelp_crl.xsl

WEBHELP_TEMPLATE_COMMON_LOCAL   = file:///$(TOOLS_XSL_NS_WEBHELP)/template/common/
WEBHELP_TEMPLATE_COMMON_RELEASE = $(ONLINE_RES_DOCBOOK)/webhelp/template/common/

# Use this variable to pass in other stringparams
# to the xsltproc pass that generates DocBook output.
# For example:
# WEBHELP_OTHER_XSLTPROC_ARGS = --stringparam example.param ""

#http://docbook.sourceforge.net/release/xsl/1.78.1/doc/html/webhelp.base.dir.html
#if not set, default will be docs under current docbook book src directory
XSLT_FLAGS_WEBHELP = $(XSLT_FLAGS_COMMON) \
    --stringparam webhelp.base.dir $(OUTPUT_DIR_WEBHELP) \
    --stringparam webhelp.indexer.language $(WEBHELP_INDEX_LANGUAGE)
XSLT_FLAGS_WEBHELP += --stringparam navig.graphics $(CFG_NAVIG_GRAPHICS)

XSLT_FLAGS_WEBHELP_LOCAL = \
    --stringparam webhelp.common.dir  $(WEBHELP_TEMPLATE_COMMON_LOCAL)\
    --stringparam custom.css.source $(HTML_STYLESHEET_LOCAL)
ifeq ($(CFG_NAVIG_GRAPHICS), 1)
XSLT_FLAGS_WEBHELP_LOCAL += --stringparam navig.graphics.extension $(NAVIG_GRAPHICS_EXTENSION)
XSLT_FLAGS_WEBHELP_LOCAL += --stringparam navig.graphics.path $(NAVIG_GRAPHICS_PATH_LOCAL)
endif

XSLT_FLAGS_WEBHELP_RELEASE = \
    --stringparam webhelp.common.dir  $(WEBHELP_TEMPLATE_COMMON_RELEASE)\
    --stringparam custom.css.source $(HTML_STYLESHEET_RELEASE)
ifeq ($(CFG_NAVIG_GRAPHICS), 1)
XSLT_FLAGS_WEBHELP_RELEASE += --stringparam navig.graphics.extension $(NAVIG_GRAPHICS_EXTENSION)
XSLT_FLAGS_WEBHELP_RELEASE += --stringparam navig.graphics.path $(NAVIG_GRAPHICS_PATH_RELEASE)
endif

#default set to local
WEBHELP_OTHER_XSLTPROC_ARGS = $(XSLT_FLAGS_WEBHELP)
WEBHELP_OTHER_XSLTPROC_ARGS += $(XSLT_FLAGS_WEBHELP_LOCAL)

# Profiling params. For more information on 
# profiling (conditional text) and DocBook documents, see
# http://www.sagehill.net/docbookxsl/Profiling.html
PROFILE.ARCH = ""
PROFILE.AUDIENCE = ""
PROFILE.CONDITION = ""
PROFILE.CONFORMANCE = ""
PROFILE.LANG = ""
PROFILE.OS = ""
PROFILE.REVISION = ""
PROFILE.REVISIONFLAG = ""
PROFILE.ROLE = ""
PROFILE.SECURITY = ""
PROFILE.STATUS = ""
PROFILE.USERLEVEL = ""
PROFILE.VENDOR = ""
PROFILE.WORDSIZE = ""
PROFILE.ATTRIBUTE = ""
PROFILE.VALUE = ""

# =================================================
# You probably don't need to change anything below
# unless you choose to add a validation step.
# ================================================
INDEXER_JAR         := $(TOOLS_XSL_NS_EXTENSIONS)/webhelpindexer.jar
TAGSOUP_JAR         := $(TOOLS_XSL_NS_EXTENSIONS)/tagsoup-1.2.1.jar
LUCENE_ANALYZER_JAR := $(TOOLS_XSL_NS_EXTENSIONS)/lucene-analyzers-3.0.0.jar
LUCENE_CORE_JAR     := $(TOOLS_XSL_NS_EXTENSIONS)/lucene-core-3.0.0.jar

#WEBHELP_CLASSPATH := $(INDEXER_JAR):$(TAGSOUP_JAR):$(LUCENE_ANALYZER_JAR):$(LUCENE_CORE_JAR)
#under Windows(Cygwin), (java classpath)
#(1)path seperator is semicolon ';' (not Linux's colon ':')
#(2) command contain semicolon means multile command, so need quote
# so become -> "path1;path2;path3"
#detail can refer:
#【已解决】docbook中去make webhelp编译webhelp结果出错:Error: Could not find or load main class com.nexwave.nquindexer.IndexerMain
#http://www.crifan.com/docbook_make_webhelp_error__could_not_find_or_load_main_class_com_nexwave_nquindexer_indexermain/
ifeq ($(OS_NAME_LOWCASE), cygwin)
WEBHELP_CLASSPATH := "$(INDEXER_JAR);$(TAGSOUP_JAR);$(LUCENE_ANALYZER_JAR);$(LUCENE_CORE_JAR)"
else
WEBHELP_CLASSPATH := $(INDEXER_JAR):$(TAGSOUP_JAR):$(LUCENE_ANALYZER_JAR):$(LUCENE_CORE_JAR)
endif

#===============================================================================
# FOP related
#===============================================================================
FOP = fop
FOP_FLAGS = --execdebug -c $(FOP_CFG_ROOT_CMD)/fop.xconf

#===============================================================================
# compression related
#===============================================================================
# compression
COMPRESS_TOOL = 7z
#compression options: http://www.dotnetperls.com/7-zip-examples
COMPRESS_LEVEL = x9 
COMPRESS_FLAG = a -m$(COMPRESS_LEVEL)
COMPRESS_SUF = 7z

################################################################################
# Path/Location Settings
################################################################################

SRC_DIR = .
MAIN_SRC_FILE = $(SRC_DIR)/$(PROJECT_NAME).xml
OUTPUT_DIR = ../output
RELEASE_DIR = ../release

IMG_DIR = $(SRC_DIR)/images

#SYS_IMG_SRC_DIR = $(CONFIG_ROOT_CYGWIN)/images/system
#SYS_IMG_DST_DIR = $(IMG_DIR)/system
#SOMEONE_UNDER_SYS_IMG = $(SYS_IMG_DST_DIR)/home.gif

OUTPUT_DIR_PO       = $(OUTPUT_DIR)/fo
OUTPUT_DIR_PDF      = $(OUTPUT_DIR)/pdf
OUTPUT_DIR_RTF      = $(OUTPUT_DIR)/rtf/fop
OUTPUT_DIR_HTML     = $(OUTPUT_DIR)/html/single
OUTPUT_DIR_TXT      = $(OUTPUT_DIR)/plain_text/w3m
OUTPUT_DIR_HTMLS    = $(OUTPUT_DIR)/html/multi
OUTPUT_DIR_HTMLHELP = $(OUTPUT_DIR)/htmlhelp
OUTPUT_DIR_CHM      = $(OUTPUT_DIR_HTMLHELP)
OUTPUT_DIR_WEBHELP = $(OUTPUT_DIR)/webhelp

OUTPUT_FILE_PO      = $(OUTPUT_DIR_PO)/$(PROJECT_NAME).fo
OUTPUT_FILE_PDF     = $(OUTPUT_DIR_PDF)/$(PROJECT_NAME).pdf
OUTPUT_FILE_RTF     = $(OUTPUT_DIR_RTF)/$(PROJECT_NAME).rtf
OUTPUT_FILE_HTML    = $(OUTPUT_DIR_HTML)/$(PROJECT_NAME).html
OUTPUT_FILE_TXT     = $(OUTPUT_DIR_TXT)/$(PROJECT_NAME).txt
OUTPUT_FILE_HTMLS   = $(OUTPUT_DIR_HTMLS)/$(HTMLS_MAIN_FILENAME).html
#OUTPUT_FILE_HTMLS   = $(OUTPUT_DIR_HTMLS)/$(PROJECT_NAME).html
OUTPUT_FILE_HTMLHELP= $(OUTPUT_DIR_HTMLHELP)/$(PROJECT_NAME).html
OUTPUT_FILE_CHM     = $(OUTPUT_DIR_CHM)/$(PROJECT_NAME).chm
OUTPUT_FILE_WEBHELP = $(OUTPUT_DIR_WEBHELP)/index.html

XSL_NS_FILE_FO      = docbook_fo_crl.xsl
XSL_NS_FILE_HTML    = docbook_html_crl.xsl
XSL_NS_FILE_HTMLS   = chunk_html_crl.xsl
XSL_NS_FILE_HTMLHELP= docbook_htmlhelp_crl.xsl

RELEASE_DIR_PDF     = $(RELEASE_DIR)/pdf
RELEASE_DIR_RTF     = $(RELEASE_DIR)/rtf
RELEASE_DIR_HTML    = $(RELEASE_DIR)/html
RELEASE_DIR_TXT     = $(RELEASE_DIR)/txt
RELEASE_DIR_HTMLS   = $(RELEASE_DIR)/htmls
RELEASE_DIR_CHM     = $(RELEASE_DIR)/chm
RELEASE_DIR_WEBHELP = $(RELEASE_DIR)/webhelp


################################################################################
# Commands to Generate Files
################################################################################

# generate all files
all: pdf rtf html txt htmls chm webhelp
# copy all generated files into specific foler and also do compression
release: release_pdf release_rtf release_html release_txt release_htmls release_chm release_webhelp

#.PHONY:release_copy release
LOCAL_RELEASE_PROJECT=$(LOCAL_RELEASE_PARENT_CMD)/$(PROJECT_NAME)
#copy the release to local dir
release_copy:release
	mkdir -p $(LOCAL_RELEASE_PROJECT)
	rm -rf $(LOCAL_RELEASE_PROJECT)/*
	cp -a $(RELEASE_DIR) $(LOCAL_RELEASE_PROJECT)

#copy generated pdf to some folder, facilitate to find all pdf in one place
pdf_copy:pdf
	mkdir -p $(LOCAL_PDF_CMD)
	rm -rf $(LOCAL_PDF_CMD)/$(PROJECT_NAME).pdf
	cp -a $(OUTPUT_FILE_PDF) $(LOCAL_PDF_CMD)


################################################################################
# Common actions
################################################################################
#always_copy_sys_img:

# copy the system related pictures(callout/navi/admonition/...) figures to ./images/system
#copy_sys_img:always_copy_sys_img
#	cp -a $(SYS_IMG_SRC_DIR) $(SYS_IMG_DST_DIR)

# remove copied system related pictures(callout/navi/admonition/...) figures from ./images/system
#clean_sys_img:
#	rm -rf $(SYS_IMG_DST_DIR)

#exist_sys_img: always_copy_sys_img copy_sys_img
#.PHONY:copy_sys_img

################################################################################
# fo
################################################################################
$(OUTPUT_FILE_PO):$(MAIN_SRC_FILE) $(SUB_SRC_FILES) $(MAKE_FILE)
	@echo "=============================== generating ${PROJECT_NAME} fo =============================="
	export XML_CATALOG_FILES="$(XML_CATALOG_FILES)" && \
	export XML_DEBUG_CATALOG=1 && \
	$(XSLT) $(XSLT_FLAGS_FO) -o $@ $(XSL_NS_FILE_FO) $<

################################################################################
# pdf
################################################################################
$(OUTPUT_FILE_PDF): $(OUTPUT_FILE_PO)
	@echo "=============================== generating ${PROJECT_NAME} pdf =============================="
	$(FOP) $(FOP_FLAGS) $< -pdf $@

pdf: $(OUTPUT_FILE_PDF)

clean_pdf:
	@echo "=============================== cleaning ${PROJECT_NAME} pdf =============================="
	rm -f $(OUTPUT_FILE_PO)
	rm -f $(OUTPUT_FILE_PDF)

release_pdf:$(OUTPUT_FILE_PDF)
	@echo "=============================== release ${PROJECT_NAME} pdf =============================="
	cp -a $(OUTPUT_FILE_PDF) $(RELEASE_DIR_PDF)
	$(COMPRESS_TOOL) $(COMPRESS_FLAG) $(RELEASE_DIR_PDF)/$(PROJECT_NAME).$(subst release_,,$@).$(COMPRESS_SUF) $(OUTPUT_FILE_PDF)

clean_release_pdf:
	@echo "=============================== cleaning ${PROJECT_NAME} pdf release =============================="
	rm -f $(RELEASE_DIR_PDF)/*

################################################################################
# rtf
################################################################################
$(OUTPUT_FILE_RTF):$(OUTPUT_FILE_PO)
	@echo "=============================== generating ${PROJECT_NAME} rtf =============================="
	#cp -a $(SYS_IMG_SRC_DIR) $(SYS_IMG_DST_DIR)
	$(FOP) $(FOP_FLAGS) $< -rtf $@
	#rm -rf $(SYS_IMG_DST_DIR)

rtf: $(OUTPUT_FILE_RTF)

clean_rtf:
	@echo "=============================== cleaning ${PROJECT_NAME} rtf =============================="
	rm -f $(OUTPUT_FILE_PO)
	rm -f $(OUTPUT_FILE_RTF)

release_rtf:$(OUTPUT_FILE_RTF)
	@echo "=============================== release ${PROJECT_NAME} chm =============================="
	cp -a $(OUTPUT_FILE_RTF) $(RELEASE_DIR_RTF)
	$(COMPRESS_TOOL) $(COMPRESS_FLAG) $(RELEASE_DIR_RTF)/$(PROJECT_NAME).$(subst release_,,$@).$(COMPRESS_SUF) $(OUTPUT_FILE_RTF)

clean_release_rtf:
	@echo "=============================== cleaning ${PROJECT_NAME} rtf release =============================="
	rm -f $(RELEASE_DIR_RTF)/*

################################################################################
# html
################################################################################
$(OUTPUT_FILE_HTML): $(MAIN_SRC_FILE) $(SUB_SRC_FILES) $(MAKE_FILE)
	@echo "=============================== generating ${PROJECT_NAME} html =============================="
	export XML_CATALOG_FILES="$(XML_CATALOG_FILES)" && \
	export XML_DEBUG_CATALOG=1 && \
	$(XSLT) $(XSLT_FLAGS_HTML_LOCAL) -o $@ $(XSL_NS_FILE_HTML) $<
	@#cat $(INSERT_JS_FILE_LOCAL) >> $(OUTPUT_FILE_HTML)
	#cp -a $(CSS_DIR) $(OUTPUT_DIR_HTML)/
	#cp -a $(SYS_IMG_SRC_DIR) $(SYS_IMG_DST_DIR)
	cp -a $(IMG_DIR) $(OUTPUT_DIR_HTML)/
	#rm -rf $(SYS_IMG_DST_DIR)

#here Here add clean before output file is to makesure NOT use the possbile existed one which is created by 'make release'
html: clean_html $(OUTPUT_FILE_HTML)

clean_html:
	@echo "=============================== cleaning ${PROJECT_NAME} html =============================="
	rm -rf $(OUTPUT_DIR_HTML)/*

#release_html:$(OUTPUT_FILE_HTML)
release_html: $(MAIN_SRC_FILE) $(SUB_SRC_FILES) $(MAKE_FILE)
	@echo "=============================== release ${PROJECT_NAME} html =============================="
	export XML_CATALOG_FILES="$(XML_CATALOG_FILES)" && \
	export XML_DEBUG_CATALOG=1 && \
	$(XSLT) $(XSLT_FLAGS_HTML_RELEASE) -o $(OUTPUT_FILE_HTML) $(XSL_NS_FILE_HTML) $<
	@#cat $(INSERT_JS_FILE_RELEASE) >> $(OUTPUT_FILE_HTML)
	#cp -a $(CSS_DIR) $(OUTPUT_DIR_HTML)/
	#cp -a $(SYS_IMG_SRC_DIR) $(SYS_IMG_DST_DIR)
	cp -a $(IMG_DIR) $(OUTPUT_DIR_HTML)/
	#rm -rf $(SYS_IMG_DST_DIR)
	cp -a $(OUTPUT_DIR_HTML)/* $(RELEASE_DIR_HTML)
	$(COMPRESS_TOOL) $(COMPRESS_FLAG) $(RELEASE_DIR_HTML)/$(PROJECT_NAME).$(subst release_,,$@).$(COMPRESS_SUF) $(OUTPUT_DIR_HTML)/*

#clean_release_html:
clean_release_html: clean_html
	@echo "=============================== cleaning ${PROJECT_NAME} html release =============================="
	rm -rf $(RELEASE_DIR_HTML)/*

################################################################################
# txt
################################################################################
$(OUTPUT_FILE_TXT): $(OUTPUT_FILE_HTML)
	@echo "=============================== generating ${PROJECT_NAME} txt =============================="
	w3m -I UTF8 -O UTF8 -dump $(OUTPUT_FILE_HTML) > $(OUTPUT_FILE_TXT)
	unix2dos $(OUTPUT_FILE_TXT)

txt: $(OUTPUT_FILE_TXT)

clean_txt:
	@echo "=============================== cleaning ${PROJECT_NAME} txt =============================="
	rm -f $(OUTPUT_FILE_TXT)

release_txt:$(OUTPUT_FILE_TXT)
	@echo "=============================== release ${PROJECT_NAME} txt =============================="
	cp -a $(OUTPUT_FILE_TXT) $(RELEASE_DIR_TXT)
	$(COMPRESS_TOOL) $(COMPRESS_FLAG) $(RELEASE_DIR_TXT)/$(PROJECT_NAME).$(subst release_,,$@).$(COMPRESS_SUF) $(OUTPUT_FILE_TXT)

clean_release_txt:
	@echo "=============================== cleaning ${PROJECT_NAME} txt release =============================="
	rm -f $(RELEASE_DIR_TXT)/*

################################################################################
# htmls
################################################################################
$(OUTPUT_FILE_HTMLS):$(MAIN_SRC_FILE) $(SUB_SRC_FILES) $(MAKE_FILE)
	@echo "=============================== generating ${PROJECT_NAME} htmls =============================="
	export XML_CATALOG_FILES="$(XML_CATALOG_FILES)" && \
	export XML_DEBUG_CATALOG=1 && \
	$(XSLT) $(XSLT_FLAGS_HTMLS_LOCAL) -o $@ $(XSL_NS_FILE_HTMLS) $<
	#cp -a $(CSS_DIR) $(OUTPUT_DIR_HTMLS)/
	#cp -a $(SYS_IMG_SRC_DIR) $(SYS_IMG_DST_DIR)
	cp -a $(IMG_DIR) $(OUTPUT_DIR_HTMLS)/
	#rm -rf $(SYS_IMG_DST_DIR)

#here Here add clean before output file is to makesure NOT use the possbile existed one which is created by 'make release'
htmls: clean_htmls $(OUTPUT_FILE_HTMLS)

clean_htmls:
	@echo "=============================== cleaning ${PROJECT_NAME} htmls =============================="
	rm -rf $(OUTPUT_DIR_HTMLS)/*

.PHONY:release_htmls
release_htmls:$(MAIN_SRC_FILE) $(SUB_SRC_FILES) $(MAKE_FILE)
	@echo "=============================== release ${PROJECT_NAME} htmls =============================="
	export XML_CATALOG_FILES="$(XML_CATALOG_FILES)" && \
	export XML_DEBUG_CATALOG=1 && \
	$(XSLT) $(XSLT_FLAGS_HTMLS_RELEASE) -o $(OUTPUT_FILE_HTMLS) $(XSL_NS_FILE_HTMLS) $<
	#cp -a $(CSS_DIR) $(OUTPUT_DIR_HTMLS)/
	#cp -a $(SYS_IMG_SRC_DIR) $(SYS_IMG_DST_DIR)
	cp -a $(IMG_DIR) $(OUTPUT_DIR_HTMLS)/
	#rm -rf $(SYS_IMG_DST_DIR)
	cp -a $(OUTPUT_DIR_HTMLS)/* $(RELEASE_DIR_HTMLS)
	$(COMPRESS_TOOL) $(COMPRESS_FLAG) $(RELEASE_DIR_HTMLS)/$(PROJECT_NAME).$(subst release_,,$@).$(COMPRESS_SUF) $(OUTPUT_DIR_HTMLS)/*

clean_release_htmls:
	@echo "=============================== cleaning ${PROJECT_NAME} htmls release =============================="
	rm -rf $(RELEASE_DIR_HTMLS)/*

################################################################################
# webhelp
################################################################################
# webhelp:
#	@echo "=============================== generating ${PROJECT_NAME} webhelp =============================="
#	ant webhelp

#above has set this value
#webhelp: WEBHELP_OTHER_XSLTPROC_ARGS = $(XSLT_FLAGS_WEBHELP)
#webhelp: WEBHELP_OTHER_XSLTPROC_ARGS += $(XSLT_FLAGS_WEBHELP_LOCAL)
webhelp: $(MAIN_SRC_FILE) $(SUB_SRC_FILES) $(MAKE_FILE) webhelp_copyfiles webhelp_chunk webhelp_index
	@echo "=============================== generating ${PROJECT_NAME} webhelp =============================="

webhelp_copyfiles:
	-rm -rf $(OUTPUT_DIR_WEBHELP)
	mkdir -p $(OUTPUT_DIR_WEBHELP)
	@#cp -r $(TOOLS_XSL_NS_WEBHELP)/template/common ${OUTPUT_DIR_WEBHELP}
	cp -a $(IMG_DIR) $(OUTPUT_DIR_WEBHELP)
	test ! -d $(IMG_DIR)/ || cp -a $(IMG_DIR)/ ${OUTPUT_DIR_WEBHELP}
	cp $(TOOLS_XSL_NS_WEBHELP)/template/favicon.ico ${OUTPUT_DIR_WEBHELP}/

webhelp_chunk:
	xsltproc \
        --output xincluded-profiled.xml  \
        --stringparam  profile.arch ${PROFILE.ARCH} \
        --stringparam  profile.audience ${PROFILE.AUDIENCE} \
        --stringparam  profile.condition ${PROFILE.CONDITION} \
        --stringparam  profile.conformance ${PROFILE.CONFORMANCE} \
        --stringparam  profile.lang ${PROFILE.LANG} \
        --stringparam  profile.os ${PROFILE.OS} \
        --stringparam  profile.revision ${PROFILE.REVISION} \
        --stringparam  profile.revisionflag ${PROFILE.REVISIONFLAG} \
        --stringparam  profile.role ${PROFILE.ROLE} \
        --stringparam  profile.security ${PROFILE.SECURITY} \
        --stringparam  profile.status ${PROFILE.STATUS} \
        --stringparam  profile.userlevel ${PROFILE.USERLEVEL} \
        --stringparam  profile.vendor ${PROFILE.VENDOR} \
        --stringparam  profile.wordsize ${PROFILE.WORDSIZE} \
        --stringparam  profile.attribute ${PROFILE.ATTRIBUTE} \
        --stringparam  profile.value ${PROFILE.VALUE} \
        $(TOOLS_XSL_NS_PROFILING)/profile.xsl  \
        $(MAIN_SRC_FILE)
	xsltproc --debug ${WEBHELP_OTHER_XSLTPROC_ARGS} $(WEBHELP_XSL_FILE) xincluded-profiled.xml
	rm xincluded-profiled.xml

webhelp_index:
	java \
        -DhtmlDir=$(OUTPUT_DIR_WEBHELP) \
        -DindexerLanguage=$(WEBHELP_INDEX_LANGUAGE) \
        -DhtmlExtension=html \
        -DdoStem=true \
        -DindexerExcludedFiles=$(INDEXER_EXCLUDED_FILES) \
        -Dorg.xml.sax.driver=org.ccil.cowan.tagsoup.Parser \
        -Djavax.xml.parsers.SAXParserFactory=org.ccil.cowan.tagsoup.jaxp.SAXFactoryImpl \
        -classpath $(WEBHELP_CLASSPATH) \
        com.nexwave.nquindexer.IndexerMain
	mkdir -p ${OUTPUT_DIR_WEBHELP}/search
	cp -r $(TOOLS_XSL_NS_WEBHELP)/template/search/* ${OUTPUT_DIR_WEBHELP}/search

clean_webhelp:
	@echo "=============================== cleaning ${PROJECT_NAME} webhelp =============================="
	@#ant clean
	-rm -rf $(OUTPUT_DIR_WEBHELP)

#overwrite default from local to release
release_webhelp: WEBHELP_OTHER_XSLTPROC_ARGS = $(XSLT_FLAGS_WEBHELP)
release_webhelp: WEBHELP_OTHER_XSLTPROC_ARGS += $(XSLT_FLAGS_WEBHELP_RELEASE)
release_webhelp: webhelp
	@echo "=============================== release ${PROJECT_NAME} webhelp =============================="
	mkdir -p $(RELEASE_DIR_WEBHELP)
	- cp -a $(OUTPUT_DIR_WEBHELP)/* $(RELEASE_DIR_WEBHELP)
	- $(COMPRESS_TOOL) $(COMPRESS_FLAG) $(RELEASE_DIR_WEBHELP)/$(PROJECT_NAME).$(subst release_,,$@).$(COMPRESS_SUF) $(OUTPUT_DIR_WEBHELP)/*

clean_release_webhelp:
	@echo "=============================== cleaning ${PROJECT_NAME} webhelp release =============================="
	rm -rf $(RELEASE_DIR_WEBHELP)/*

################################################################################
# chm
################################################################################
$(OUTPUT_FILE_HTMLHELP):$(MAIN_SRC_FILE) $(SUB_SRC_FILES)
	@echo "=============================== generating ${PROJECT_NAME} chm =============================="
	export XML_CATALOG_FILES="$(XML_CATALOG_FILES)" && \
	export XML_DEBUG_CATALOG=1 && \
	$(XSLT) $(XSLT_FLAGS_CHM) -o $@ $(XSL_NS_FILE_HTMLHELP) $<
	#cp -a $(CSS_DIR) $(OUTPUT_DIR_CHM)/
	#cp -a $(SYS_IMG_SRC_DIR) $(SYS_IMG_DST_DIR)
	cp -a $(IMG_DIR) $(OUTPUT_DIR_CHM)/
	#rm -rf $(SYS_IMG_DST_DIR)

$(OUTPUT_FILE_CHM):$(OUTPUT_FILE_HTMLHELP) $(OUTPUT_DIR_CHM)/htmlhelp.hhp $(OUTPUT_DIR_CHM)/toc.hhc
	-iconv -f UTF-8 -t GB18030 < $(OUTPUT_DIR_CHM)/htmlhelp.hhp > $(OUTPUT_DIR_CHM)/htmlhelp_gb18030.hhp
	-mv $(OUTPUT_DIR_CHM)/htmlhelp_gb18030.hhp $(OUTPUT_DIR_CHM)/htmlhelp.hhp
	-iconv -f UTF-8 -t GB18030 < $(OUTPUT_DIR_CHM)/toc.hhc > $(OUTPUT_DIR_CHM)/toc_gb18030.hhc
	-mv $(OUTPUT_DIR_CHM)/toc_gb18030.hhc $(OUTPUT_DIR_CHM)/toc.hhc
	@# here use '-' to ignore the hhc error
	@# case 1: normal run hhc will return 1 -> makefile consider it error -> will got Error 1
	@# case 2: for office environment, there is no hhc -> will got Error 127
	- hhc $(OUTPUT_DIR_CHM)/htmlhelp.hhp

chm: $(OUTPUT_FILE_CHM)

clean_chm:
	@echo "=============================== cleaning ${PROJECT_NAME} chm =============================="
	rm -rf $(OUTPUT_DIR_CHM)/*

release_chm:$(OUTPUT_FILE_CHM)
	@echo "=============================== release ${PROJECT_NAME} chm =============================="
	- cp -a $(OUTPUT_FILE_CHM) $(RELEASE_DIR_CHM)
	- $(COMPRESS_TOOL) $(COMPRESS_FLAG) $(RELEASE_DIR_CHM)/$(PROJECT_NAME).$(subst release_,,$@).$(COMPRESS_SUF) $(OUTPUT_FILE_CHM)

clean_release_chm:
	@echo "=============================== cleaning ${PROJECT_NAME} chm release =============================="
	rm -f $(RELEASE_DIR_CHM)/*

################################################################################
# clean all generated files
clean_all: clean_pdf clean_rtf clean_html clean_txt clean_htmls clean_chm clean_webhelp
# clean all released files
clean_release: clean_release_pdf clean_release_rtf clean_release_html clean_release_txt clean_release_htmls clean_release_chm clean_release_webhelp
# clean all of generated and released files
clean:clean_release clean_all

################################################################################
help:
	@echo  'Generate targets:'
	@echo  '  all             - Generate files to ouput folders for all formats:'
	@echo  '                    pdf/rtf/html/txt/htmls/chm'
	@echo  '  release         - Copy generated files to release folders for all formats:'
	@echo  '                    pdf/rtf/html/txt/htmls/chm'
	@echo  '  FORMAT          - Generate specific format file to ouput folder for'
	@echo  '                  - FORMAT=pdf/rtf/html/txt/htmls/chm'
	@echo  '  release_FORMAT  - do release for FORMAT=pdf/rtf/html/txt/htmls/chm'
	@echo  'Cleaning targets:'
	@echo  '  clean           - Clean generated files and released files for all format'
	@echo  '                    == clean_release clean_all'
	@echo  '  clean_all       - Clean generated files for all format'
	@echo  '  clean_FORMAT    - Clean for FORMAT=pdf/rtf/html/txt/htmls/chm'
	@echo  '  clean_release   - Clean released files for all format'
	@echo  '  clean_release_FORMAT - Clean release for FORMAT=pdf/rtf/html/txt/htmls/chm'

(2)E:\Dev_Root\docbook\dev\config\docbook-xsl-ns-1.78.1\webhelp\webhelp_crl.xsl

内容如下:

<?xml version="1.0"?>

<!DOCTYPE stylesheet 
[
<!ENTITY xsl_ns_version "docbook-xsl-ns-1.78.1">

<!-- HOME -->
<!-- <!ENTITY xsl_ns_path "E:/Dev_Root/docbook/tools/docbook-xsl-ns-1.77.1"> -->
<!-- <!ENTITY config_path "E:/Dev_Root/docbook/dev/config/docbook-xsl-ns-1.77.1"> -->
<!ENTITY xsl_ns_path "E:/Dev_Root/docbook/tools/&xsl_ns_version;">
<!ENTITY config_path "E:/Dev_Root/docbook/dev/config/&xsl_ns_version;">

<!-- OFFICE -->
<!--<!ENTITY xsl_ns_path "D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/docbook-xsl-ns-1.77.1">-->
<!--<!ENTITY config_path "D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.77.1">-->

<!-- ONLINE -->
<!--<!ENTITY xsl_ns_path "http://www.crifan.com/files/res/docbook">-->
<!--<!ENTITY config_path "http://www.crifan.com/files/res/docbook">-->
]>

<xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:d="http://docbook.org/ns/docbook"
    xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
    xmlns:exsl="http://exslt.org/common"
    xmlns:set="http://exslt.org/sets"
    version="1.0"
    exclude-result-prefixes="doc exsl set d">


<!-- <xsl:import href="file:///E:/Dev_Root/docbook/tools/docbook-xsl-ns-1.77.1/webhelp/xsl/webhelp.xsl"/> -->
<xsl:import href="webhelp.xsl"/>
<!-- when use cygwin xsltproc, follow href value not need file:/// -->
<!-- <xsl:import href="file:///&config_path;/common_all.xsl"/> -->
<xsl:import href="&config_path;/common_all.xsl"/>
<!--<xsl:import href="file:///E:/Dev_Root/docbook/dev/config/docbook-xsl-ns-1.77.1/html/multi/chunk_crl.xsl"/>-->


<!--
desitinate the dir of webhelp common resource
currently those resources include common/ and favicon.ico
-->
<!--<xsl:param name="webhelp.common.dir">E:/Dev_Root/docbook/tools/docbook-xsl-ns-1.77.1/webhelp/docs/common/</xsl:param>-->
<!--<xsl:param name="webhelp.common.dir">&xsl_ns_path;/webhelp/docs/common/</xsl:param>-->
<!-- for webhelp.common.dir have two mode: online and local, so can not set fixed value here -->
<!-- so webhelp.common.dir is configured in E:\Dev_Root\docbook\dev\config\docbook.mk -->
<!-- <xsl:param name="webhelp.common.dir">&xsl_ns_path;/webhelp/template/common/</xsl:param> -->

<!-- custom css file path -->
<!-- 1.78.1 have rename custom.css.path to custom.css.source -->
<!-- http://docbook.sourceforge.net/release/xsl/1.78.1/doc/html/custom.css.source.html -->

<!-- for custom.css.source have two mode: online and local, so can not set fixed value here -->
<!-- so custom.css.source is configured in E:\Dev_Root\docbook\dev\config\docbook.mk -->
<!-- <xsl:param name="custom.css.source">&config_path;/html/css/common_html.css</xsl:param> -->
<!-- <xsl:param name="custom.css.source">http://www.crifan.com/files/res/docbook/css/common_html.css</xsl:param> -->

<xsl:param name="webhelp.autolabel">1</xsl:param>
<xsl:param name="chapter.autolabel">1</xsl:param>
<xsl:param name="appendix.autolabel">0</xsl:param>
<xsl:param name="qandadiv.autolabel">1</xsl:param>
<xsl:param name="reference.autolabel">1</xsl:param>
<xsl:param name="navig.showtitles">1</xsl:param>

<!-- http://docbook.sourceforge.net/release/xsl/1.78.0/doc/html/docbook.css.link.html -->
<!-- docbook.css.link — Insert a link referencing the default CSS stylesheet -->
<!-- <xsl:param name="docbook.css.link">1</xsl:param> -->

<!-- remove warning: Request for label of unexpected element: bibliodiv -->
<xsl:template match="d:bibliodiv" mode="label.markup">
  <xsl:if test="@label">
    <xsl:value-of select="@label"/>
  </xsl:if>
</xsl:template>


<!--============================================================================
try add google analytics tracking code
=============================================================================-->
<!-- http://www.sagehill.net/docbookxsl/InsertExtHtml.html -->
<xsl:template name="user.header.content">
    <!-- when use cygwin xsltproc, follow href value not need file:/// -->
   <!-- <xsl:variable name="google_analytics_js" select="document('file:///&config_path;/html/js/crifan_ga_js.xml')"/> -->
   <xsl:variable name="google_analytics_js" select="document('&config_path;/html/js/crifan_ga_js.xml')"/>
   <xsl:copy-of select="$google_analytics_js/ga_js/node()"/>
</xsl:template>

</xsl:stylesheet>

(3)E:\Dev_Root\docbook\dev\config\docbook-xsl-ns-1.78.1\webhelp\webhelp.xsl

内容如下:

<?xml version="1.0"?>

<!DOCTYPE stylesheet 
[
<!ENTITY xsl_ns_version "docbook-xsl-ns-1.78.1">

<!-- HOME -->
<!-- <!ENTITY xsl_ns_path "E:/Dev_Root/docbook/tools/docbook-xsl-ns-1.77.1"> -->
<!-- <!ENTITY config_path "E:/Dev_Root/docbook/dev/config/docbook-xsl-ns-1.77.1"> -->

<!ENTITY xsl_ns_path "E:/Dev_Root/docbook/tools/&xsl_ns_version;">
<!ENTITY config_path "E:/Dev_Root/docbook/dev/config/&xsl_ns_version;">

<!-- OFFICE -->
<!--<!ENTITY xsl_ns_path "D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/tools/docbook-xsl-ns-1.77.1">-->
<!--<!ENTITY config_path "D:/tmp/tmp_dev_root/cgwin/home/CLi/develop/docbook/config/docbook-xsl-ns-1.77.1">-->
]>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:d="http://docbook.org/ns/docbook"
xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                xmlns:exsl="http://exslt.org/common"
                xmlns:set="http://exslt.org/sets"
		version="1.0"
                exclude-result-prefixes="doc exsl set d">

<!-- ********************************************************************
     $Id$
     ******************************************************************** 

     This file is part customization layer on top of the XSL DocBook
     Stylesheet distribution that generates webhelp output.

     ******************************************************************** -->
<!--
<xsl:import href="../../xhtml/chunk.xsl"/>
<xsl:include href="webhelp-common.xsl"/>
<xsl:include href="titlepage.templates.xsl"/>
-->

<!--<xsl:import href="file:///E:/Dev_Root/docbook/tools/docbook-xsl-ns-1.77.1/xhtml/chunk.xsl"/>-->
<!-- when use cygwin xsltproc, follow href value not need file:/// -->
<!-- <xsl:import href="file:///&xsl_ns_path;/xhtml/chunk.xsl"/> -->
<xsl:import href="&xsl_ns_path;/xhtml/chunk.xsl"/>
<xsl:include href="webhelp-common.xsl"/>
<xsl:include href="titlepage.templates.xsl"/>

</xsl:stylesheet>

(4)余下的webhelp-common.xsl,titlepage.templates.xsl,以及xhtml/chunk.xsl等内容,都是:

docbook-xsl-ns-1.78.1自带的,都没有修改。

目前的效果是:

(1)Firefox

firefox show webhelp css callout navi icon all ok

(2)IE10

IE10 show webhelp css callout navi icon all ok

(3)Chrome

chrome show webhelp css callout navi icon all ok

 

目前现存的一些问题:

(1)在docbook.mk中传入xsltproc的

–stringparam xxx yyy

有些没起效果。

此现象,之前就遇到,根本原因,暂时未知。

抽空再研究。

 

【总结】

目前已经搞定了,本地的webhelp的所有的内容了。


然后,继续去测试,编译出来的,release版本的webhelp,即针对在线的webhelp,是否正常显示:

【记录】docbook的docbook-xsl-ns-1.78.1中的webhelp:将webhelp上传到在线网站确认是否显示正常



发表评论

电子邮件地址不会被公开。 必填项已用*标注

无觅相关文章插件,快速提升流量