Subject: Re: [xsl] Attribute and Parameter.. coexist? From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 12 Aug 2003 16:12:20 +0100 |
> how would I go about calling outside java > functions inside xsl? It depends on the system you are using, eg for saxon 6 Mike documents using java functions here http://saxon.sourceforge.net/saxon6.5.3/extensibility.html However for teh actual use case as long as you know your input I would have tjought that the convenience and portability of the simple concatenation in xslt would outweigh any benefits from using a full uri resolver class. Essentially the only dubious point in the concatenation version is whether to put a "/" between the two parts. I did in my suggested solution, but if there is a possibility that your path parameter ends in a / then you'd need to check for that case and omit the "/" Note this _isn't_ the algorithm for adding a relative URI to a base URI as used in the rfc. If $urlpath is aaa/bbb and IMAGES/HEADER is file.gif src="{$urlpath}/{IMAGES/HEADER}"/ would make aaa/bbb/file.gif but taking $urlpath as the base URI and file.gif as the relative would (more or less) produce aaa/file.gif as any part after th efinal / in a base is discarded. I say more or less as actually as aaa/bbb is itself a relative URI the process doesn't apply at all, it wuld require an absolute URI for the base, http:/// or file:... etc. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Attribute and Parameter.., David Erickson | Thread | RE: [xsl] Attribute and Parameter.., Michael Kay |
RE: [xsl] element minimisation (aga, Andrew Welch | Date | [xsl] side effects when debugging, Nick Laqua |
Month |