4e69d6e9a8300d090155b27903a7321275c16a2f
[transportpce.git] / tests / honeynode / 1.2.1 / honeynode-plugin-impl / src / main / resources / honeycomb-minimal-resources / config / device / octerminaldeviceOperToConfig.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:d="urn:ietf:params:xml:ns:netconf:base:1.0"
5 xmlns:n="urn:ietf:params:xml:ns:netmod:notification"
6 xmlns:ood="http://org/openroadm/device"
7 xmlns:ocp="http://openconfig.net/yang/platform"
8 xmlns:octd="http://openconfig.net/yang/terminal-device">
9
10   <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
11
12   <xsl:template match="d:data/octd:terminal-device">
13     <xsl:element name="config" namespace="urn:ietf:params:xml:ns:netconf:base:1.0">
14     <xsl:element name="terminal-device" namespace="http://openconfig.net/yang/terminal-device">
15       <xsl:for-each select="*">
16         <xsl:apply-templates select="." />
17       </xsl:for-each>
18     </xsl:element>
19     </xsl:element>
20   </xsl:template>
21
22   <xsl:template match="*">
23     <xsl:if test="name(.) != 'state'">
24     <xsl:copy>
25       <xsl:for-each select="@*"><xsl:copy-of select="."></xsl:copy-of></xsl:for-each>
26         <xsl:choose>
27           <xsl:when test="name(.) = 'state'"></xsl:when>
28           <xsl:otherwise><xsl:apply-templates select="node()" /></xsl:otherwise>
29         </xsl:choose>
30     </xsl:copy>
31     </xsl:if>
32   </xsl:template>
33
34   <xsl:template match="d:data">
35     <xsl:apply-templates />
36   </xsl:template>
37
38   <xsl:template match="d:data/ocp:components">
39     <xsl:apply-templates />
40   </xsl:template>
41
42   </xsl:stylesheet>