1
0
Fork 0

Account for parity in Texinfo function anchor

master
Mike Gerwitz 2015-09-28 23:58:59 -04:00
parent 30daa3c1d9
commit 88b1a9ba49
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
1 changed files with 12 additions and 4 deletions

View File

@ -111,8 +111,8 @@
@code{xs:sequence()}. Parameters are output in a style consistent @code{xs:sequence()}. Parameters are output in a style consistent
with the XPath specification. with the XPath specification.
An anchor will also be generated using the namespace prefix and An anchor will also be generated using the name and (for functions) arity,
local name, which allows for easy and intuitive referencing. which allows for easy and intuitive referencing.
--> -->
<template mode="xt:doc-gen" priority="5" <template mode="xt:doc-gen" priority="5"
match="xsl:template|xsl:function"> match="xsl:template|xsl:function">
@ -126,10 +126,18 @@
<variable name="type" as="xs:string" <variable name="type" as="xs:string"
select="if ( @as ) then @as else 'xs:sequence*'" /> select="if ( @as ) then @as else 'xs:sequence*'" />
<variable name="anchor" as="xs:string"
select="if ( . instance of element( xsl:function ) ) then
concat( @name, ':', count( xsl:param ) )
else
@name" />
<value-of select="concat( <value-of select="concat(
$xt:nl, $xt:nl,
'@anchor{', @name, '}', ( if ( not( $anchor = '' ) ) then
$xt:nl, concat( '@anchor{', $anchor, '}', $xt:nl )
else
'' ),
'@deftypefn ', name(), ' {', $type, '} ', '@deftypefn ', name(), ' {', $type, '} ',
@name, ' (', $param-str, ')', @name, ' (', $param-str, ')',
$xt:nl, $xt:nl,