jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <li.g...@hrdc-drhc.gc.ca>
Subject Cactus report transform problem
Date Tue, 10 Feb 2004 16:46:31 GMT
HI All,

When I was trying to use the cactus-report.xsl to transform the cactus test report, I got
an error saying:

javax.xml.transform.TransformerConfigurationException: XSL-1000: (Fatal Error) Error while
parsing XSL file (null).

So I tried to replace the xsl with following
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:variable name="indent" select="3" />
<xsl:variable name="spaces" select="'                 '" />

<xsl:template match="*">
   <xsl:variable name="varspaces" select="substring($spaces,1,count(ancestor::node()) *$indent)"/>
   <xsl:value-of select="$varspaces" />
      <xsl:copy-of select="@*" />
	<xsl:when test="*">
          <xsl:apply-templates />
   	  <xsl:value-of select="concat('&#x0A;   ', $varspaces)" />
	  <xsl:value-of select="normalize-space()"/>

<xsl:template match="comment()|processing-instruction()">
   <xsl:copy />


And I got following XML source:
<?xml version = '1.0'?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>   
  <testsuite name="TestAddPrintJobCommand" tests="1" failures="0" errors="0" time="0.541">
   <testcase name="testAddPrintJobOK" time="0.4"/>

then I replaced the test.xsl with cactus-report.xsland  tried to transform this again using
XML Spy, everthing is working fine, I got a perfect report. I'm just wondering what's wrong,
do I missing anything?

Thanks in advance!

Li Geng

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message