Hi
I am trying to transform xml to rtf using fop-0.90alpha1. But I am getting
transformation exception as follows:
; SystemID: file:///C:/test/test.xsl; Line#: 12; Column#: 47
javax.xml.transform.TransformerException: java.lang.RuntimeException: Must call
getValue with PercentageBaseContext
at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2344)
at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:710)
at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160)
at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
This only happens if output format is rtf. It does not occur for PDF output.
Problem causing section of xslt.
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:variable name="country">IN</xsl:variable>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="A4" page-width="210mm"
page-height="297mm" margin-top="10mm" margin-bottom="10mm" margin-left="10mm"
margin-right="15mm">
<fo:region-body margin="10mm"/>
<fo:region-before region-name="xsl-region-before" extent="10mm"/>
<fo:region-after region-name="xsl-region-after" extent="10mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4">
<fo:static-content flow-name="xsl-region-before">
<fo:block text-align="center" font-size="12pt"
font-family="serif" font-weight="bold" margin-bottom="10pt">DATA ITEM
DESCRIPTION</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center" font-size="12pt"
font-family="serif" font-weight="bold" margin-top="10pt">DATA ITEM
DESCRIPTION</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<xsl:call-template name="MRECSTDACTIVITYNO"/>
<xsl:apply-templates select="//MRECPROCEDURE"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
Line 12 (<fo:page-sequence master-reference="A4">) is the part of xslt that is
pointed out in the exception to be cause of the exception.
Any idea?
Thanks, in advance
Navpreet
Disclaimer :
The contents of this e-mail including any attachments are intended only
for the person or entity to which this e-mail is addressed. If you are not,
or believe you may not be, the intended recipient, please advise the sender
immediately by return e-mail, delete this e-mail and destroy any copies.
Tenix does not warrant nor guarantee that this email communication is free
from errors, virus, interception or interference.
--~------------------------------------------------------------------
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>
--~--