DIFFVER=
ZIPVER=
-DIRS=common html fo extensions
+DIRS=common html fo extensions htmlhelp javahelp
.PHONY : distrib clean doc xhtml
include Makefile.param
-all: titlepage.templates.xsl param.xsl
+all: titlepage.templates.xsl param.xsl profile-docbook.xsl
param.html: param.xml
../../cvstools/paramchk -m Makefile.param $<
Makefile.param:
../../cvstools/paramchk -m $@ param.xweb
+
+profile-docbook.xsl:
+ $(XSLT) docbook.xsl ../profiling/xsl2profile.xsl $@
include Makefile.param
-all: titlepage.templates.xsl param.xsl
+all: titlepage.templates.xsl param.xsl profile-docbook.xsl profile-chunk.xsl
xml: param.xml
Makefile.param:
../../cvstools/paramchk -m $@ param.xweb
make
+
+profile-docbook.xsl:
+ $(XSLT) docbook.xsl ../profiling/xsl2profile.xsl $@
+
+profile-chunk.xsl:
+ $(XSLT) chunk.xsl ../profiling/xsl2profile.xsl $@
../params/chapter.autolabel.xml \
../params/chunk.datafile.xml \
../params/chunk.first.sections.xml \
+ ../params/chunk.quietly.xml \
../params/chunk.section.depth.xml \
../params/chunk.toc.xml \
../params/citerefentry.link.xml \
../params/show.comments.xml \
../params/show.revisionflag.xml \
../params/spacing.paras.xml \
- ../params/stylesheet.result.type.xml \
../params/suppress.navigation.xml \
../params/table.border.color.xml \
../params/table.border.style.xml \
--- /dev/null
+XSLT=../../cvstools/saxon
+XJPARSE=../../cvstools/xjparse
+
+all: profile-htmlhelp.xsl
+
+profile-htmlhelp.xsl:
+ $(XSLT) htmlhelp.xsl ../profiling/xsl2profile.xsl $@
--- /dev/null
+XSLT=../../cvstools/saxon
+XJPARSE=../../cvstools/xjparse
+
+all: profile-javahelp.xsl
+
+profile-javahelp.xsl:
+ $(XSLT) javahelp.xsl ../profiling/xsl2profile.xsl $@
--- /dev/null
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<!-- Which OSes to select -->
+<xsl:param name="os"/>
+
+<!-- Which UserLevels to select -->
+<xsl:param name="ul"/>
+
+<!-- Which Archs to select -->
+<xsl:param name="arch"/>
+
+<!-- Name of attribute with profiling information -->
+<xsl:param name="attr"/>
+
+<!-- Which $attrs to select -->
+<xsl:param name="val"/>
+
+<!-- Seperator for profiling values -->
+<xsl:param name="sep" select="';'"/>
+
+<!-- Copy all non-element nodes -->
+<xsl:template match="@*|text()|comment()|processing-instruction()" mode="profile">
+ <xsl:copy/>
+</xsl:template>
+
+<!-- Profile elements based on input parameters -->
+<xsl:template match="*" mode="profile">
+ <xsl:variable name="os.content">
+ <xsl:if test="@os">
+ <xsl:call-template name="cross.compare">
+ <xsl:with-param name="a" select="$os"/>
+ <xsl:with-param name="b" select="@os"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="os.ok" select="not(@os) or not($os) or
+ $os.content != '' or @os = ''"/>
+
+ <xsl:variable name="ul.content">
+ <xsl:if test="@userlevel">
+ <xsl:call-template name="cross.compare">
+ <xsl:with-param name="a" select="$ul"/>
+ <xsl:with-param name="b" select="@userlevel"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="ul.ok" select="not(@userlevel) or not($ul) or
+ $ul.content != '' or @userlevel = ''"/>
+
+ <xsl:variable name="arch.content">
+ <xsl:if test="@arch">
+ <xsl:call-template name="cross.compare">
+ <xsl:with-param name="a" select="$arch"/>
+ <xsl:with-param name="b" select="@arch"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="arch.ok" select="not(@arch) or not($arch) or
+ $arch.content != '' or @arch = ''"/>
+
+ <xsl:variable name="attr.content">
+ <xsl:if test="@*[local-name()=$attr]">
+ <xsl:call-template name="cross.compare">
+ <xsl:with-param name="a" select="$val"/>
+ <xsl:with-param name="b" select="@*[local-name()=$attr]"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="attr.ok" select="not(@*[local-name()=$attr]) or not($val) or
+ $attr.content != ''
+ or @*[local-name()=$attr] = '' or not($attr)"/>
+
+ <xsl:if test="$os.ok and $ul.ok and $arch.ok and $attr.ok">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" mode="profile"/>
+ </xsl:copy>
+ </xsl:if>
+</xsl:template>
+
+<!-- Returns non-empty string if list in $b contains one ore more values from list $a -->
+<xsl:template name="cross.compare">
+ <xsl:param name="a"/>
+ <xsl:param name="b"/>
+ <xsl:param name="head" select="substring-before(concat($a, $sep), $sep)"/>
+ <xsl:param name="tail" select="substring-after($a, $sep)"/>
+ <xsl:if test="contains(concat($sep, $b, $sep), concat($sep, $head, $sep))">1</xsl:if>
+ <xsl:if test="$tail">
+ <xsl:call-template name="cross.compare">
+ <xsl:with-param name="a" select="$tail"/>
+ <xsl:with-param name="b" select="$b"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
+
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xslo="http://www.w3.org/1999/XSL/TransformAlias"
+ version="1.0">
+
+<xsl:include href="../lib/lib.xsl"/>
+
+<xsl:output method="xml" encoding="US-ASCII"/>
+
+<xsl:namespace-alias stylesheet-prefix="xslo" result-prefix="xsl"/>
+
+<xsl:preserve-space elements="*"/>
+
+<xsl:template match="/">
+ <xsl:text> </xsl:text>
+ <xsl:comment>This file was created automatically by xml2profile</xsl:comment>
+ <xsl:text> </xsl:text>
+ <xsl:comment>from the DocBook XSL stylesheets. Do not edit this file.</xsl:comment>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text> </xsl:text>
+</xsl:template>
+
+<!-- Make sure we override some templates and parameters appropriately for XHTML -->
+<xsl:template match="xsl:stylesheet">
+ <xsl:copy>
+ <xsl:attribute name="exslt:dummy" xmlns:exslt="http://exslt.org/common">dummy</xsl:attribute>
+ <xsl:if test="not(@extension-element-prefixes)">
+ <xsl:attribute name="extension-element-prefixes">exslt</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="not(@exclude-result-prefixes)">
+ <xsl:attribute name="exclude-result-prefixes">exslt</xsl:attribute>
+ </xsl:if>
+ <xsl:for-each select="@*">
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'extension-element-prefixes' or
+ local-name(.) = 'exclude-result-prefixes'">
+ <xsl:attribute name="{local-name(.)}"><xsl:value-of select="concat(., ' exslt')"/></xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="{local-name(.)}"><xsl:value-of select="."/></xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:apply-templates/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="comment()|processing-instruction()|text()">
+ <xsl:copy/>
+</xsl:template>
+
+<xsl:template match="xsl:template[@match='/' or @name='hhc-main' or @name='hhp-main']">
+ <xsl:if test="@match='/'">
+ <xslo:include href="../profiling/profile-mode.xsl"/>
+ </xsl:if>
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xslo:variable name="profiled-content">
+ <xslo:apply-templates select="." mode="profile"/>
+ </xslo:variable>
+ <xslo:variable name="profiled-nodes" select="exslt:node-set($profiled-content)"/>
+
+ <xsl:apply-templates mode="correct"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="*[@select='/']" mode="correct">
+ <xsl:copy>
+ <xsl:for-each select="@*">
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'select' and string(.) = '/'">
+ <xsl:attribute name="{local-name(.)}">$profiled-nodes</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="{local-name(.)}"><xsl:value-of select="."/></xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:apply-templates mode="correct"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match='*[contains(@*, "key('id',$rootid)")]' mode="correct">
+ <xsl:copy>
+ <xsl:for-each select="@*">
+ <xsl:choose>
+ <xsl:when test='contains(., "key('id',$rootid)")'>
+ <xsl:attribute name="{local-name(.)}">
+ <xsl:call-template name="string.subst">
+ <xsl:with-param name="string" select="."/>
+ <xsl:with-param name="target">key('id',$rootid)</xsl:with-param>
+ <xsl:with-param name="replacement">$profiled-nodes//*[@id=$rootid]</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="{local-name(.)}"><xsl:value-of select="."/></xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:apply-templates mode="correct"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="*" mode="correct">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="correct"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="comment()|processing-instruction()|text()" mode="correct">
+ <xsl:copy/>
+</xsl:template>
+
+</xsl:stylesheet>
include ../../cvstools/Makefile.incl
-all: xslfiles
+all: xslfiles profile-docbook.xsl profile-chunk.xsl
include xslfiles.gen
xslfiles.list: .cvsignore
echo -n "xslfiles: " > xslfiles.gen
for f in `cat .cvsignore`; do \
- if [ "$$f" != ".cvsignore" -a "$$f" != "xslfiles.gen" ]; then \
+ if [ "$$f" != ".cvsignore" -a "$$f" != "xslfiles.gen" \
+ -a "$$f" != "profile-docbook.xsl" -a "$$f" != "profile-chunk.xsl" ]; then \
echo -n `basename $$f`; \
if [ "$$f" != "xref.xsl" ]; then \
echo " \\"; \
done >> xslfiles.gen
echo "" >> xslfiles.gen
for f in `cat .cvsignore`; do \
- if [ "$$f" != ".cvsignore" -a "$$f" != "xslfiles.gen" ]; then \
+ if [ "$$f" != ".cvsignore" -a "$$f" != "xslfiles.gen" \
+ -a "$$f" != "profile-docbook.xsl" -a "$$f" != "profile-chunk.xsl" ]; then \
echo `basename $$f`: ../html/`basename $$f`; \
echo -n " $$"; \
echo -n "(XSLT) "; \
#%.xsl: html2xhtml.xsl
# $(XSLT) ../html/$@ html2xhtml.xsl $@
+
+profile-docbook.xsl:
+ $(XSLT) docbook.xsl ../profiling/xsl2profile.xsl $@
+
+profile-chunk.xsl:
+ $(XSLT) chunk.xsl ../profiling/xsl2profile.xsl $@