Using Analyze
Using Analyze
For the next example look at the Interface below. It is a simple file pickup of an XML file which is then changed via an XSLT into an HTML file.
The two Analyze Wiretaps will send a complete copy of the message at that point in the flow to the Analyze database corresponding with the agent this flow is installed on.
The file will be picked up from the in directory and stored in the out directory as an HTML file.
The next XML file is loaded into the in directory:
<?xml version="1.0" encoding="UTF-8" ?>
<Customers>
<Customer>
<first_name>Edward</first_name>
<last_name>Evans</last_name>
<full_name>Edward Evans</full_name>
<phone>503-310-3671</phone>
<address>1 A ST</address>
<city>JOHNSTON</city>
</Customer>
</Customers>
The output looks like this:
<html>
<body>
<Customer>
<first_name>Edward</first_name>
<last_name>Evans</last_name>
<full_name>Edward Evans</full_name>
<phone>503-310-3671</phone>
<address>1 A ST</address>
<city>JOHNSTON</city>
</Customer>
</body>
</html>
For demonstration puposes we sent more than one file through the flow.
The XSL file looks like this:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes"/>
<xsl:strip-space elements="*"/>
<!-- Identity transform -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="/Customers">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="para">
<p>
<xsl:apply-templates select="@*|node()"/>
</p>
</xsl:template>
<xsl:template match="link">
<a>
<xsl:apply-templates select="@*|node()"/>
</a>
</xsl:template>
</xsl:stylesheet>