473,508 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception : Could not compile stylesheet

1 New Member
I'm using SimpleTransform.java (renamed as ReceiptTransformer.java for
custom use) found in xalan-j_2_7_0 samples directory for
transformations in my custom application. The program compiles
successfully but gives the following error during runtime:

ERROR: 'org/apache/avalon/framework/configuration/Configuration'
FATAL ERROR: 'Could not compile stylesheet'
Exception in thread "main"
javax.xml.transform.TransformerConfigurationExcept ion: Could not
compile stylesheet
Below is the copy of the stylesheet. I'll really appreciate any help or clue in
this regard.

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3.    xmlns:fo="http://www.w3.org/1999/XSL/Format"
  4.    version="1.0">
  5.  
  6.    <xsl:output method="xml" version="1.0" indent="yes"/>
  7.  
  8.    <xsl:include href="barcode.xsl"/>
  9.    <xsl:include href="USReceiptTemplates.xsl"/>
  10.  
  11.    <xsl:template match="/">
  12.  
  13.        <fo:root font-size="8pt" color="black" font-family="MyriadMed">
  14.  
  15.            <fo:layout-master-set>
  16.                <fo:simple-page-master master-name="POSReceipt"
  17. page-height="7.86in"
  18.                    page-width="2.83in" margin-top="1cm"
  19. margin-bottom="0.20cm" margin-left="0.20cm"
  20.                    margin-right="0.20cm">
  21.                    <fo:region-body margin-top="0.20cm" margin-bottom="0.20cm"/>
  22.                </fo:simple-page-master>
  23.            </fo:layout-master-set>
  24.  
  25.            <fo:page-sequence master-reference="POSReceipt">
  26.                <fo:flow flow-name="xsl-region-body">
  27.                    <fo:block>
  28.                        <xsl:call-template name="adminReceiptHeader"/>
  29.                        <xsl:call-template name="adminReceiptBody"/>
  30.                        <xsl:call-template name="adminReceiptFooter"/>
  31.                    </fo:block>
  32.                </fo:flow>
  33.            </fo:page-sequence>
  34.  
  35.        </fo:root>
  36.    </xsl:template>
  37.  
  38.    <xsl:template name="adminReceiptHeader">
  39.        <xsl:if test="//header/text() != ''">
  40.            <xsl:call-template name="receipt_header"/>
  41.        </xsl:if>
  42.        <xsl:call-template name="apple_logo"/>
  43.        <xsl:call-template name="store_info"/>
  44.        <xsl:call-template name="customer_info"/>
  45.        <xsl:call-template name="rule">
  46.            <xsl:with-param name="thickness">1pt</xsl:with-param>
  47.        </xsl:call-template>
  48.    </xsl:template>
  49.  
  50.    <xsl:template name="adminReceiptBody">
  51.        <fo:table>
  52.            <fo:table-column column-width="75%" column-number="1"/>
  53.            <fo:table-column column-width="25%" column-number="2"/>
  54.            <fo:table-body>
  55.                <xsl:for-each select="//items">
  56.                    <fo:table-row>
  57.                        <xsl:call-template name="item_detail_line"/>
  58.                    </fo:table-row>
  59.                    <fo:table-row>
  60.                        <fo:table-cell number-columns-spanned="2">
  61.                            <xsl:copy-of select="$blank_line"/>
  62.                        </fo:table-cell>
  63.                    </fo:table-row>
  64.                </xsl:for-each>
  65.            </fo:table-body>
  66.        </fo:table>
  67.        <xsl:call-template name="rule">
  68.            <xsl:with-param name="thickness">1pt</xsl:with-param>
  69.        </xsl:call-template>
  70.        <xsl:call-template name="totals"/>
  71.        <xsl:call-template name="rule">
  72.            <xsl:with-param name="thickness">2pt</xsl:with-param>
  73.        </xsl:call-template>
  74.    </xsl:template>
  75.  
  76.    <xsl:template name="adminReceiptFooter">
  77.        <xsl:call-template name="barcode"/>
  78.        <xsl:call-template name="loop">
  79.            <xsl:with-param name="var" select="//footerBlankLines"/>
  80.        </xsl:call-template>
  81.        <xsl:for-each select="//footer">
  82.            <fo:block text-align="center">
  83.                <xsl:value-of select="."/>
  84.            </fo:block>
  85.        </xsl:for-each>
  86.    </xsl:template>
  87.  
  88. </xsl:stylesheet>
Dec 31 '07 #1
1 3174
jkmyoung
2,057 Recognized Expert Top Contributor
It could be the includes you are using.
Expand|Select|Wrap|Line Numbers
  1. <xsl:include href="barcode.xsl"/>
  2. <xsl:include href="USReceiptTemplates.xsl"/>
  3.  
Have you tried running a simple transformation on a simple xml without failure?
Jan 3 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2432
by: Jo | last post by:
Hello, What am I doing wrong ? I always end up with an exception regardless of the provided XML/XSLT (although to ensure the correctness of the provide input files I've used the ones which comes...
0
2614
by: Jordan Willms | last post by:
My xsl stylesheet is as simple as follows: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet xmlns:ims="http://www.imsglobal.org/xsd/imsmd_v1p2"...
0
902
by: resolutionsnet | last post by:
Hello, I wonder if someone can help shed some light on a particular problem I have. Whilst performing a simple XLST transform, I am receiving a CryptographicException. No encryption is being...
5
6732
by: n_o_s_p_a__m | last post by:
Can't compile. Does this mean that all functions that throw exceptions must be of return type void? examples: // won't compile: "not all code paths return a value" public override int Run() {...
0
7463
by: Darko³ | last post by:
I'm trying to do a simple web form with asp.net & C# but althoug the page is correctly compilated, when i load the page there is the following error message: System.Web.HttpException: External...
4
9570
by: andrewcw | last post by:
I am moving some code forward from .NET 1.1. I was able to load the XSL file and perform the transform. The MSDN documentation looks like it should be easy. But I get a compile error. Ideas ?...
3
4637
by: IAMDkg | last post by:
Hi there - Can somebody give me some pointers on how I can create a XSLT which will compile fine but will thow a runtime exception during runtime. I tried to do the following but it doesn't...
11
2093
by: George2 | last post by:
Hello everyone, How do you understand the Bjarne's comments about exception specification? Especially, "not required to be checked across compilation-unit" and "violations will not be caught...
12
2734
by: Ioannis Vranos | last post by:
Perhaps a mechanism can be introduced in the C++0x/1x standard, something simple like defining a function as: void somefunc(void) throw() { // ... }
0
7115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7489
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1547
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.