diff options
author | Shaun McCance <shaunm@gnome.org> | 2012-01-24 08:52:21 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2012-01-24 08:52:21 -0500 |
commit | 32bdff8bca0f28b612b1a24eb5286623cc429033 (patch) | |
tree | 1ea0d5443efeab654b6e02198fab17421ec7a5b8 /doc | |
parent | 38fcaf1f2a6692213da9ad42c49cccdccfc2447b (diff) | |
download | yelp-xsl-32bdff8bca0f28b612b1a24eb5286623cc429033.tar.gz |
Fixed some errors in the documentation
Diffstat (limited to 'doc')
-rw-r--r-- | doc/yelp-xsl/xsldoc-scan.awk | 5 | ||||
-rw-r--r-- | doc/yelp-xsl/xsldoc-scan.xsl | 27 |
2 files changed, 23 insertions, 9 deletions
diff --git a/doc/yelp-xsl/xsldoc-scan.awk b/doc/yelp-xsl/xsldoc-scan.awk index a6f5034a..14c19047 100644 --- a/doc/yelp-xsl/xsldoc-scan.awk +++ b/doc/yelp-xsl/xsldoc-scan.awk @@ -143,6 +143,11 @@ cur_block = ""; } # One-line comments to mark things private +/<\!--\#\!.*-->/ { + split($0, a); + printf "<?xslt-private %s?>\n", a[2]; + next; +} /<\!--\#\*.*-->/ { split($0, a); printf "<?xslt-private %s?>\n", a[2]; diff --git a/doc/yelp-xsl/xsldoc-scan.xsl b/doc/yelp-xsl/xsldoc-scan.xsl index 160103c4..7936e996 100644 --- a/doc/yelp-xsl/xsldoc-scan.xsl +++ b/doc/yelp-xsl/xsldoc-scan.xsl @@ -78,7 +78,10 @@ free software. <xsl:param name="page"/> <xsl:param name="xslt_node"/> <xsl:for-each select="$xslt_node"> - <xsl:variable name="calls_templates" select="set:distinct(.//xsl:call-template[not(@name = $xslt_node//xsl:template/@name)]/@name)"/> + <xsl:variable name="calls_templates" select="set:distinct(.//xsl:call-template[ + not(@name = $xslt_node//xsl:template/@name) and + not($page/processing-instruction('xslt-private')[string(.) = @name]) + ]/@name)"/> <xsl:if test="count($calls_templates) > 0"> <list style="compact"> <title>Calls Templates</title> @@ -135,17 +138,21 @@ free software. <xsl:copy-of select="mal:info/*[not(self::mal:desc) and not(self::mal:revision)]"/> <!-- xslt-includes --> <xsl:for-each select="$xslt_file//xsl:include"> + <xsl:variable name="base" select="substring-before(str:split(@href, '/')[last()], '.xsl')"/> <xsl:choose> + <xsl:when test="$page/processing-instruction('xslt-private')[string(.) = $base]"/> <xsl:when test="processing-instruction('pass')"> <xsl:for-each select="document(@href, /)//xsl:include"> - <xsl:variable name="id" select="translate(substring-before(str:split(@href, '/')[last()], - '.xsl'), '.', '_')"/> - <link type="topic" xref="{$id}" group="S"/> + <xsl:variable name="subpage" select="/mal:page"/> + <xsl:variable name="subbase" select="substring-before(str:split(@href, '/')[last()], '.xsl')"/> + <xsl:if test="not($subpage/processing-instruction('xslt-private')[string(.) = $subbase])"> + <xsl:variable name="id" select="translate($subbase, '.', '_')"/> + <link type="topic" xref="{$id}" group="S"/> + </xsl:if> </xsl:for-each> </xsl:when> <xsl:otherwise> - <xsl:variable name="id" select="translate(substring-before(str:split(@href, '/')[last()], - '.xsl'), '.', '_')"/> + <xsl:variable name="id" select="translate($base, '.', '_')"/> <link type="topic" xref="{$id}" group="S"/> </xsl:otherwise> </xsl:choose> @@ -160,9 +167,11 @@ free software. </xsl:for-each> <!-- xslt-implements-mode --> <xsl:for-each select="set:distinct($xslt_file//xsl:template/@mode)"> - <!-- FIXME: xslt-private --> - <xsl:variable name="id" select="concat('M__', translate(., '.', '_'))"/> - <link type="xslt-implements-mode" xref="{$id}"/> + <xsl:variable name="mode" select="string(.)"/> + <xsl:if test="not($page/processing-instruction('xslt-private')[string(.) = $mode])"> + <xsl:variable name="id" select="concat('M__', translate($mode, '.', '_'))"/> + <link type="xslt-implements-mode" xref="{$id}"/> + </xsl:if> </xsl:for-each> <!-- xslt-defines-param --> <xsl:for-each select="$xslt_file/xsl:param/@name"> |