Proper handling of non-docblock comments
parent
4b51d40bb5
commit
ef7d968fe0
|
@ -40,7 +40,8 @@
|
||||||
-->
|
-->
|
||||||
<template match="xsl:stylesheet|xsl:transform">
|
<template match="xsl:stylesheet|xsl:transform">
|
||||||
<apply-templates mode="xt:doc-gen"
|
<apply-templates mode="xt:doc-gen"
|
||||||
select="preceding-sibling::comment()|*" />
|
select="preceding-sibling::comment()
|
||||||
|
|node()" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,6 +106,22 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Determine whether the given comment node is a docblock
|
||||||
|
-->
|
||||||
|
<function name="xt:is-docblock" as="xs:boolean">
|
||||||
|
<param name="node" as="comment()" />
|
||||||
|
|
||||||
|
<variable name="next" as="node()?"
|
||||||
|
select="($node/following-sibling::*
|
||||||
|
|$node/following-sibling::comment())[ 1 ]" />
|
||||||
|
|
||||||
|
<!-- FIXME: this will be a maintenance burden -->
|
||||||
|
<sequence select="$next instance of element( xsl:template )
|
||||||
|
or $next instance of element( xsl:function )" />
|
||||||
|
</function>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Echo comment blocks
|
Echo comment blocks
|
||||||
|
|
||||||
|
@ -124,6 +141,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Ignore docblock comments (handled in respective templates)
|
||||||
|
-->
|
||||||
|
<template mode="xt:doc-gen" priority="7"
|
||||||
|
match="comment()[ xt:is-docblock( . ) ]" />
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Generate typed parameter list from @var{params}
|
Generate typed parameter list from @var{params}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue