1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
2 <xsl:template match="*/*/*" name="nodes">
3 <xsl:element name="{local-name()}">
4 <xsl:apply-templates select="@*|node()" />
7 <xsl:template match="*/*/*/*">
8 <xsl:if test="not(name(.)='type' or name(.)='lldp' or name(.)='ethernet' or name(.)='ots')">
9 <xsl:element name="{local-name()}">
10 <xsl:apply-templates select="@*|node()" />
13 <xsl:if test="name(.)='type'" xmlns="http://org/openroadm/device">
14 <type xmlns:openROADM-if="http://org/openroadm/interfaces">
15 <xsl:apply-templates select="@*|node()"/>
18 <xsl:if test="name(.)='ots'">
19 <ots xmlns="http://org/openroadm/optical-transport-interfaces">
20 <xsl:apply-templates select="@*|node()"/>
23 <xsl:if test="name(.)='lldp'">
24 <lldp xmlns="http://org/openroadm/lldp">
25 <xsl:apply-templates select="@*|node()"/>
28 <xsl:if test="name(.)='ethernet'">
29 <ethernet xmlns="http://org/openroadm/ethernet-interfaces">
30 <xsl:apply-templates select="@*|node()"/>
34 <xsl:template match="/">
35 <org-openroadm-device xmlns="http://org/openroadm/device">
36 <xsl:apply-templates select="*"/>
37 </org-openroadm-device>