[ exist-Bugs-2020837 ] transform:transform document('') fails

View: New views
1 Messages — Rating Filter:   Alert me  

[ exist-Bugs-2020837 ] transform:transform document('') fails

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bugs item #2020837, was opened at 2008-07-17 18:03
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=117691&aid=2020837&group_id=17691

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Brad Clements (bkc)
Assigned to: Nobody/Anonymous (nobody)
Summary: transform:transform document('') fails

Initial Comment:
project.version=1.3.0dev
project.build=20080716
svn.revision=8000

using document('') within a transform fails to refer to the stylesheet source DOM. It causes Xalan to fail w/o raising an exception. Xalan terminates processing the stylesheet and writes this to  exist.log:

SystemId Unknown; Line #0; Column #0; java.lang.NullPointerException

xalan passes href="" to eXist.src.org.exist.xquery.functions.transform.Transform.DatabaseResolver.resolve
but that method does not check for the condition of href=""

I tried to fix resolve(), by adding this code:

if("" == href || 0 == href.length()) {
   LOG.debug("DatabaseResolver.resolve returning xsl document");
   return new DOMSource(doc);
}

but it does not work.  

exist.log shows:

2008-07-17 13:45:34,030 [SocketListener0-3] DEBUG (NativeSerializer.java [serializeToReceiver]:107) - serializing document 85 (/db/byways/test/bugtests/self-reference.xsl) to SAX took 1
2008-07-17 13:45:34,032 [SocketListener0-3] DEBUG (NativeSerializer.java [serializeToReceiver]:107) - serializing document 88 (/db/byways/test/bugtests/resources/root.xml) to SAX took 0
2008-07-17 13:45:34,032 [SocketListener0-3] DEBUG (Transform.java [resolve]:496) - DatabaseResolver.resolve href='', base='null'
2008-07-17 13:45:34,032 [SocketListener0-3] DEBUG (Transform.java [resolve]:499) - DatabaseResolver.resolve returning xsl document
2008-07-17 13:45:34,033 [SocketListener0-3] DEBUG (Transform.java [resolve]:496) - DatabaseResolver.resolve href='null', base='null'
2008-07-17 13:45:34,034 [SocketListener0-3] DEBUG (XQuery.java [execute]:220) - Execution took 7 ms

it would also be nice if, when this is fixed, it would work with the stylesheet coming from an XML fragment


the attached .zip file contains self-reference-test.xq that demonstrates this (and 2 other bugs to be filed separately)


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=117691&aid=2020837&group_id=17691

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open
LightInTheBox - Buy quality products at wholesale price