473,969 Members | 6,603 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 ReceiptTransfor mer.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.trans form.Transforme rConfigurationE xception: 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 3200
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
2472
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 with the xalan samples). Is it a memory mishandling error ? I'm using Xerces 2.4 C++ / Xalan 1.7 C++ and VC6 to compile the code : #include <iostream>
0
2640
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" xmlns="http://ltsc.ieee.org/xsd/LOMv1p0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes"/> <!-- rename ims datetime tags to IEEE dateTime tags --> <xsl:template match="ims:datetime">
0
919
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 used by the program itself. At present I have found no pattern into reproducing the error, seemingly random but often. The stack trace is as follows;
5
6772
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() { throw new Exception("exception thrown"); }
0
7576
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 component has thrown an exception ---> System.Web.HttpCompileException: Eccezione lanciata da un componente esterno. at System.Web.Compilation.BaseCompiler.ThrowIfCompilerErrors(CompilerResults results, CodeDomProvider codeProvider,...
4
9639
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 ? How can I share my XSLT ( there are 2 helper stylesheets, and I check that they are also available... the loaded xsl makes reference to the helper xsl files. Where should I start looking ? // Load the stylesheet. errBefore =...
3
4659
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 throw any runtime exception. <?xml version='1.0' encoding='utf-8'?> <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/ Transform'>
11
2138
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 at run time"? section 14.6.1 Checking Exception Specifications --------------------
12
2779
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
10315
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11785
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11368
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10856
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8422
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7570
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6506
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3722
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.