DO NOT REPLY [Bug 29596] - XSLT task ignores classpath element/attribute when looking up transformer

2006-04-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29596





--- Additional Comments From [EMAIL PROTECTED]  2006-04-11 17:54 ---
So the TraXLiaison is only called from XSLTProcess and if there is a defined
classpath the contextclassloader is set and valid. But if there is no defined
classpath i knew the contextclassloader must also be set but not if it is valid
- in the current meaning. In my environment i only work with a defined
classpath. So what about mixing the two options... first try to load in the
original way and if not found try to load from contextloader. Then it should
work as expected...

Class clazz = null;
try {
  clazz = Class.forName(factoryName); 
} catch(...) {
  try {
clazz = Class.forName(factoryName, true, 
Thread.currentThread().getContextClassLoader());
  } catch ...



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 29596] - XSLT task ignores classpath element/attribute when looking up transformer

2006-04-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29596


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Target Milestone|--- |1.7




--- Additional Comments From [EMAIL PROTECTED]  2006-04-11 17:18 ---
well, we have two options here. the original patch or the context class loader.

I'm not overhappy with the second, even though it does work, because I dont like
context class loaders -they are a bit of a hack. Can we be 100% sure that it
will always be set and valid?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 29596] - XSLT task ignores classpath element/attribute when looking up transformer

2006-04-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29596





--- Additional Comments From [EMAIL PROTECTED]  2006-04-11 16:49 ---
Fixed it for me i just use the contextClassLoader in Class.forName because there
is nothing to change in calling class:

TraXLiaison.java

try {
final Class clazz = Class.forName(factoryName, true, 
Thread.currentThread().getContextClassLoader());
tfactory = (TransformerFactory) clazz.newInstance();
} catch (Exception e) {
throw new BuildException(e);
}

Surfer

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 29596] - XSLT task ignores classpath element/attribute when looking up transformer

2006-04-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29596





--- Additional Comments From [EMAIL PROTECTED]  2006-04-11 16:17 ---
neither the classpath element/attribute nor the classpathref attribute works

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 29596] - XSLT task ignores classpath element/attribute when looking up transformer

2006-04-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29596


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|normal  |enhancement




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 29596] - XSLT task ignores classpath element/attribute when looking up transformer

2006-04-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29596


[EMAIL PROTECTED] changed:

   What|Removed |Added

Version|1.6.1   |1.6.5




--- Additional Comments From [EMAIL PROTECTED]  2006-04-09 10:45 ---
Not solved in 1.6.5 see duplicate BUG 39248 !!!

Greetings Surfer 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 29596] - XSLT task ignores classpath element/attribute when looking up transformer

2006-04-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29596


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Additional Comments From [EMAIL PROTECTED]  2006-04-08 11:24 ---
*** Bug 39248 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 29596] - XSLT task ignores classpath element/attribute when looking up transformer

2004-06-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29596

XSLT task ignores classpath element/attribute when looking up transformer





--- Additional Comments From [EMAIL PROTECTED]  2004-06-28 08:02 ---
Ant 1.6.2 will set the context classloader for the current thread since the
TransformerFactory will use that.  This is probably going to help with your 
issue.

Any chance you could try a hand-crafted build of Ant's CVS HEAD?

If not, please revisit this bug once Ant 1.6.2 has been released as beta 
(shouldn't
be too long from now).

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 29596] - XSLT task ignores classpath element/attribute when looking up transformer

2004-06-16 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29596

XSLT task ignores classpath element/attribute when looking up transformer





--- Additional Comments From [EMAIL PROTECTED]  2004-06-16 10:56 ---
Proposed patches to implement -

diff -u -r1.85 XSLTProcess.java
--- XSLTProcess.java16 Apr 2004 09:59:02 -  1.85
+++ XSLTProcess.java16 Jun 2004 10:53:00 -
@@ -414,7 +414,7 @@
  * @return the requested class.
  * @exception Exception if the class could not be loaded.
  */
-private Class loadClass(String classname) throws Exception {
+public Class loadClass(String classname) throws Exception {
 if (classpath == null) {
 return Class.forName(classname);
 } else {

diff -u -r1.35 TraXLiaison.java
--- TraXLiaison.java9 Mar 2004 16:48:15 -   1.35
+++ TraXLiaison.java16 Jun 2004 10:53:49 -
@@ -66,6 +66,9 @@
  */
 private String factoryName = null;

+/** the owning XSLT task */
+private XSLTProcess xsltTask = null;
+
 /** The trax TransformerFactory */
 private TransformerFactory tfactory = null;

@@ -259,7 +262,7 @@
 tfactory = TransformerFactory.newInstance();
 } else {
 try {
-Class clazz = Class.forName(factoryName);
+Class clazz = xsltTask.loadClass(factoryName);
 tfactory = (TransformerFactory) clazz.newInstance();
 } catch (Exception e) {
 throw new BuildException(e);
@@ -401,6 +404,8 @@
  *is to be configured.
  */
 public void configure(XSLTProcess xsltTask) {
+this.xsltTask = xsltTask;
+
 XSLTProcess.Factory factory = xsltTask.getFactory();
 if (factory != null) {
 setFactory(factory.getName());
@@ -413,6 +418,8 @@
 setAttribute(attr.getName(), attr.getValue());
 }
 }
+
+

 XMLCatalog xmlCatalog = xsltTask.getXMLCatalog();
 // use XMLCatalog as the entity resolver and URI resolver

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]