xsl-list
[Top] [All Lists]

Re: [xsl] Example of partial function application of a context-dependent built-in function?

2012-10-28 09:06:58
One example in F & O 3.0 (section 1.6.4) is:

     fn:starts-with(?, ?, "http://example.com/collation";)

Don't ask me why this function is context-dependent ...

But, a context-dependent function cannot be passed around, because
"passing around" means changing the context -- so passing a context
dependent function around would lead to it producing different results
in different placces where it is applied.


Fortunately, all "main" context - dependent functions have 0
arguments, so it isn't possible to partially apply them.

The context-dependent functions that have arguments (like a
collation-dependent function) are exotic (not used often), so they are
kind of special cases, or exceptions of the general rules.

Cheers,

Dimitre

On Sun, Oct 28, 2012 at 4:21 AM, Costello, Roger L. 
<costello(_at_)mitre(_dot_)org> wrote:
Hi Folks,

The XPath 3.0 specification says this:

    It is a static error if a static function
    call is a partial function application
    and the identified function is a
    context-dependent built-in function.

Would you provide an example of this please?

/Roger

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they
write all patents, too? :)
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>