The exception is telling you that the compiler reported an error. By default the error will have been reported to System.err. If you're not seeing the error message, then the first thing you should do is organize your application so that compiler errors are logged somewhere. For example, you can do this by redirecting System.err to a file, or by writing your own ErrorListener.

Like others, I would have assumed that the error relates to the missing quotes, but since you've now told us that the stylesheet you posted isn't the same as the one that gave the error, I have no way of knowing what the actual error might be.

Michael Kay
Saxonica

On 19/08/2011 13:53, KAMOHELO MOFOKENG wrote:
Hi All,
 
Has anyone encountered this exception before, if yes, what does it mean?
 
I'm running a XSL-FO to PDF code inside a JApplet. The code work fine as a stand alone module but it fails inside an applet throwing the exeption:
 
--------------------------------------------------------------------------------------------------------------------------------
javax.xml.transform.TransformerConfigurationException: Failed to compile stylesheet. 1 error detected.
 at net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:124)
 at net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:125)
 at net.sf.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:80)
_________________________________________________________________________

XML File:
----------------------------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<root>
<name>shyam</name>
<friend>
 <name>Abc</name>
 <phNo>90909090909</phNo>
</friend>
<friend>
 <name>Xyz</name>
 <phNo>32323232323</phNo>
</friend>
</root>
______________________________________________________________________
 
XSL File:
----------------------------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.1"
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform
  xmlns:fo="http://www.w3.org/1999/XSL/Format"
 exclude-result-prefixes="fo">
<xsl:template match="root">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="my-page">
      <fo:region-body margin="1in"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="my-page">
    <fo:flow flow-name="xsl-region-body">
      <fo:block>Hello, <xsl:value-of select="name" />!</fo:block>
      <fo:block>
       <fo:table>
         <fo:table-body>
          <fo:table-row>
                 <fo:table-cell border="solid 1px black"
   text-align="center" font-weight="bold">
                  <fo:block>
                      No.
                    </fo:block>
                 </fo:table-cell>
                 <fo:table-cell border="solid 1px black"
   text-align="center" font-weight="bold">
                  <fo:block>
                      Name
                    </fo:block>
                 </fo:table-cell>
                 <fo:table-cell border="solid 1px black"
   text-align="center" font-weight="bold">
                  <fo:block>
                      Phone Number
                    </fo:block>
                 </fo:table-cell>
                </fo:table-row>
                <xsl:for-each select="./friend">
                 <fo:table-row>
                 <fo:table-cell border="solid 1px black" text-align="center">
                  <fo:block>
                      <xsl:value-of select="position()" />
                    </fo:block>
                 </fo:table-cell>
                 <fo:table-cell border="solid 1px black" text-align="center">
                  <fo:block>
                      <xsl:value-of select="name" />
                    </fo:block>
                 </fo:table-cell>
                 <fo:table-cell border="solid 1px black" text-align="center">
                  <fo:block>
                      <xsl:value-of select="phNo" />
                    </fo:block>
                 </fo:table-cell>
                </fo:table-row>
                </xsl:for-each>
         </fo:table-body>
       </fo:table>
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
______________________________________________________________________
 
Does anyone know why?
 
Thanks in advance
Kamo
------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help