OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: 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 = 
       javax.xml.transform.Source source = this.resolver.resolve(this.href, 
       this.hrefSystemID = source.getSystemId();
       fileURL = new URL(this.hrefSystemID);


PS: Using docbook-xsl 1.61.3, Xalan 2.5.1

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]