You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Tim Cronin <ti...@13-colonies.com> on 2003/03/12 17:28:43 UTC

Transformation exception getLocator() always returning null

I'm using 2.5d1.

I create a javax.xml.transform.ErrorListener and assign it to the Transform
factory.

then I try to create a new transformer.

if the stylesheet is bad my listener get called but when I call 
TransformerException.getLocator() I always get null.

but I sometimes get a line number when I call
TransformerException.getMessageAndLocation().

is there some feature I need to set to get line numbers?

Re: Transformation exception getLocator() always returning null

Posted by Joseph Kesselman <ke...@us.ibm.com>.
Tracking line numbers adds a significant amount of storage to the DTM 
model, so we only record them if you explicitly request them. See 
http://xml.apache.org/xalan-j/features.html#source_location

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more. 
"may'ron DaroQbe'chugh vaj bIrIQbej"  ("Put down the squeezebox and nobody 
gets hurt.")