You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
750 B
25 lines
750 B
<?xml version="1.0" ?>
|
|
<xsl:stylesheet version="1.0"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
<xsl:output omit-xml-declaration="yes" indent="yes"/>
|
|
|
|
<!-- Target portgroup -->
|
|
<xsl:param name="portgroup" select="'lab48'"/>
|
|
|
|
<!-- XSLT Identity template -->
|
|
<xsl:template match="node()|@*">
|
|
<xsl:copy>
|
|
<xsl:apply-templates select="node()|@*"/>
|
|
</xsl:copy>
|
|
</xsl:template>
|
|
|
|
<!-- Put the NIC in the desired portgroup -->
|
|
<xsl:template match="/domain/devices/interface/source">
|
|
<xsl:copy>
|
|
<xsl:apply-templates select="@*|node()"/>
|
|
<xsl:attribute name="portgroup">
|
|
<xsl:value-of select="$portgroup"/>
|
|
</xsl:attribute>
|
|
</xsl:copy>
|
|
</xsl:template>
|
|
</xsl:stylesheet>
|