Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save finetjul/5446359 to your computer and use it in GitHub Desktop.
Save finetjul/5446359 to your computer and use it in GitHub Desktop.
Add description to "parameters" xml element Add 2 levels "parameters".
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes" encoding="UTF-8"/>
<xsl:template name="newline"><xsl:text>&#10;</xsl:text></xsl:template>
<xsl:template match="/executable">
<xsl:for-each select="parameters">
<xsl:text>* '''</xsl:text><xsl:value-of select="label"/>'''<xsl:text>: </xsl:text><xsl:value-of select="description"/><xsl:call-template name="newline"/>
<xsl:for-each select="*[descendant::label]">
<xsl:text>** '''</xsl:text><xsl:value-of select="label"/>'''<xsl:text>: </xsl:text><xsl:value-of select="description"/><xsl:call-template name="newline"/>
<xsl:for-each select="*[descendant::label]">
<xsl:text>*** '''</xsl:text><xsl:value-of select="label"/>'''<xsl:text>: </xsl:text><xsl:value-of select="description"/><xsl:call-template name="newline"/>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:transform>
@finetjul
Copy link
Author

@jcfr, can you please integrate those changes into slicer.org wiki ?
This should display correctly the updated (r21908) doc of Models: http://www.slicer.org/slicerWiki/index.php?title=Documentation/Nightly/Modules/Models
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment