You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by thandana <ra...@gmail.com> on 2010/09/27 21:41:07 UTC

xsl fo errors and line numbers

Hi All,
 Any help is greatly appreciated. I am using Apache Xalan 2.7.1, FOP .95 to
generate pdf docs. The only issue is when i have an error in xsl-fo
document, i am not seeing line numbers in the error message. What should be
done to get the exact line # in xsl-fo document that is causing the error?

I am using code like this but no use.

transformFactoryInstance.setAttribute(TransformerFactoryImpl.FEATURE_SOURCE_LOCATION,
Boolean.TRUE);

Thanks
Rathana.
-- 
View this message in context: http://old.nabble.com/xsl-fo-errors-and-line-numbers-tp29822450p29822450.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: xsl fo errors and line numbers

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Even in the latest Xalan version, this feature doesn't seem to work
although it's mentioned in Xalan's docs. You could try another XSLT
processor which might provide the required Locator data. Otherwise,
proceed as Jörg indicated. At any rate, if the XML source provides
Locator information, FOP will display it. XML parsers usually do. For
XSLT processors, this trick is a bit harder.

On 27.09.2010 21:41:07 thandana wrote:
> 
> Hi All,
>  Any help is greatly appreciated. I am using Apache Xalan 2.7.1, FOP .95 to
> generate pdf docs. The only issue is when i have an error in xsl-fo
> document, i am not seeing line numbers in the error message. What should be
> done to get the exact line # in xsl-fo document that is causing the error?
> 
> I am using code like this but no use.
> 
> transformFactoryInstance.setAttribute(TransformerFactoryImpl.FEATURE_SOURCE_LOCATION,
> Boolean.TRUE);
> 
> Thanks
> Rathana.
> -- 
> View this message in context: http://old.nabble.com/xsl-fo-errors-and-line-numbers-tp29822450p29822450.html
> Sent from the FOP - Users mailing list archive at Nabble.com.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: xsl fo errors and line numbers

Posted by "J.Pietschmann" <j3...@yahoo.de>.
On 27.09.2010 21:41, thandana wrote:
>
> Hi All,
>   Any help is greatly appreciated. I am using Apache Xalan 2.7.1, FOP .95 to
> generate pdf docs. The only issue is when i have an error in xsl-fo
> document, i am not seeing line numbers in the error message. What should be
> done to get the exact line # in xsl-fo document that is causing the error?
>
> I am using code like this but no use.
>
> transformFactoryInstance.setAttribute(TransformerFactoryImpl.FEATURE_SOURCE_LOCATION,
> Boolean.TRUE);

Line numbers are only used in error messages if the FO source
is a file. If the FO is generated by an XSL transformation,
there is no way to trace errors back to the source XML (or
XSLT). A common approach is to run the transformation separately
to generate a FO file, possibly enabling indent="yes" on
xsl:output, and process this FO file in a second step. FOP
will generate line numbers referencing the FO file.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: xsl fo errors and line numbers

Posted by Eric Douglas <ed...@blockhouse.com>.
There are no line numbers.  I use embedded code for my translations
which uses an XML file and an XSL file.  I don't normally see the FO
code.  I tried changing the parameters to produce FO code and it got a
text file with one continuous line of text.
 

-----Original Message-----
From: thandana [mailto:ratna.rdd@gmail.com] 
Sent: Monday, September 27, 2010 3:41 PM
To: fop-users@xmlgraphics.apache.org
Subject: xsl fo errors and line numbers


Hi All,
 Any help is greatly appreciated. I am using Apache Xalan 2.7.1, FOP .95
to generate pdf docs. The only issue is when i have an error in xsl-fo
document, i am not seeing line numbers in the error message. What should
be done to get the exact line # in xsl-fo document that is causing the
error?

I am using code like this but no use.

transformFactoryInstance.setAttribute(TransformerFactoryImpl.FEATURE_SOU
RCE_LOCATION,
Boolean.TRUE);

Thanks
Rathana.
--
View this message in context:
http://old.nabble.com/xsl-fo-errors-and-line-numbers-tp29822450p29822450
.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org