Moving on, I have a stylesheet with xpath code like this:
document($filename,/)
where $filename = 'simple-master.htm'
The spec says that the second argument specifies the context for
resolving the target document.
So $filename should be taken relative to the path of the document that
is referenced by /
in this case, that's the xml file that is being transformed.
so I have
/db
/byways
/test
/test.htm - the source being transformed
/simple-master.htm - the document to be included
What I see in the exist log is:
2008-07-16 23:19:52,562 [SocketListener0-4] DEBUG (NativeSerializer.java
[serializeToReceiver]:107) - serializing document 80
(/db/byways/test/test.htm) to SAX took 1
2008-07-16 23:19:52,562 [SocketListener0-4] DEBUG (Transform.java
[resolve]:496) - DatabaseResolver.resolve href='simple-master.htm',
base='null'
2008-07-16 23:19:52,563 [SocketListener0-4] DEBUG (Collection.java
[getDocument]:511) - Document simple-master.htm not found!
2008-07-16 23:19:52,563 [SocketListener0-4] DEBUG (NativeBroker.java
[getXMLResource]:1595) - document
'/db/ATALi/tal2xslt/tal2xslt/xsl/simple-master.htm' not found!
2008-07-16 23:19:52,564 [SocketListener0-4] DEBUG (Transform.java
[resolve]:514) - Document simple-master.htm not found in collection
/db/ATALi/tal2xslt/tal2xslt/xsl
In this example, /db/ATALi/tal2xslt/tal2xslt/xsl is the collection that
holds the stylesheet source, and that's the wrong collection.
I think there are two problems:
1. xalan has set base=null' when calling DatabaseResolver.resolve
2. DatabaseResolver.resolve doesn't handle base anyway
this assumption is wrong when base is not null:
path = collection.getURI() + "/" + href;
as to why xalan passes base=null .. I do not know..
--
Brad Clements,
bkc@... (315)268-1000
http://www.murkworks.com
AOL-IM: BKClements
-------------------------------------------------------------------------
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