Re: [xsl] design question on function namespaces

Subject: Re: [xsl] design question on function namespaces
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 3 May 2005 14:30:01 +0100
> I know XSLT presents limitations to implement this sort of thing, but I 
> guess I'm thinking about the possibility of a similar sort of abstract 
> functions -- like "bib:getYearIssued" -- that could be extended to take 
> different input sources.

I think you are agreeing with Mike's assesment. Your footnote lookup
function can't possibly implement arbitrray input document types, as the
markup for footnotes might be arbitrary. ( <div class="ftn"> anyone:-)
so you have to write it for some fixed set (say TEI and docbook  an
OO.org) so if you have a "bib" namespace that is conceptually the union
of those languages and you assign functions to that namespace, then
that is really just a special case of the guidelines that you quoted.

Actually doing it that way (assigning things in your own namespace)
avoids some political controversy around using "other people's"
namespaces. If you write some functions to handle XHTML, you could put
them in the http://www.w3.org/1998/xhtml namespace and XSLT (and I)
wouldn't mind at all, but some people insist on believing that namespace
URI are not simply opaque strings but that you can infer something from
their structure (or from a document returned if you do an http get on
the URI). If you use the namespace of a document type over which you have
no control, then these people will be disappointed as the "authority"
component of the Namespace URI  (www.w3.org in this example) doesn't give
any indication of the author of the function.


Personally I'm rather fond of data:,x as a namespace URI for functions.

David



________________________________________________________________________
This e-mail has been scanned for all viruses by Star. 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
________________________________________________________________________

Current Thread