Quantcast
Channel: SCN: Message List - SAP Manufacturing Integration and Intelligence (SAP MII)
Viewing all articles
Browse latest Browse all 4841

XML content not displaying in an html table

$
0
0

XML content created from an SAP MII Transactions not displaying in an html table.

 

Here is a sample:

 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<?xml-stylesheet type="text/xsl" href="Projects_Status.xslt"?>

<Rowsets CachedTime="" DateCreated="2014-05-12T10:31:48" EndDate="2014-05-12T10:31:48" StartDate="2014-05-12T09:31:48" Version="14.0 SP4 Patch 1 (Jan 8, 2014)">

    <Rowset>

        <Columns>

            <Column Description="Jobs Name" MaxRange="100" MinRange="0" Name="Jobs" SQLDataType="12" SourceColumn="Jobs"/>

            <Column Description="Job Status in percentage" MaxRange="100" MinRange="0" Name="Status" SQLDataType="4" SourceColumn="Status"/>

            <Column Description="" MaxRange="100" MinRange="0" Name="PercentComplete" SQLDataType="4" SourceColumn="PercentComplete"/>

            <Column Description="Date in ascending order" MaxRange="100" MinRange="0" Name="StartDate" SQLDataType="93" SourceColumn="StartDate"/>

            <Column Description="" MaxRange="100" MinRange="0" Name="EndDate" SQLDataType="12" SourceColumn="EndDate"/>

        </Columns>

 

        <Row>

            <Jobs>BOD - 9212</Jobs>

            <Status>1</Status>

            <PercentComplete>NA</PercentComplete>

            <StartDate>2014-01-01T10:00:00</StartDate>

            <EndDate>06/01/2014 10:00:00</EndDate>

        </Row>

 

Notice in the second line above I hooked up the xml with an xslt style sheet - Projects_Status.xslt

 

<?xml version="1.0" encoding="UTF-8"?>

 

<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 

<xsl:template match="/">

   <html>

   <body>

   <h2></h2>

   <table border="1">

     <tr bgcolor="">

       <th>Jobs</th>

       <th>Status</th>

       <th>PercentComplete</th>

       <th>StartDate</th>

       <th>EndDate</th>

     </tr>

     <xsl:for-each select="jobs">

     <tr>

       <td><xsl:value-of select="Jobs"/></td>

       <td><xsl:value-of select="Status"/></td>

       <td><xsl:value-of select="PercentComplete"/></td>

       <td><xsl:value-of select="StartDate"/></td>

       <td><xsl:value-of select="EndDate"/></td>

     </tr>

     </xsl:for-each>

   </table>

   </body>

   </html>

</xsl:template>

 

</xsl:stylesheet>

 

 

But when I try to display the XML file in a browser I only get the heading

 


Viewing all articles
Browse latest Browse all 4841

Trending Articles