diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-07-25 15:00:23 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-07-25 17:35:52 +0200 |
commit | e89ad6d1dd9a2d5c0841358eb76e2a4ad9606f4b (patch) | |
tree | 9066c51cee43319bd57fe78ef944033c2b19a9db /doc | |
parent | c9b3e06d99f21f580afe29de634589785494e87e (diff) |
vty: Use UTF-8 for the encoding and the ability to hide nodes
There are certain nodes one might not want to document and the
additional information can decide to hide the node.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/vty/merge_doc.xsl | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/doc/vty/merge_doc.xsl b/doc/vty/merge_doc.xsl index 6e1bab1d..c4e05203 100644 --- a/doc/vty/merge_doc.xsl +++ b/doc/vty/merge_doc.xsl @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vty="urn:osmocom:xml:libosmocore:vty:doc:1.0"> - <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes" /> - <xsl:variable name="with" select="'additions.xml'" /> + <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" /> + <xsl:template match="@*|node()"> <xsl:copy> @@ -13,13 +13,15 @@ <!-- Copy the name of the node --> <xsl:template match="vty:node"> - <xsl:copy> - <xsl:apply-templates select="@*|node()" /> - <xsl:variable name="info" select="document($with)/vty:vtydoc/vty:node[@id=current()/@id]/." /> - <xsl:for-each select="$info/vty:name"> - <xsl:copy-of select="." /> - </xsl:for-each> - </xsl:copy> + <xsl:variable name="info" select="document($with)/vty:vtydoc/vty:node[@id=current()/@id]/." /> + <xsl:if test="not($info/vty:hide)"> + <xsl:copy> + <xsl:apply-templates select="@*|node()" /> + <xsl:for-each select="$info/*"> + <xsl:copy-of select="." /> + </xsl:for-each> + </xsl:copy> + </xsl:if> </xsl:template> |