[jdom-interest] Problems with Transform

Schuetz, David David.Schuetz at veridian.com
Mon Jun 4 06:25:43 PDT 2001


Hi, all...

...I'm new to JDOM (not to mention Java), and have been muddling through
some of the simple examples and built a pretty simple tree-populating xml
reader.  I started playing with transforms, using the example referred to on
the JDOM site (with Xalan and all the streams and such), but I quickly ran
into the strange stream buffer closing problem (interestingly, it only
occurs for a file > 1024 bytes -- at or below exactly 1024, it works
fine...might just be a coincidence).

Anyway, I downloaded the latest from CVS, got the contrib stuff, etc., and
have been trying to get that to work, instead.  And having problems, too.

I'm using the XSL Transform sample file.  First question -- for the "String
stylesheet" variable -- is that to be a pathname to a file, or the actual
*contents* of the XSL sheet itself?  I've tried just using a filename, and
I've tried also creating a new java.io.File variable that (I think) is
connected to the stylesheet pathname.  Nothing seems to work.

Currently, as far as I can tell, the transform method isn't doing anything.
That is, "doc2 = transform(....)" doesn't return anything but NULL for doc2,
and so subsequent things (like, say, the xmloutputter) fail nicely.

Am I missing anything here (essentially, are there any FAQs about this,
things I need to keep in mind)?  Doing anything stupid?  How can I further
debug this? (I havent tried going into the source for transform, 'cause
that's a Xalan piece, right?)  I'm using NetBeans, and I *think* I've got
the proper Xalan jar file mounted.  I can provide more detail if it's needed
(if there isn't a FAQ about this...)


Thanks!

david.




More information about the jdom-interest mailing list