2 Replies Latest reply on Mar 8, 2011 2:35 PM by 828172

    Reporting tools and XMLType data

      Looking for a reporting tool that will allow business users troubleshooting data issue the capability of writing reports against tables that have data in XMLType columns without requiring that the users be able to fluently read XML. All help appreciated.

        • 1. Re: Reporting tools and XMLType data

          Not a ready-to-use tool, but you may use XSLT to transform the XML content into a user-friendly HTML report.

          Here's an example :

          From this XML document :
            <department name="Administration">
              <employee id="200">
            <department name="Marketing">
              <employee id="201">
              <employee id="202">
            <department name="Purchasing">
              <employee id="114">
           <!-- ... more elements here -->
            <department name="Accounting">
              <employee id="205">
              <employee id="206">
          with this XSL stylesheet :
          <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
          <xsl:output method="html"/>
          <xsl:template match="/">
                 <style type="text/css">
              table {border: 1px solid black; border-collapse: collapse;}
              td,th {border: 1px solid black; padding: 3px;}
                  <h1>Contents : </h1>
                   <xsl:for-each select="/departments/department">
                     <a href="#{generate-id(@name)}"><xsl:value-of select="@name"/></a>
          <xsl:template match="department">
           <h2 id="{generate-id(@name)}"><xsl:value-of select="@name"/></h2>
             <xsl:for-each select="employee[1]/*">
              <th><xsl:value-of select="translate(name(),'_',' ')"/></th>
          <xsl:template match="employee">
          <xsl:template match="employee/*">
           <td><xsl:value-of select="."/></td>
          we get this : Sample HTML report
          1 person found this helpful
          • 2. Re: Reporting tools and XMLType data
            Interesting thought. Will think about it and if it works for our user community. Thanks for the response and the sample page!