summary: Correct rendering of externs
parent
c59ed64d4e
commit
0f88b902a9
|
@ -74,31 +74,18 @@
|
||||||
|
|
||||||
<xsl:template match="preproc:sym[ @type='cgen' ]" mode="summary:desc" priority="5">
|
<xsl:template match="preproc:sym[ @type='cgen' ]" mode="summary:desc" priority="5">
|
||||||
<xsl:variable name="parent" select="@parent" />
|
<xsl:variable name="parent" select="@parent" />
|
||||||
<xsl:variable name="sym" select="
|
<xsl:variable name="sym" select="preproc:sym-lookup( $parent )" />
|
||||||
ancestor::preproc:symtable/preproc:sym[ @name=$parent ]
|
|
||||||
" />
|
|
||||||
|
|
||||||
<xsl:apply-templates select="$sym" mode="summary:desc" />
|
<xsl:apply-templates select="$sym" mode="summary:desc" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="preproc:sym[ @type='class' ]" mode="summary:desc" priority="5">
|
<xsl:template match="preproc:sym[ @type='class' ]" mode="summary:desc" priority="5">
|
||||||
<xsl:variable name="name" select="@name" />
|
<xsl:variable name="as" select="@orig-name" />
|
||||||
<xsl:variable name="document" select="
|
|
||||||
if ( @src ) then
|
|
||||||
document( concat( @src, '.xmlo' ), . )/lv:*
|
|
||||||
else
|
|
||||||
/lv:*
|
|
||||||
" />
|
|
||||||
<xsl:variable name="class" select="
|
|
||||||
$document/lv:classify[
|
|
||||||
@as=substring-after( $name, ':class:' )
|
|
||||||
]
|
|
||||||
" />
|
|
||||||
|
|
||||||
<span class="letlist-{$class/@as}">
|
<span class="letlist-{$as}">
|
||||||
<xsl:text>"</xsl:text>
|
<xsl:text>"</xsl:text>
|
||||||
<xsl:value-of select="$class/@desc" />
|
<xsl:value-of select="@desc" />
|
||||||
<xsl:text>"</xsl:text>
|
<xsl:text>"</xsl:text>
|
||||||
<xsl:text> classification </xsl:text>
|
<xsl:text> classification </xsl:text>
|
||||||
|
|
||||||
|
@ -125,8 +112,8 @@
|
||||||
<!-- TODO: use generator in letlist-* -->
|
<!-- TODO: use generator in letlist-* -->
|
||||||
<span class="param">
|
<span class="param">
|
||||||
<xsl:text> (</xsl:text>
|
<xsl:text> (</xsl:text>
|
||||||
<a href="#:class:{$class/@as}" class="sym-ref sym-class">
|
<a href="#{@name}" class="sym-ref sym-class">
|
||||||
<xsl:value-of select="$class/@as" />
|
<xsl:value-of select="$as" />
|
||||||
</a>
|
</a>
|
||||||
<xsl:text>)</xsl:text>
|
<xsl:text>)</xsl:text>
|
||||||
</span>
|
</span>
|
||||||
|
@ -142,25 +129,12 @@
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="preproc:sym[ @type='param' ]" mode="summary:desc" priority="5">
|
<xsl:template match="preproc:sym[ @type='param' ]" mode="summary:desc" priority="5">
|
||||||
<xsl:variable name="name" select="@name" />
|
<xsl:value-of select="@desc" />
|
||||||
<xsl:variable name="document" select="
|
|
||||||
if ( @src ) then
|
|
||||||
document( concat( @src, '.xmlo' ), . )/lv:*
|
|
||||||
else
|
|
||||||
/lv:*
|
|
||||||
" />
|
|
||||||
<xsl:variable name="param" select="
|
|
||||||
$document/lv:param[
|
|
||||||
@name=$name
|
|
||||||
]
|
|
||||||
" />
|
|
||||||
|
|
||||||
<xsl:value-of select="$param/@desc" />
|
<span class="param letlist-{@name}">
|
||||||
|
|
||||||
<span class="param letlist-{$param/@name}">
|
|
||||||
<xsl:text> (</xsl:text>
|
<xsl:text> (</xsl:text>
|
||||||
<a href="#{$param/@name}" class="sym-ref sym-param">
|
<a href="#{@name}" class="sym-ref sym-param">
|
||||||
<xsl:value-of select="$param/@name" />
|
<xsl:value-of select="@name" />
|
||||||
</a>
|
</a>
|
||||||
<xsl:text>)</xsl:text>
|
<xsl:text>)</xsl:text>
|
||||||
</span>
|
</span>
|
||||||
|
@ -477,15 +451,15 @@
|
||||||
" />
|
" />
|
||||||
|
|
||||||
<ul class="let">
|
<ul class="let">
|
||||||
|
<xsl:variable name="non-lparams" as="element( preproc:sym-ref )*"
|
||||||
|
select="$deps/preproc:sym-ref[ not( @type = 'lparam' ) ]" />
|
||||||
|
<xsl:variable name="lparams" as="element( preproc:sym-ref )*"
|
||||||
|
select="$deps/preproc:sym-ref[ @type = 'lparam' ]" />
|
||||||
|
|
||||||
<!-- output a description for each dependency -->
|
<!-- output a description for each dependency -->
|
||||||
<xsl:variable name="result">
|
<xsl:variable name="result">
|
||||||
<xsl:for-each select="
|
<xsl:for-each select="for $name in $non-lparams/@name
|
||||||
/lv:*/preproc:symtable/preproc:sym[
|
return preproc:sym-lookup( $name )">
|
||||||
not( @type='lparam' )
|
|
||||||
and @name=$deps/preproc:sym-ref/@name
|
|
||||||
]
|
|
||||||
">
|
|
||||||
|
|
||||||
<xsl:call-template name="_gen-let-list-item">
|
<xsl:call-template name="_gen-let-list-item">
|
||||||
<xsl:with-param name="context" select="$context" />
|
<xsl:with-param name="context" select="$context" />
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
|
@ -493,13 +467,8 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- handle c:let formatting separately -->
|
<!-- handle c:let formatting separately -->
|
||||||
<xsl:for-each select="
|
<xsl:for-each select="for $name in $lparams/@name
|
||||||
/lv:*/preproc:symtable/preproc:sym[
|
return preproc:sym-lookup( $name )">
|
||||||
@type='lparam'
|
|
||||||
and @name=$deps/preproc:sym-ref/@name
|
|
||||||
]
|
|
||||||
">
|
|
||||||
|
|
||||||
<xsl:call-template name="_gen-let-list-item">
|
<xsl:call-template name="_gen-let-list-item">
|
||||||
<xsl:with-param name="context" select="$context" />
|
<xsl:with-param name="context" select="$context" />
|
||||||
<xsl:with-param name="class" select="'letequ'" />
|
<xsl:with-param name="class" select="'letequ'" />
|
||||||
|
|
|
@ -1584,21 +1584,11 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<!-- get class package -->
|
<!-- get class package -->
|
||||||
<xsl:variable name="src" select="
|
<xsl:variable name="sym" select="preproc:sym-lookup( $csymid )" />
|
||||||
$root/lv:*/preproc:symtable/preproc:sym[ @name=$csymid ]/@src
|
|
||||||
" />
|
|
||||||
<xsl:variable name="pkg" select="
|
|
||||||
if ( $src ) then
|
|
||||||
document( concat( $src, '.xmlo' ), $root )
|
|
||||||
else
|
|
||||||
$root
|
|
||||||
" />
|
|
||||||
|
|
||||||
<!-- output description -->
|
<!-- output description -->
|
||||||
<a href="#{$csymid}" class="sym-ref sym-class">
|
<a href="#{$csymid}" class="sym-ref sym-class">
|
||||||
<xsl:value-of select="
|
<xsl:value-of select="$sym/@desc" />
|
||||||
$pkg/lv:*/lv:classify[ @as=$cname ]/@desc
|
|
||||||
" />
|
|
||||||
</a>
|
</a>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2246,7 +2236,7 @@
|
||||||
|
|
||||||
<!-- XXX: There's a linker bug where there may be duplicate symbols in
|
<!-- XXX: There's a linker bug where there may be duplicate symbols in
|
||||||
l:dep! -->
|
l:dep! -->
|
||||||
<xsl:sequence select="$program/l:dep/preproc:sym[ @name=$name ][0]" />
|
<xsl:sequence select="$program/l:dep/preproc:sym[ @name=$name ][1]" />
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue