use xslt!

This commit is contained in:
2023-04-09 01:06:01 +02:00
parent c7b85862e6
commit 3a162f4568
10 changed files with 238 additions and 227 deletions

View File

@ -5,15 +5,19 @@
version="1.1">
<xsl:output method="text" encoding="UTF-8" indent="yes" />
<xsl:param name="site" />
<xsl:param name="network" />
<xsl:template match="nmaprun">
<xsl:text>---
</xsl:text>
<xsl:value-of select="substring-after(@args, '&quot; ')" />:
<xsl:value-of select="$site" />:
<xsl:text> </xsl:text><xsl:value-of select="$network" />:
<xsl:apply-templates select="host"/>
</xsl:template>
<xsl:template match="host">
<xsl:text> </xsl:text>
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="hostnames/hostname/@name"><xsl:value-of select="hostnames/hostname/@name" /></xsl:when>
<xsl:otherwise> <xsl:value-of select="address/@addr" /></xsl:otherwise>