xsl-list
[Top] [All Lists]

Re: [xsl] Exception : Could not compile stylesheet

2007-12-31 03:25:08
Please find below the styleheet for your reference:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:fo="http://www.w3.org/1999/XSL/Format";
    version="1.0">

    <xsl:output method="xml" version="1.0" indent="yes"/>

    <xsl:include href="barcode.xsl"/>
    <xsl:include href="USReceiptTemplates.xsl"/>

    <xsl:template match="/">

        <fo:root font-size="8pt" color="black" font-family="MyriadMed">

            <fo:layout-master-set>
                <fo:simple-page-master master-name="POSReceipt"
page-height="7.86in"
                    page-width="2.83in" margin-top="1cm"
margin-bottom="0.20cm" margin-left="0.20cm"
                    margin-right="0.20cm">
                    <fo:region-body margin-top="0.20cm" margin-bottom="0.20cm"/>
                </fo:simple-page-master>
            </fo:layout-master-set>

            <fo:page-sequence master-reference="POSReceipt">
                <fo:flow flow-name="xsl-region-body">
                    <fo:block>
                        <xsl:call-template name="adminReceiptHeader"/>
                        <xsl:call-template name="adminReceiptBody"/>
                        <xsl:call-template name="adminReceiptFooter"/>
                    </fo:block>
                </fo:flow>
            </fo:page-sequence>

        </fo:root>
    </xsl:template>

    <xsl:template name="adminReceiptHeader">
        <xsl:if test="//header/text() != ''">
            <xsl:call-template name="receipt_header"/>
        </xsl:if>
        <xsl:call-template name="apple_logo"/>
        <xsl:call-template name="store_info"/>
        <xsl:call-template name="customer_info"/>
        <xsl:call-template name="rule">
            <xsl:with-param name="thickness">1pt</xsl:with-param>
        </xsl:call-template>
    </xsl:template>

    <xsl:template name="adminReceiptBody">
        <fo:table>
            <fo:table-column column-width="75%" column-number="1"/>
            <fo:table-column column-width="25%" column-number="2"/>
            <fo:table-body>
                <xsl:for-each select="//items">
                    <fo:table-row>
                        <xsl:call-template name="item_detail_line"/>
                    </fo:table-row>
                    <fo:table-row>
                        <fo:table-cell number-columns-spanned="2">
                            <xsl:copy-of select="$blank_line"/>
                        </fo:table-cell>
                    </fo:table-row>
                </xsl:for-each>
            </fo:table-body>
        </fo:table>
        <xsl:call-template name="rule">
            <xsl:with-param name="thickness">1pt</xsl:with-param>
        </xsl:call-template>
        <xsl:call-template name="totals"/>
        <xsl:call-template name="rule">
            <xsl:with-param name="thickness">2pt</xsl:with-param>
        </xsl:call-template>
    </xsl:template>

    <xsl:template name="adminReceiptFooter">
        <xsl:call-template name="barcode"/>
        <xsl:call-template name="loop">
            <xsl:with-param name="var" select="//footerBlankLines"/>
        </xsl:call-template>
        <xsl:for-each select="//footer">
            <fo:block text-align="center">
                <xsl:value-of select="."/>
            </fo:block>
        </xsl:for-each>
    </xsl:template>

</xsl:stylesheet>


On Dec 31, 2007 1:56 AM, Kamal Bhatt <kbhatt(_at_)tt(_dot_)com(_dot_)au> wrote:
Hi,
I think you will get a better response from the Xalan mailing list. That
said, I think that this is a problem with your stylesheet. Do you have a
copy of the stylesheet in question?

Cheers.


Dear All,

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.TransformerConfigurationException: Could not
compile stylesheet

I'll really appreciate any help in
this regard.

Thanks,
Charan.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--