Moving from LotusXSL to XT

Subject: Moving from LotusXSL to XT
From: "Philip Puccio" <Philip.Puccio@xxxxxxxx>
Date: 15 Dec 1999 15:36:36 -0700
Hi, I've got a production application implemented using LotusXSL and I'm 
investigating using XT instead.  I've gotten some *very* simple 
transformations to work using XT, but there are 3 "techniques" I use in my 
production XSL that I'm having trouble mapping from LotusXSL to XT.  I'm 
hoping some of you can help me clear these hurdles.  Thanks!  Here they are:


1) I frequently use xsl:include.  With LotusXSL, to set up my stylesheet, I 
instantiate an XSLTInputSource, send it setCharacterStream(StringReader), 
where StringReader's string is my xsl, then I send the XSLTInputSource 
setSystemId(directoryName), where directoryName is where my XSL includes are 
located.  That's been working fine for me.  With XT, I do the same 2 message 
sends, but this time I use a org.xml.sax.InputSource instead of 
com.lotus.xsl.XSLTInputSource.  When I use XT to process xsl that has an 
xsl:include, I get a MalformedURLException: no protocol: 
common-business-graph-call.xsl where the common... is the xsl file I was 
trying to include.

How should I tell XT where it should look for include files?


2) I use extension functions to call some of my Java code.  In one case, I 
pass a node-set as an argument to a Java method.  Within Java (when using XT), 
that node-set is an instance of SingleNodeIterator.  I send the iterator 
next() to get a Node (actually, an instance of 
XSLProcessorImpl$ElementNodeImpl).  Now the challenge: I need to get a string 
representation of that Node's XML, tags and all.  Using LotusXSL, I was 
getting an org.w3c.dom.NodeList, getting its only Node (an ElementImpl), 
casting it to a TXElement, then sending the TXElement the message 
toXMLString(Writer), implemented by com.ibm.xml.parser.Child.

I can't find an analogous approach for a ElementNodeImpl.  Is there an 
approach I'm missing?


3) In LotusXSL I was able to get nicely formatted output using indent="yes" on 
my xsl:output statement, combined with (in Java) sending setIndent(4) to an 
XMLParserLiaison that's associated with an instance of XSLProcessor.  With XT, 
if indent="no", all output occurs on a single line; if indent="yes", each 
element occurs on its own line, but nothing is indented.

How is indentation achieved using XT?

Thanks for any light you can shed my way!

. . . Phil Puccio


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread