diff options
author | Ulrich Müller <ulm@gentoo.org> | 2023-10-30 18:41:37 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2023-11-02 18:03:11 +0100 |
commit | 35c9e7d3bb24d70320729df2fe207a5ea329be97 (patch) | |
tree | 61addc4ea89d54fb0efa72c2ef23c6ccbcfa5caf /xsl | |
parent | devbook.xsl: Replace str:repeatString by a non-recursive version (diff) | |
download | devmanual-35c9e7d3bb24d70320729df2fe207a5ea329be97.tar.gz devmanual-35c9e7d3bb24d70320729df2fe207a5ea329be97.tar.bz2 devmanual-35c9e7d3bb24d70320729df2fe207a5ea329be97.zip |
*.xsl: XML declaration, local variables for Emacs, whitespace fixes
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'xsl')
-rw-r--r-- | xsl/lang.highlight.c.xsl | 14 | ||||
-rw-r--r-- | xsl/lang.highlight.ebuild.xsl | 277 | ||||
-rw-r--r-- | xsl/lang.highlight.m4.xsl | 26 | ||||
-rw-r--r-- | xsl/lang.highlight.make.xsl | 18 | ||||
-rw-r--r-- | xsl/lang.highlight.sgml.xsl | 16 | ||||
-rw-r--r-- | xsl/str.tokenize.function.xsl | 14 |
6 files changed, 201 insertions, 164 deletions
diff --git a/xsl/lang.highlight.c.xsl b/xsl/lang.highlight.c.xsl index 089de50..f1e5937 100644 --- a/xsl/lang.highlight.c.xsl +++ b/xsl/lang.highlight.c.xsl @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:str="http://exslt.org/strings" xmlns:exslt="http://exslt.org/common" @@ -46,7 +47,7 @@ <xsl:choose> <!-- Highlight a quote --> <xsl:when test=". = '"'"> - <span class="Statement">"</span> + <span class="Statement">"</span> </xsl:when> <!-- If we're inside quotes stop here --> @@ -66,12 +67,17 @@ <!-- No match return --> <xsl:otherwise> <xsl:call-template name="lang.highlight.c.subtokenate"> - <xsl:with-param name="data" select="."/> - <xsl:with-param name="inPreProc" select="$macroLine"/> - </xsl:call-template> + <xsl:with-param name="data" select="."/> + <xsl:with-param name="inPreProc" select="$macroLine"/> + </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:template> </xsl:stylesheet> + +<!-- Local Variables: --> +<!-- indent-tabs-mode: nil --> +<!-- fill-column: 120 --> +<!-- End: --> diff --git a/xsl/lang.highlight.ebuild.xsl b/xsl/lang.highlight.ebuild.xsl index 47d884a..5a931e0 100644 --- a/xsl/lang.highlight.ebuild.xsl +++ b/xsl/lang.highlight.ebuild.xsl @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:str="http://exslt.org/strings" xmlns:exslt="http://exslt.org/common" @@ -32,23 +33,23 @@ </xsl:when> <xsl:when test="contains($data, '$(')"> - <xsl:call-template name="lang.highlight.ebuild.subtokenate"> - <xsl:with-param name="data" select="substring-before($data, '$(')"/> - </xsl:call-template> - <span class="PreProc">$(</span> - <xsl:call-template name="lang.highlight.ebuild.subtokenate"> - <xsl:with-param name="data" select="substring-after($data, '$(')"/> - </xsl:call-template> + <xsl:call-template name="lang.highlight.ebuild.subtokenate"> + <xsl:with-param name="data" select="substring-before($data, '$(')"/> + </xsl:call-template> + <span class="PreProc">$(</span> + <xsl:call-template name="lang.highlight.ebuild.subtokenate"> + <xsl:with-param name="data" select="substring-after($data, '$(')"/> + </xsl:call-template> </xsl:when> <xsl:when test="contains($data, '($(')"> - <xsl:call-template name="lang.highlight.ebuild.subtokenate"> - <xsl:with-param name="data" select="substring-before($data, '($(')"/> - </xsl:call-template> - <span class="PreProc">($(</span> - <xsl:call-template name="lang.highlight.ebuild.subtokenate"> - <xsl:with-param name="data" select="substring-after($data, '($(')"/> - </xsl:call-template> + <xsl:call-template name="lang.highlight.ebuild.subtokenate"> + <xsl:with-param name="data" select="substring-before($data, '($(')"/> + </xsl:call-template> + <span class="PreProc">($(</span> + <xsl:call-template name="lang.highlight.ebuild.subtokenate"> + <xsl:with-param name="data" select="substring-after($data, '($(')"/> + </xsl:call-template> </xsl:when> <xsl:when test="substring($data, string-length($data)) = ')' and not(contains($data, '('))"> @@ -59,7 +60,7 @@ </xsl:when> <xsl:when test="substring($data, 1, 1) = $lang.highlight.ebuild.qvariable-start"> - <span class="Identifier">$<xsl:value-of select="substring($data, 2)"/></span> + <span class="Identifier">$<xsl:value-of select="substring($data, 2)"/></span> </xsl:when> <xsl:when test="substring($data, 1, 1) = '(' and not(contains($data, ')'))"> @@ -75,9 +76,9 @@ <!-- Args --> <xsl:when test="contains($data, '--')"> - <xsl:call-template name="lang.highlight.ebuild.subtokenate"> - <xsl:with-param name="data" select="substring-before($data, '--')"/> - </xsl:call-template> + <xsl:call-template name="lang.highlight.ebuild.subtokenate"> + <xsl:with-param name="data" select="substring-before($data, '--')"/> + </xsl:call-template> <span class="PreProc">--</span> <xsl:variable name="cdata" select="substring-after($data, '--')"/> <xsl:choose> @@ -106,261 +107,261 @@ $data = 'done' or $data = 'make' or $data = 'echo' or $data = 'cd' or $data = 'local' or $data = 'return' or $data = 'for' or $data = 'case' or $data = 'esac' or $data = 'in' or $data = '-n' or $data = '[' or $data = ']' or $data = '-z' or $data = '-f' or $data = '<<-' or $data = '>' or $data = 'EOF'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- Default keywords --> <xsl:when test="$data = 'use' or $data = 'has_version' or $data = 'best_version' or $data = 'use_with' or $data = 'use_enable' or - $data = 'check_KV' or $data = 'keepdir' or $data = 'econf' or $data = 'die' or $data = 'einstall' or $data = 'einfo' or - $data = 'elog' or - $data = 'ewarn' or $data = 'eerror' or $data = 'diropts' or $data = 'dobin' or $data = 'docinto' or $data = 'dodoc' or - $data = 'doexe' or $data = 'dohard' or $data = 'dohtml' or $data = 'doinfo' or $data = 'doins' or $data = 'dolib' or - $data = 'dolib.a' or $data = 'dolib.so' or $data = 'doman' or $data = 'dosbin' or $data = 'dosym' or $data = 'emake' or - $data = 'exeinto' or $data = 'exeopts' or $data = 'fowners' or $data = 'fperms' or $data = 'insinto' or $data = 'insopts' or - $data = 'into' or $data = 'libopts' or $data = 'newbin' or $data = 'newexe' or $data = 'newins' or $data = 'newman' or - $data = 'newsbin' or $data = 'prepall' or $data = 'prepalldocs' or $data = 'prepallinfo' or $data = 'prepallman' or - $data = 'prepallstrip' or $data = 'has' or $data = 'unpack' or $data = 'dosed' or $data = 'into' or - $data = 'doinitd' or $data = 'doconfd' or $data = 'doenvd' or $data = 'dojar' or $data = 'domo' or $data = 'dodir' or - $data = 'ebegin' or $data = 'eend' or $data = 'newconfd' or $data = 'newdoc' or $data = 'newenvd' or $data = 'newinitd' or - $data = 'newlib.a' or $data = 'newlib.so' or $data = 'hasq' or $data = 'hasv' or $data = 'useq' or $data = 'usev'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'check_KV' or $data = 'keepdir' or $data = 'econf' or $data = 'die' or $data = 'einstall' or $data = 'einfo' or + $data = 'elog' or + $data = 'ewarn' or $data = 'eerror' or $data = 'diropts' or $data = 'dobin' or $data = 'docinto' or $data = 'dodoc' or + $data = 'doexe' or $data = 'dohard' or $data = 'dohtml' or $data = 'doinfo' or $data = 'doins' or $data = 'dolib' or + $data = 'dolib.a' or $data = 'dolib.so' or $data = 'doman' or $data = 'dosbin' or $data = 'dosym' or $data = 'emake' or + $data = 'exeinto' or $data = 'exeopts' or $data = 'fowners' or $data = 'fperms' or $data = 'insinto' or $data = 'insopts' or + $data = 'into' or $data = 'libopts' or $data = 'newbin' or $data = 'newexe' or $data = 'newins' or $data = 'newman' or + $data = 'newsbin' or $data = 'prepall' or $data = 'prepalldocs' or $data = 'prepallinfo' or $data = 'prepallman' or + $data = 'prepallstrip' or $data = 'has' or $data = 'unpack' or $data = 'dosed' or $data = 'into' or + $data = 'doinitd' or $data = 'doconfd' or $data = 'doenvd' or $data = 'dojar' or $data = 'domo' or $data = 'dodir' or + $data = 'ebegin' or $data = 'eend' or $data = 'newconfd' or $data = 'newdoc' or $data = 'newenvd' or $data = 'newinitd' or + $data = 'newlib.a' or $data = 'newlib.so' or $data = 'hasq' or $data = 'hasv' or $data = 'useq' or $data = 'usev'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- PMS keywords for EAPI4 --> <xsl:when test="$data = 'docompress' or $data = 'nonfatal'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- PMS keywords for EAPI5 --> <xsl:when test="$data = 'doheader' or $data = 'newheader' or $data = 'usex'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- PMS keywords for EAPI6 --> <xsl:when test="$data = 'eapply' or $data = 'eapply_user' or $data = 'einstalldocs' or $data = 'get_libdir' or $data = 'in_iuse'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- PMS keywords for EAPI7 --> <xsl:when test="$data = 'dostrip' or $data = 'eqawarn' or $data = 'ver_cut' or $data = 'ver_rs' or $data = 'ver_test'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- Sandbox --> <xsl:when test="$data = 'addread' or $data = 'addwrite' or $data = 'adddeny' or $data = 'addpredict'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- Recognised functions --> <xsl:when test="$data = 'pkg_nofetch' or $data = 'pkg_setup' or $data = 'src_unpack' or $data = 'src_compile' or $data = 'src_test' or - $data = 'src_install' or $data = 'pkg_preinst' or $data = 'pkg_postinst' or $data = 'pkg_prerm' or $data = 'pkg_postrm' or - $data = 'pkg_config'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'src_install' or $data = 'pkg_preinst' or $data = 'pkg_postinst' or $data = 'pkg_prerm' or $data = 'pkg_postrm' or + $data = 'pkg_config'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- Default keywords phase functions --> <xsl:when test="$data = 'default' or $data = 'default_pkg_nofetch' or $data = 'default_src_unpack' or - $data = 'default_src_prepare' or $data = 'default_src_configure' or $data = 'default_src_compile' or - $data = 'default_src_test' or $data = 'default_src_install'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'default_src_prepare' or $data = 'default_src_configure' or $data = 'default_src_compile' or + $data = 'default_src_test' or $data = 'default_src_install'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- Inherit --> <xsl:when test="$data = 'inherit'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- eutils --> <xsl:when test="$data = 'gen_usr_ldscript' or $data = 'draw_line' or $data = 'epatch' or $data = 'have_NPTL' or $data = 'get_number_of_jobs' or - $data = 'egetent' or $data = 'emktemp' or $data = 'enewuser' or $data = 'enewgroup' or $data = 'edos2unix' or - $data = 'make_desktop_entry' or $data = 'unpack_pdv' or $data = 'unpack_makeself' or $data = 'check_license' or - $data = 'cdrom_get_cds' or $data = 'cdrom_load_next' or $data = 'cdrom_locate_file_on_cd' or $data = 'strip-linguas' or - $data = 'epause' or $data = 'ebeep' or $data = 'built_with_use' or $data = 'make_session_desktop' or $data = 'domenu' or - $data = 'doicon' or $data = 'find_unpackable_file' or $data = 'unpack_pdv' or $data = 'set_arch_to_kernel' or - $data = 'set_arch_to_portage' or $data = 'preserve_old_lib' or $data = 'preserve_old_lib_notify' or $data = 'built_with_use' or - $data = 'epunt_cxx' or $data = 'dopamd' or $data = 'newpamd' or $data = 'make_wrapper'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'egetent' or $data = 'emktemp' or $data = 'enewuser' or $data = 'enewgroup' or $data = 'edos2unix' or + $data = 'make_desktop_entry' or $data = 'unpack_pdv' or $data = 'unpack_makeself' or $data = 'check_license' or + $data = 'cdrom_get_cds' or $data = 'cdrom_load_next' or $data = 'cdrom_locate_file_on_cd' or $data = 'strip-linguas' or + $data = 'epause' or $data = 'ebeep' or $data = 'built_with_use' or $data = 'make_session_desktop' or $data = 'domenu' or + $data = 'doicon' or $data = 'find_unpackable_file' or $data = 'unpack_pdv' or $data = 'set_arch_to_kernel' or + $data = 'set_arch_to_portage' or $data = 'preserve_old_lib' or $data = 'preserve_old_lib_notify' or $data = 'built_with_use' or + $data = 'epunt_cxx' or $data = 'dopamd' or $data = 'newpamd' or $data = 'make_wrapper'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- flag-o-matic --> <xsl:when test="$data = 'setup-allowed-flags' or $data = 'filter-flags' or $data = 'filter-lfs-flags' or $data = 'append-lfs-flags' or - $data = 'append-flags' or $data = 'replace-flags' or $data = 'replace-cpu-flags' or $data = 'is-flag' or $data = 'filter-mfpmath' or - $data = 'strip-flags' or $data = 'test_flag' or $data = 'test_version_info' or $data = 'strip-unsupported-flags' or - $data = 'get-flag' or $data = 'has_hardened' or $data = 'has_pic' or $data = 'has_pie' or $data = 'has_ssp_all' or $data = 'has_ssp' or - $data = 'has_m64' or $data = 'has_m32' or $data = 'replace-sparc64-flags' or $data = 'append-ldflags' or $data = 'filter-ldflags' or - $data = 'fstack-flags' or $data = 'gcc2-flags'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'append-flags' or $data = 'replace-flags' or $data = 'replace-cpu-flags' or $data = 'is-flag' or $data = 'filter-mfpmath' or + $data = 'strip-flags' or $data = 'test_flag' or $data = 'test_version_info' or $data = 'strip-unsupported-flags' or + $data = 'get-flag' or $data = 'has_hardened' or $data = 'has_pic' or $data = 'has_pie' or $data = 'has_ssp_all' or $data = 'has_ssp' or + $data = 'has_m64' or $data = 'has_m32' or $data = 'replace-sparc64-flags' or $data = 'append-ldflags' or $data = 'filter-ldflags' or + $data = 'fstack-flags' or $data = 'gcc2-flags'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- gcc --> <xsl:when test="$data = 'gcc-getCC' or $data = 'gcc-getCXX' or $data = 'gcc-fullversion' or $data = 'gcc-version' or - $data = 'gcc-major-version' or $data = 'gcc-minor-version' or $data = 'gcc-micro-version' or - $data = 'gcc-libpath' or $data = 'gcc-libstdcxx-version' or $data = 'gcc-libstdcxx-major-version' or - $data = 'gcc2-flags'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'gcc-major-version' or $data = 'gcc-minor-version' or $data = 'gcc-micro-version' or + $data = 'gcc-libpath' or $data = 'gcc-libstdcxx-version' or $data = 'gcc-libstdcxx-major-version' or + $data = 'gcc2-flags'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- libtool --> <xsl:when test="$data = 'elibtoolize' or $data = 'uclibctoolize' or $data = 'darwintoolize'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- fixheadtails --> <xsl:when test="$data = 'ht_fix_file' or $data = 'ht_fix_all'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- fdo-mime --> <xsl:when test="$data = 'fdo-mime_desktop_database_update' or $data = 'fdo-mime_mime_database_update'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- webapp --> <xsl:when test="$data = 'webapp_checkfileexists' or $data = 'webapp_import_config' or $data = 'webapp_strip_appdir' or - $data = 'webapp_strip_d' or $data = 'webapp_strip_cwd' or $data = 'webapp_configfile' or $data = 'webapp_hook_script' or - $data = 'webapp_postinst_txt' or $data = 'webapp_postupgrade_txt' or $data = 'webapp_runbycgibin' or - $data = 'webapp_serverowned' or $data = 'webapp_server_configfile' or $data = 'webapp_sqlscript' or - $data = 'webapp_src_install' or $data = 'webapp_pkg_postinst' or $data = 'webapp_pkg_setup' or - $data = 'webapp_getinstalltype' or $data = 'webapp_src_preinst' or $data = 'webapp_pkg_prerm'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'webapp_strip_d' or $data = 'webapp_strip_cwd' or $data = 'webapp_configfile' or $data = 'webapp_hook_script' or + $data = 'webapp_postinst_txt' or $data = 'webapp_postupgrade_txt' or $data = 'webapp_runbycgibin' or + $data = 'webapp_serverowned' or $data = 'webapp_server_configfile' or $data = 'webapp_sqlscript' or + $data = 'webapp_src_install' or $data = 'webapp_pkg_postinst' or $data = 'webapp_pkg_setup' or + $data = 'webapp_getinstalltype' or $data = 'webapp_src_preinst' or $data = 'webapp_pkg_prerm'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- versionator --> <xsl:when test="$data = 'get_all_version_components' or $data = 'version_is_at_least' or $data = 'get_version_components' or - $data = 'get_major_version' or $data = 'get_version_component_range' or $data = 'get_after_major_version' or - $data = 'replace_version_separator' or $data = 'replace_all_version_separators' or $data = 'delete_version_separator' or - $data = 'delete_all_version_separators'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'get_major_version' or $data = 'get_version_component_range' or $data = 'get_after_major_version' or + $data = 'replace_version_separator' or $data = 'replace_all_version_separators' or $data = 'delete_version_separator' or + $data = 'delete_all_version_separators'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- cvs --> <xsl:when test="$data = 'cvs_fetch' or $data = 'cvs_src_unpack'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- bash-completion --> <xsl:when test="$data = 'dobashcompletion' or $data = 'bash-completion_pkg_postinst' or $data = 'complete'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- vim-plugin --> <xsl:when test="$data = 'vim-plugin_src_install' or $data = 'vim-plugin_pkg_postinst' or $data = 'vim-plugin_pkg_postrm' or - $data = 'update_vim_afterscripts' or $data = 'display_vim_plugin_help'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'update_vim_afterscripts' or $data = 'display_vim_plugin_help'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- vim-doc --> <xsl:when test="update_vim_helptags"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- multilib --> <xsl:when test="$data = 'has_multilib_profile' or $data = 'get_libdir' or $data = 'get_multilibdir' or $data = 'get_libdir_override' or - $data = 'get_abi_var' or $data = 'get_abi_CFLAGS' or $data = 'get_abi_LDFLAGS' or - $data = 'get_abi_CHOST' or $data = 'get_abi_FAKE_TARGETS' or $data = 'get_abi_CDEFINE' or - $data = 'get_abi_LIBDIR' or $data = 'get_install_abis ' or $data = 'get_all_abis' or $data = 'get_all_libdirs' or - $data = 'is_final_abi' or $data = 'number_abis' or $data = 'get_ml_incdir' or $data = 'prep_ml_includes' or - $data = 'create_ml_includes' or $data = 'create_ml_includes-absolute' or $data = 'create_ml_includes-tidy_path' or - $data = 'create_ml_includes-listdirs' or $data = 'create_ml_includes-makedestdirs' or $data = 'create_ml_includes-allfiles' or - $data = 'create_ml_includes-sym_for_dir'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'get_abi_var' or $data = 'get_abi_CFLAGS' or $data = 'get_abi_LDFLAGS' or + $data = 'get_abi_CHOST' or $data = 'get_abi_FAKE_TARGETS' or $data = 'get_abi_CDEFINE' or + $data = 'get_abi_LIBDIR' or $data = 'get_install_abis ' or $data = 'get_all_abis' or $data = 'get_all_libdirs' or + $data = 'is_final_abi' or $data = 'number_abis' or $data = 'get_ml_incdir' or $data = 'prep_ml_includes' or + $data = 'create_ml_includes' or $data = 'create_ml_includes-absolute' or $data = 'create_ml_includes-tidy_path' or + $data = 'create_ml_includes-listdirs' or $data = 'create_ml_includes-makedestdirs' or $data = 'create_ml_includes-allfiles' or + $data = 'create_ml_includes-sym_for_dir'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- toolchain-funcs --> <xsl:when test="$data = 'tc-getPROG' or $data = 'tc-getAR' or $data = 'tc-getAS' or $data = 'tc-getCC' or $data = 'tc-getCXX' or $data = 'tc-getLD' or $data = 'tc-getNM' or - $data = 'tc-getRANLIB' or $data = 'tc-getF77' or $data = 'tc-getGCJ' or $data = 'tc-getBUILD_CC' or - $data = 'tc-export' or $data = 'ninj' or $data = 'tc-is-cross-compiler' or $data = 'tc-ninja_magic_to_arch' or - $data = 'tc-arch-kernel' or $data = 'tc-arch' or $data = 'tc-endian' or $data = 'gcc-fullversion' or - $data = 'gcc-version' or $data = 'gcc-major-version' or $data = 'gcc-minor-version' or $data = 'gcc-micro-version'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'tc-getRANLIB' or $data = 'tc-getF77' or $data = 'tc-getGCJ' or $data = 'tc-getBUILD_CC' or + $data = 'tc-export' or $data = 'ninj' or $data = 'tc-is-cross-compiler' or $data = 'tc-ninja_magic_to_arch' or + $data = 'tc-arch-kernel' or $data = 'tc-arch' or $data = 'tc-endian' or $data = 'gcc-fullversion' or + $data = 'gcc-version' or $data = 'gcc-major-version' or $data = 'gcc-minor-version' or $data = 'gcc-micro-version'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- cron --> <xsl:when test="$data = 'docrondir' or $data = 'docron' or $data = 'docrontab' or $data = 'cron_pkg_postinst'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- games --> <xsl:when test="$data = 'egamesconf' or $data = 'egamesinstall' or $data = 'gameswrapper' or $data = 'dogamesbin' or $data = 'dogamessbin' or $data = 'dogameslib' or - $data = 'dogameslib.a' or $data = 'dogameslib.so' or $data = 'newgamesbin' or $data = 'newgamessbin' or - $data = 'gamesowners' or $data = 'gamesperms' or $data = 'prepgamesdirs' or $data = 'gamesenv' or $data = 'games_pkg_setup' or - $data = 'games_src_compile' or $data = 'games_pkg_postinst' or $data = 'games_ut_unpack' or $data = 'games_umod_unpack' or - $data = 'games_make_wrapper'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'dogameslib.a' or $data = 'dogameslib.so' or $data = 'newgamesbin' or $data = 'newgamessbin' or + $data = 'gamesowners' or $data = 'gamesperms' or $data = 'prepgamesdirs' or $data = 'gamesenv' or $data = 'games_pkg_setup' or + $data = 'games_src_compile' or $data = 'games_pkg_postinst' or $data = 'games_ut_unpack' or $data = 'games_umod_unpack' or + $data = 'games_make_wrapper'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- subversion --> <xsl:when test="$data = 'subversion_svn_fetch' or $data = 'subversion_bootstrap' or $data = 'subversion_src_unpack'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- alternatives --> <xsl:when test="$data = 'alternatives_auto_makesym' or $data = 'alternatives_makesym' or $data = 'alternatives_pkg_postinst' or - $data = 'alternatives_pkg_postrm'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'alternatives_pkg_postrm'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- rpm --> <xsl:when test="$data = 'rpm_unpack' or $data = 'rpm_src_unpack'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- python --> <xsl:when test="$data = 'python_version' or $data = 'python_tkinter_exists' or $data = 'python_mod_exists' or $data = 'python_mod_compile' or - $data = 'python_mod_optimize' or $data = 'python_mod_cleanup' or $data = 'python_makesym' or $data = 'python_disable_pyc' or - $data = 'python_enable_pyc'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'python_mod_optimize' or $data = 'python_mod_cleanup' or $data = 'python_makesym' or $data = 'python_disable_pyc' or + $data = 'python_enable_pyc'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- check-kernel --> <xsl:when test="$data = 'check_version_h' or $data = 'get_KV_info' or $data = 'is_2_4_kernel' or $data = 'is_2_5_kernel' or $data = 'is_2_6_kernel' or - $data = 'kernel_supports_modules'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'kernel_supports_modules'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- perl-module --> <xsl:when test="$data = 'perl-module_src_prep' or $data = 'perl-module_src_compile' or $data = 'perl-module_src_test' or - $data = 'perl-module_src_install' or $data = 'perl-module_pkg_setup' or $data = 'perl-module_pkg_preinst' or - $data = 'perl-module_pkg_postinst' or $data = 'perl-module_pkg_prerm' or $data = 'perl-module_pkg_postrm' or - $data = 'perlinfo' or $data = 'fixlocalpod' or $data = 'updatepod'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'perl-module_src_install' or $data = 'perl-module_pkg_setup' or $data = 'perl-module_pkg_preinst' or + $data = 'perl-module_pkg_postinst' or $data = 'perl-module_pkg_prerm' or $data = 'perl-module_pkg_postrm' or + $data = 'perlinfo' or $data = 'fixlocalpod' or $data = 'updatepod'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- depend.apache --> <xsl:when test="$data = 'need_apache' or $data = 'need_apache1' or $data = 'need_apache2'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- apache-module --> <xsl:when test="$data = 'apache-module_pkg_setup' or $data = 'apache-module_src_compile' or - $data = 'apache-module_src_install' or $data = 'apache-module_pkg_postinst' or $data = 'acache_cd_dir' or - $data = 'apache_mod_file' or $data = 'apache_doc_magic' or $data = 'apache1_src_compile' or $data = 'apache1_src_install' or - $data = 'apache1_pkg_postinst' or $data = 'apache2_pkg_setup' or $data = 'apache2_src_compile' or - $data = 'apache1_src_install' or $data = 'apache2_pkg_postinst'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'apache-module_src_install' or $data = 'apache-module_pkg_postinst' or $data = 'acache_cd_dir' or + $data = 'apache_mod_file' or $data = 'apache_doc_magic' or $data = 'apache1_src_compile' or $data = 'apache1_src_install' or + $data = 'apache1_pkg_postinst' or $data = 'apache2_pkg_setup' or $data = 'apache2_src_compile' or + $data = 'apache1_src_install' or $data = 'apache2_pkg_postinst'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- pam --> <xsl:when test="$data = 'dopamd' or $data = 'newpamd' or $data = 'dopamsecurity' or $data = 'newpamsecurity' or $data = 'getpam_mod_dir' or - $data = 'dopammod' or $data = 'newpammod' or $data = 'pamd_mimic_system'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'dopammod' or $data = 'newpammod' or $data = 'pamd_mimic_system'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- virtualx --> <xsl:when test="$data = 'virtualmake' or $data = 'Xmake' or $data = 'Xemake' or $data = 'Xeconf'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- gnome2 --> <xsl:when test="$data = 'gnome2_src_configure' or $data = 'gnome2_src_compile' or $data = 'gnome2_src_install' or - $data = 'gnome2_gconf_install' or $data = 'gnome2_gconf_uninstal' or $data = 'gnome2_omf_fix' or - $data = 'gnome2_scrollkeeper_update' or $data = 'gnome2_pkg_postinst' or $data = 'gnome2_pkg_postrm'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + $data = 'gnome2_gconf_install' or $data = 'gnome2_gconf_uninstal' or $data = 'gnome2_omf_fix' or + $data = 'gnome2_scrollkeeper_update' or $data = 'gnome2_pkg_postinst' or $data = 'gnome2_pkg_postrm'"> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- eapi7-ver --> <xsl:when test="$data = 'ver_rs' or $data = 'ver_cut' or $data = 'ver_test'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- No match return --> @@ -385,11 +386,11 @@ <xsl:for-each select="exslt:node-set($tokenizedData)"> <xsl:variable name="myPos" select="position()"/> <xsl:variable name="quotePos" select="count(../*[@delimiter='"' and position() < $myPos])"/> - + <xsl:choose> <!-- See if we should be processing comments by now; we need to test for - two possible cases: * commentSeeker != 0 (so we have a comment), or, - * the first token is a "#" --> + two possible cases: * commentSeeker != 0 (so we have a comment), or, + * the first token is a "#" --> <xsl:when test="($commentSeeker != 0 and position() > $commentSeeker) or substring(../*[position()=1], 1, 1) = $lang.highlight.ebuild.commentChar or . = $lang.highlight.ebuild.commentChar"> <span class="Comment"><xsl:value-of select="."/></span> @@ -397,7 +398,7 @@ <!-- Highlight a quote --> <xsl:when test=". = '"'"> - <span class="Statement">"</span> + <span class="Statement">"</span> </xsl:when> <!-- If we're inside quotes stop here --> @@ -409,14 +410,14 @@ </xsl:when> <!-- Highlight functions; - @token_regexp = [^\w]+() - @pos = 1 --> + @token_regexp = [^\w]+() + @pos = 1 --> <xsl:when test="position() = 1 and substring(., string-length(.)-1) = '()'"> <span class="Special"><xsl:value-of select="."/></span> </xsl:when> <!-- Highlight variable assignments; - @regexp = [\w]=["']{...}['"] --> + @regexp = [\w]=["']{...}['"] --> <xsl:when test="contains(., '=')"> <span class="Identifier"><xsl:value-of select="substring-before(., '=')"/></span> <span class="Constant">=</span> @@ -426,18 +427,18 @@ </xsl:when> <xsl:when test=". = '{' or . = '}' or . = '\' or . = '('"> - <span class="PreProc"><xsl:value-of select="."/></span> + <span class="PreProc"><xsl:value-of select="."/></span> </xsl:when> <xsl:when test=". = '||' or . = '&&' or . = '|'"> - <span class="Statement"><xsl:value-of select="."/></span> + <span class="Statement"><xsl:value-of select="."/></span> </xsl:when> <!-- No match return --> <xsl:otherwise> <xsl:call-template name="lang.highlight.ebuild.subtokenate"> - <xsl:with-param name="data" select="."/> - </xsl:call-template> + <xsl:with-param name="data" select="."/> + </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:for-each> @@ -445,3 +446,7 @@ </xsl:stylesheet> +<!-- Local Variables: --> +<!-- indent-tabs-mode: nil --> +<!-- fill-column: 120 --> +<!-- End: --> diff --git a/xsl/lang.highlight.m4.xsl b/xsl/lang.highlight.m4.xsl index d15718b..9d75967 100644 --- a/xsl/lang.highlight.m4.xsl +++ b/xsl/lang.highlight.m4.xsl @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:str="http://exslt.org/strings" xmlns:exslt="http://exslt.org/common" @@ -40,14 +41,14 @@ <xsl:call-template name="lang.highlight.m4.subtokenate"> <xsl:with-param name="data" select="substring-after($data, '[')"/> <xsl:with-param name="nokeywords" select="$nokeywords"/> - </xsl:call-template> + </xsl:call-template> </xsl:when> <xsl:when test="substring($data, string-length($data)) = ')'"> <xsl:call-template name="lang.highlight.m4.subtokenate"> <xsl:with-param name="data" select="substring($data, 1, string-length($data)-1)"/> <xsl:with-param name="nokeywords" select="$nokeywords"/> - </xsl:call-template> + </xsl:call-template> <span class="Special">)</span> </xsl:when> @@ -55,7 +56,7 @@ <xsl:call-template name="lang.highlight.m4.subtokenate"> <xsl:with-param name="data" select="substring($data, 1, string-length($data)-2)"/> <xsl:with-param name="nokeywords" select="$nokeywords"/> - </xsl:call-template> + </xsl:call-template> <span class="Special">],</span> </xsl:when> @@ -63,7 +64,7 @@ <xsl:call-template name="lang.highlight.m4.subtokenate"> <xsl:with-param name="data" select="substring($data, 1, string-length($data)-1)"/> <xsl:with-param name="nokeywords" select="$nokeywords"/> - </xsl:call-template> + </xsl:call-template> <span class="Special">,</span> </xsl:when> @@ -81,7 +82,7 @@ $data = 'while' or $data = 'do' or $data = 'read' or $data = 'done' or $data = 'make' or $data = 'echo' or $data = 'cd' or $data = 'local' or $data = 'return' or $data = 'for' or $data = 'case' or $data = 'esac' or $data = 'in' or $data = '-n' or $data = '[' or $data = ']' or $data = '-z' or $data = '-f' or $data = '<<-' or $data = '>' or $data = 'EOF' or $data = 'test'"> - <span class="Statement"><xsl:value-of select="$data"/></span> + <span class="Statement"><xsl:value-of select="$data"/></span> </xsl:when> <!-- No match return --> @@ -101,7 +102,7 @@ <xsl:for-each select="exslt:node-set($tokenizedData)"> <xsl:variable name="myPos" select="position()"/> <xsl:variable name="quotePos" select="count(../*[@delimiter='"' and position() < $myPos])"/> - + <xsl:choose> <xsl:when test="../*[position()=1] = 'dnl'"> <span class="Comment"><xsl:value-of select="."/></span> @@ -109,7 +110,7 @@ <!-- Highlight a quote --> <xsl:when test=". = '"'"> - <span class="Statement">"</span> + <span class="Statement">"</span> </xsl:when> <!-- If we're inside quotes stop here --> @@ -123,7 +124,7 @@ </xsl:when> <!-- Highlight variable assignments; - @regexp = [\w]=["']{...}['"] --> + @regexp = [\w]=["']{...}['"] --> <xsl:when test="contains(., '=')"> <xsl:call-template name="lang.highlight.m4.subtokenate"> <xsl:with-param name="data" select="substring-before(., '=')"/> @@ -137,11 +138,16 @@ <!-- No match return --> <xsl:otherwise> <xsl:call-template name="lang.highlight.m4.subtokenate"> - <xsl:with-param name="data" select="."/> - </xsl:call-template> + <xsl:with-param name="data" select="."/> + </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:template> </xsl:stylesheet> + +<!-- Local Variables: --> +<!-- indent-tabs-mode: nil --> +<!-- fill-column: 120 --> +<!-- End: --> diff --git a/xsl/lang.highlight.make.xsl b/xsl/lang.highlight.make.xsl index dd36026..dbc082a 100644 --- a/xsl/lang.highlight.make.xsl +++ b/xsl/lang.highlight.make.xsl @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:str="http://exslt.org/strings" xmlns:exslt="http://exslt.org/common" @@ -39,7 +40,7 @@ <!-- sh grammar --> <xsl:when test="$data = '$?' or $data = '>' or $data = '$@' or $data = ':'"> - <span class="Identifier"><xsl:value-of select="$data"/></span> + <span class="Identifier"><xsl:value-of select="$data"/></span> </xsl:when> <!-- No match return --> @@ -59,7 +60,7 @@ <xsl:for-each select="exslt:node-set($tokenizedData)"> <xsl:variable name="myPos" select="position()"/> <xsl:variable name="quotePos" select="count(../*[@delimiter='"' and position() < $myPos])"/> - + <xsl:choose> <xsl:when test="../*[position()=3] = '=' and $myPos = 1"> <span class="Type"><xsl:value-of select="."/></span> @@ -67,7 +68,7 @@ <!-- Highlight a quote --> <xsl:when test=". = '"'"> - <span class="Statement">"</span> + <span class="Statement">"</span> </xsl:when> <!-- If we're inside quotes stop here --> @@ -81,7 +82,7 @@ </xsl:when> <!-- Highlight variable assignments; - @regexp = [\w]=["']{...}['"] --> + @regexp = [\w]=["']{...}['"] --> <xsl:when test="contains(., '=')"> <xsl:call-template name="lang.highlight.make.subtokenate"> <xsl:with-param name="data" select="substring-before(., '=')"/> @@ -95,11 +96,16 @@ <!-- No match return --> <xsl:otherwise> <xsl:call-template name="lang.highlight.make.subtokenate"> - <xsl:with-param name="data" select="."/> - </xsl:call-template> + <xsl:with-param name="data" select="."/> + </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:template> </xsl:stylesheet> + +<!-- Local Variables: --> +<!-- indent-tabs-mode: nil --> +<!-- fill-column: 120 --> +<!-- End: --> diff --git a/xsl/lang.highlight.sgml.xsl b/xsl/lang.highlight.sgml.xsl index 4ae5e43..bdd06b7 100644 --- a/xsl/lang.highlight.sgml.xsl +++ b/xsl/lang.highlight.sgml.xsl @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:str="http://exslt.org/strings" xmlns:exslt="http://exslt.org/common" @@ -31,11 +32,11 @@ <xsl:variable name="quotePos" select="count(../*[@delimiter='"' and position() < $myPos])"/> <xsl:variable name="tagPosOpen" select="count(../*[@delimiter='<' and position() < $myPos])"/> <xsl:variable name="tagPosClosed" select="count(../*[@delimiter='>' and position() < $myPos])"/> - + <xsl:choose> <!-- Highlight a quote --> <xsl:when test=". = '"'"> - <span class="Statement">"</span> + <span class="Statement">"</span> </xsl:when> <!-- If we're inside quotes stop here --> @@ -48,7 +49,7 @@ <xsl:when test="contains(., '=') and $tagPosOpen != $tagPosClosed"> <span class="Identifier"><xsl:value-of select="substring-before(., '=')"/></span> <span class="Constant">=</span> - <xsl:call-template name="lang.highlight.sgml.subtokenate"> + <xsl:call-template name="lang.highlight.sgml.subtokenate"> <xsl:with-param name="data" select="substring-after(., '=')"/> </xsl:call-template> </xsl:when> @@ -60,11 +61,16 @@ <!-- No match return --> <xsl:otherwise> <xsl:call-template name="lang.highlight.sgml.subtokenate"> - <xsl:with-param name="data" select="."/> - </xsl:call-template> + <xsl:with-param name="data" select="."/> + </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:template> </xsl:stylesheet> + +<!-- Local Variables: --> +<!-- indent-tabs-mode: nil --> +<!-- fill-column: 120 --> +<!-- End: --> diff --git a/xsl/str.tokenize.function.xsl b/xsl/str.tokenize.function.xsl index e588761..3c3275d 100644 --- a/xsl/str.tokenize.function.xsl +++ b/xsl/str.tokenize.function.xsl @@ -1,4 +1,4 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <!-- This is the EXSLT implementation of str:tokenize by Jeni Tennison, I've modified it to keep the tokens since we need them - plasmaroo --> @@ -12,7 +12,7 @@ xmlns="http://www.w3.org/1999/xhtml"> <func:function name="str:tokenize_plasmaroo"> - <xsl:param name="string" select="''" /> + <xsl:param name="string" select="''" /> <xsl:param name="delimiters" select="' 	
'" /> <xsl:choose> <xsl:when test="not($string)"> @@ -70,7 +70,10 @@ </xsl:call-template> <xsl:value-of select="$delimiter"/> </xsl:if> - <delimiter><xsl:attribute name="delimiter"><xsl:value-of select="$delimiter"/></xsl:attribute><xsl:value-of select="$delimiter"/></delimiter> + <delimiter> + <xsl:attribute name="delimiter"><xsl:value-of select="$delimiter"/></xsl:attribute> + <xsl:value-of select="$delimiter"/> + </delimiter> <xsl:call-template name="str:_tokenize-delimiters"> <xsl:with-param name="string" select="substring-after($string, $delimiter)"/> <xsl:with-param name="delimiters" select="$delimiters"/> @@ -86,3 +89,8 @@ </xsl:template> </xsl:stylesheet> + +<!-- Local Variables: --> +<!-- indent-tabs-mode: nil --> +<!-- fill-column: 120 --> +<!-- End: --> |