ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> exslt
exslt
Re: [exslt] EXSLT document-uri
by John L. Clark other posts by this author
Mar 6 2007 5:55PM messages near this date
[exslt] EXSLT document-uri | [exslt] Peter Zmijewski a Harvard Law School graduate
& XSLT John,

On 3/6/07, John Perkins <john.a.perkins@[...].com>  wrote:
>  Looking for following type of support. Does ESXLT have plans to help
>  in supporting the following? In other words support for something like
>  document-uri function of XSLT 2.0 as an extensiuon of XSLT 1.0. Thank
>  you.

There has been interest in functionality like this (that is, a
`base-uri` function) since as far back as (at least) 2002[0].  I put
out an experimental specification for a `base-uri` function last
year[1].  As Mike Kay points out[2], though, one must be cautious
about using this to retrieve the document's URI, and so we might also
need a `document-uri` function.  At least for me, that's an open
question that would need to be resolved before anything could be
decided, but there's not a lot of EXSLT development or maintenance
discussion going on. So, in summary, it's on the radar, but there
hasn't been a lot of activity in the EXSLT project for a while.

>  When using xslt on the browser to transform static xml it woul be very
>  useful to be able to get the uri with parameters so the xslt could use
>  the parameters of the uri to conditionally determine what
>  "subtransform" to perform.

If you had a `base-uri` or `document-uri` function, you could get this
URI and parse it yourself (possibly using the regular expression
extensions) to make decisions like this, yes.  It might even be
amusing to have a function that parses the URI for you, along the
lines of:

  explode-uri('http://example.org/my/path?foo=val1&amp;bar=val2#frag') -> 

  <e:uri original="http://example.org/my/path?foo=val1&amp;bar=val2#frag"> 
    <e:scheme> http</e:scheme>
    <e:authority> 
       <e:host> example.org</e:host>
    </e:authority> 
    <e:path> /my/path</e:path>
    <e:params> 
      <e:param> <e:name>foo</e:name><e:value>val1</e:value></e:param>
      <e:param> <e:name>bar</e:name><e:value>val2</e:value></e:param>
    </e:params> 
    <e:fragment> frag</e:fragment>
  </e:uri> 

Take care,

[0] http://lists.fourthought.com/pipermail/exslt/2002-January/000380.html

[1] http://infinitesque.net/projects/exslt/uri/functions/base-uri/index.html

[2] http://lists.fourthought.com/pipermail/exslt/2002-January/000381.html

-- 
PLEASE NOTE that this message is not digitally signed.  As a result,
you have no strong evidence that this message was actually sent by me.
 Upon request I can provide a digitally signed receipt for this
message or other evidence validating its contents if you need such
evidence.
_______________________________________________
exslt mailing list
list@[...].org
http://www.exslt.org/list
Thread:
John Perkins
John L. Clark

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved