[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Attribute and Parameter.. coexist?

Subject: Re: Attribute and Parameter.. coexist?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 12 Aug 2003 16:12:20 +0100
coexist gif
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.