Re-posting...please read below...
-----Original Message-----
From: Domingo, John [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 25, 2001 1:58 PM
To: [EMAIL PROTECTED]
Cc: '[EMAIL PROTECTED]'
Subject: XALAN - Transformation question regarding URI Resolution...
Xalan XSLT Gods/Gurus/et. al.,
I am trying to implement a URI Resolver object that I've created
using the XALAN TRaX API. I am currently using v2.0.1 of the Xalan library.
I am having a problem setting the URI resolver via the Transformer object,
using the setURIResolver() method. Here's a snippet of the code that I have
written (really simple stuff here!!!!!):
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
...
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(new
StreamSource(args[1]));
transformer.setURIResolver(gur);
transformer.transform(new StreamSource(args[0]),
new StreamResult(new
FileOutputStream("mappedPF.xml")));
...
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
where, "gur" is the URI Resolver object that I've created that implements
the URIResolver class interface (as used in the Xalan library, version
2.0.1). Basically, my URI Resolver implementation's resolve() method NEVER
gets called when trying to resolve an xsl:include statement in my
transformation stylesheet.
Now the funny thing here is that I tried setting the URI Resolver
via the TransformerFactory, and it works fine!!!!!!!! My URI Resolver
implementation's resolve() method is called fine. Here's what that code
looks like:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
...
TransformerFactory tFactory = TransformerFactory.newInstance();
tFactory.setURIResolver(gur);
Transformer transformer = tFactory.newTransformer(new
StreamSource(args[1]));
transformer.transform(new StreamSource(args[0]),
new StreamResult(new
FileOutputStream("mappedPF.xml")));
...
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Theoretically, it should work both ways...right? I looked through
all the documentation, and have not found anything that indicates I should
do otherwise. Is this a bug with this version's Transformer object? Am I
programmically forgetting a setup of a property for the Transformer class?
Please let me know if you need more info regarding my problem.
Thanks for your time!
___________________________
"FUTILITY in Golf - You'll always miss 100% of
the shots you don't take, and, statistically speaking,
99% of the shots you do." - Anonymous
John P. Domingo
Senior Software Engineer
Software Integration Group (SIG)
GERS, Inc.
Wateridge Technology Center
10431 Wateridge Circle
San Diego, CA 92121
(858) 731-2118, direct
(800) 854-2263, ext. 2118
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]