Nokia Networks Home

Nokia nmake Product Builder

Quick Links

Related Products

Tool Repository

[ tool index ]

targets.xsl

Lists information about the triggered targets.

Download targets.xsl

Description

targets.xsl is an XSLT script that lists data about each triggered target. Data about each target appears on a separate output line in a space separated format. Each line displays target name, execution exit code, start time, and end time. This is an example XSLT script from the Build Log Overview.

Requirements

xsltproc (available in exptools) or other XSLT processors should work. xsltproc is a widely used command available on many platforms including Linux, Solaris, Cygwin, and Windows.

Usage

xsltproc targets.xsl filename.xml

Example Command Line

xsltproc targets.xsl makelog.xml

Example Output

See the Extended Example in the Build Log Overview for details and structure of the example build used.

cmd 0 17:11:21.16 17:11:21.57
hw 0 17:11:21.22 17:11:21.53
hw.o 0 17:11:21.31 17:11:21.36
hw 0 17:11:21.38 17:11:21.43
../../../bin 0 17:11:21.45 17:11:21.46
../../../bin/hw 0 17:11:21.48 17:11:21.50

Script

The XPath expression //tg recursively finds all tg elements in the input; then the apply-templates instruction causes the xsl:template match="tg" template to run once per tg tag. See also the Build Log Overview.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="text"/>
	<xsl:variable name="nl" select="'&#xA;'"/>

	<xsl:template match="/">
		<xsl:apply-templates select="//tg"/>
	</xsl:template>
	
	<xsl:template match="tg">
		<xsl:value-of select='@nm' />
		<xsl:text> </xsl:text>
		<xsl:value-of select='@ec' />
		<xsl:text> </xsl:text>
		<xsl:value-of select='substring(@st, 12, 11)' />
		<xsl:text> </xsl:text>
		<xsl:value-of select='substring(@et, 12, 11)' />
		<xsl:value-of select='$nl'/>
	</xsl:template>
	
</xsl:stylesheet>
Last Update: Friday,12-Aug-2016 12:17:08 EDT