Holger Hans Peter Freyther | 8297c81 | 2011-11-18 23:14:24 +0100 | [diff] [blame^] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
| 2 | <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 3 | xmlns:vty="urn:osmocom:xml:libosmocore:vty:doc:1.0"> |
| 4 | <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes" /> |
| 5 | <xsl:variable name="with" select="'additions.xml'" /> |
| 6 | |
| 7 | <xsl:template match="@*|node()"> |
| 8 | <xsl:copy> |
| 9 | <xsl:apply-templates select="@*|node()" /> |
| 10 | </xsl:copy> |
| 11 | </xsl:template> |
| 12 | |
| 13 | |
| 14 | <!-- Copy the name of the node --> |
| 15 | <xsl:template match="vty:node"> |
| 16 | <xsl:copy> |
| 17 | <xsl:apply-templates select="@*|node()" /> |
| 18 | <xsl:variable name="info" select="document($with)/vty:vtydoc/vty:node[@id=current()/@id]/." /> |
| 19 | <xsl:for-each select="$info/vty:name"> |
| 20 | <xsl:copy-of select="." /> |
| 21 | </xsl:for-each> |
| 22 | </xsl:copy> |
| 23 | </xsl:template> |
| 24 | |
| 25 | |
| 26 | <!-- Copy command and add nodes --> |
| 27 | <xsl:template match="vty:command"> |
| 28 | <xsl:copy> |
| 29 | <xsl:apply-templates select="@*|node()" /> |
| 30 | <xsl:variable name="info" select="document($with)/vty:vtydoc/vty:node[@id=current()/../@id]/vty:command[@id=current()/@id]/." /> |
| 31 | <xsl:for-each select="$info/*"> |
| 32 | <xsl:copy-of select="." /> |
| 33 | </xsl:for-each> |
| 34 | </xsl:copy> |
| 35 | </xsl:template> |
| 36 | </xsl:transform> |
| 37 | |