This is an example of BLE GATT Client, which receives broadcast data from BLE_Server_BME280 ( a GATT server) , then transfers values up to mbed Device Connector (cloud).

Please refer details about BLEClient_mbedDevConn below. https://github.com/soramame21/BLEClient_mbedDevConn

The location of required BLE GATT server, BLE_Server_BME280, is at here. https://developer.mbed.org/users/edamame22/code/BLE_Server_BME280/

mbed-client/mbed-client-mbed-tls/junit_xsl.xslt

Committer:
Ren Boting
Date:
2017-09-05
Revision:
2:b894b3508057
Parent:
0:29983394c6b6

File content as of revision 2:b894b3508057:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output encoding="UTF-8" indent="yes" method="html"/>
<xsl:strip-space elements="*"/>

<xsl:variable name="list"
  select="document('index.xml')/list" />

<xsl:template match="/">
    <h1>
        Unittest report
    </h1>

    <p>
        <b>
    Total tests run <xsl:value-of select="sum(document($list/entry/@name)/testsuite/@tests)"/>
    , failures: <xsl:value-of select="sum(document($list/entry/@name)/testsuite/@failures) + sum(document($list/entry/@name)/testsuite/@errors)"/>
        </b>

    <xsl:for-each select="document($list/entry/@name)" >
        <xsl:apply-templates select="testsuite"/>
    </xsl:for-each>
    </p>
</xsl:template>

<xsl:template match="testsuite">
    <h2>
        <xsl:value-of select="@name" />
    </h2>
    <table border="1" cellSpacing="0" cellPadding="10" >
    <tr>
        <th>Tests run</th>
        <th>Tests failed</th>
        <th>Other errors</th>
    </tr>
    <tr>
        <td><xsl:value-of select="@tests"/></td>
        <td><xsl:value-of select="@failures"/></td>
        <td><xsl:value-of select="@errors"/></td>
    </tr>
    </table>
    <br/>
    <table border="1" cellSpacing="0" cellPadding="10" >
    <tr>
        <th>Tests name</th>
        <th>PASS/FAIL</th>
        <th>Failing case</th>
        <th>Reason</th>
    </tr>
    <xsl:apply-templates select="testcase"/>
    </table>
</xsl:template>

<xsl:template match="testcase">
    <xsl:choose>
        <xsl:when test="failure">
            <tr><td><font color="#FF0000"><xsl:value-of select="@name" /></font></td><xsl:apply-templates select="failure"/></tr>
        </xsl:when>
        <xsl:when test="error">
            <tr><td><font color="#FF0000"><xsl:value-of select="@name" /></font></td><xsl:apply-templates select="error"/></tr>
        </xsl:when>
        <xsl:otherwise>
            <tr><td><xsl:value-of select="@name" /></td><td><font color="#00FF00">PASS</font></td><td></td><td></td></tr>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>

<xsl:template match="failure">
    <td>
        <b><font color="#FF0000">FAIL</font></b>
    </td>
    <td>
        <font color="#ff0000">
            <xsl:value-of select="@message" />
        </font>
    </td>
    <td>
        <font color="#ff0000">
            <xsl:value-of select="@type" />
        </font>
    </td>
</xsl:template>

<xsl:template match="error">
    <td>
        <b><font color="#FF0000">FAIL</font></b>
    </td>
    <td>
        <font color="#ff0000">
            <xsl:value-of select="@message" />
        </font>
    </td>
    <td>
        <font color="#ff0000">
            <xsl:value-of select="@type" />
        </font>
    </td>
</xsl:template>

</xsl:stylesheet>