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 Eran Hammer-Lahav <xa...@lahav.net> on 2003/06/10 23:47:09 UTC

Controling Xalan text format

Is there a way to make Xalan output the message text with the XML line
information similar to XT? Is there a way to change the format of the text
itself?

 

Thanks.

 

EL


Re: Controling Xalan text format

Posted by Joseph Kesselman <ke...@us.ibm.com>.



>Is there a way to make Xalan output the message text with the XML line
information similar to XT?

You can get line/column information, if the Source provides it and if
you're willing to burn more memory to hold it. Add the -L option on the
Process command line, or set the source_location attribute
(http://xml.apache.org/xalan-j/features.html#source_location), and see the
NodeInfo extension functions
(http://xml.apache.org/xalan-j/extensionslib.html#nodeinfo)

Personally I don't find line/column very informative when working with XML.
As I discussed in my article
(http://www.ibm.com/developerworks/xml/library/x-styless2/), I think even
an approximation of an XPath will often be more useful.

> Is there a way to change the format of the text itself?

If I'm reading the Javadoc correctly (I haven't checked the code),
Interpretive Xalan-J sends its messages to a MsgMgr object, and XSLTC sends
its messages to a MessageHandler. I think the APIs exist to let you plug in
custom implementations of these interfaces...



______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk