This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] Proposals to improve xalan extension: com.nwalsh.xalan.Text
- From: Alexander Karnstedt <alexander_berlin at gmx dot de>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Sat, 13 Sep 2003 16:56:03 +0200
- Subject: [docbook-apps] Proposals to improve xalan extension: com.nwalsh.xalan.Text
I find the ability to reference external text data really useful. But I had
to struggle with some problems according the appropriate extension class
»com.nwalsh.xalan.Text« to get it to work for me. So here are my experiences:
First, returning a NodeSet object (of TextNodes) gives me an error from
Xalans DTMManager (Data Type Mapping?). So I had to redesign the insertfile
method to return a string object instead.
Second: what is the base directory for relative paths in the
texdata/fileref attribute? I think its simply taken from wherever you start
Xalan. But this seems to be wrong - shouldn't the base (defaultly) be equal
to that directory where the including document resides?
However, I've would propose to use the URIResolver object to resolve the
full URL,
in »com.nwalsh.xalan.Text«, instead of:
fileURL = new URL(href);
I used this:
this.href = getFilename(context, elem);
String base = context.getTransformer().getBaseURLOfSource();
javax.xml.transform.URIResolver resolver =
context.getTransformer().getURIResolver();
javax.xml.transform.Source source = this.resolver.resolve(this.href,
this.base);
this.hrefSystemID = source.getSystemId();
....
fileURL = new URL(this.hrefSystemID);
Regards,
Alex
PS: Using docbook-xsl 1.61.3, Xalan 2.5.1
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org.