Texinfo function documentation fixes and changes
commit
32ae0ec8ce
|
@ -2,7 +2,7 @@
|
||||||
<!--@comment
|
<!--@comment
|
||||||
Texinfo documentation generator for XSL stylesheets
|
Texinfo documentation generator for XSL stylesheets
|
||||||
|
|
||||||
Copyright (C) 2014 LoVullo Associates, Inc.
|
Copyright (C) 2014, 2015 LoVullo Associates, Inc.
|
||||||
|
|
||||||
This file is part of xslink.
|
This file is part of xslink.
|
||||||
|
|
||||||
|
@ -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,15 +126,25 @@
|
||||||
<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,
|
||||||
$doc,
|
$doc,
|
||||||
$xt:nl,
|
$xt:nl,
|
||||||
|
'@emph{Definition:}',
|
||||||
|
$xt:nl,
|
||||||
'@verbatim',
|
'@verbatim',
|
||||||
$xt:nl,
|
$xt:nl,
|
||||||
xt:serialize( . ),
|
xt:serialize( . ),
|
||||||
|
@ -181,8 +191,10 @@
|
||||||
<function name="xt:get-docblock" as="comment()?">
|
<function name="xt:get-docblock" as="comment()?">
|
||||||
<param name="context" as="node()" />
|
<param name="context" as="node()" />
|
||||||
|
|
||||||
<sequence select="$context/preceding-sibling::comment()[1][
|
<sequence select="( ( $context/preceding-sibling::node()[
|
||||||
xt:is-docblock( . ) ]" />
|
not( . instance of text() ) ] )
|
||||||
|
[ last() ] )
|
||||||
|
[ . instance of comment() ]" />
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue