[Mono-docs-list] XSL patch for versioning

Joshua Tauberer tauberer at for.net
Thu Jun 16 12:04:36 EDT 2005


There's probably a one-liner that'll do the job 
(ancestor-or-self:*/Doc/since[position()=1] -- haven't tested it, it 
might pick out the wrong one), but the way you have it is clear.

Do you edit the since tags manually?  It would be nice to pick up the 
information either from attributes on types/members, or else by 
monodocer adding it when it adds members (subject to some command line 
args specifying the current version number).

On an unrelated note, for anyone reading this far, does anyone mind if I 
get monodocer using Cecil instead of reflection?  This should 
(eventually at least) let monodocer pick up security attributes as well 
as what exceptions are thrown (by disassembling methods).

-- 
- Joshua Tauberer

http://taubz.for.net

** Nothing Unreal Exists **

Mike Kestner wrote:
> The attached patch causes members without <since> elements to use the
> parent type's <since> element.  This is desirable behavior as otherwise
> every member of a "new" type has to carry a redundant <since> element.
> 
> Based on my complete ignorance of XSL, it's likely there is a cleaner
> way to do this, but this patch seems to accomplish the desired behavior.
> I await the feedback of the XSL masters.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: mono-ecma.xsl
> ===================================================================
> --- mono-ecma.xsl	(revision 45981)
> +++ mono-ecma.xsl	(working copy)
> @@ -547,7 +547,14 @@
>  
>  				<!-- summary -->
>  				
> -				<xsl:apply-templates select="Docs/since" />
> +				<xsl:variable name="since" select="Docs/since" />
> +
> +				<xsl:if test="$since">
> +					<xsl:apply-templates select="Docs/since" />
> +				</xsl:if>
> +				<xsl:if test="not($since)">
> +					<xsl:apply-templates select="/Type/Docs/since" />
> +				</xsl:if>
>  				
>  				<p>
>  					<xsl:apply-templates select="Docs/summary" mode="notoppara"/>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Mono-docs-list maillist  -  Mono-docs-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-docs-list




More information about the Mono-docs-list mailing list