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

Re: Looking for a shorter mapping expression

Subject: Re: Looking for a shorter mapping expression
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: 05 Dec 2004 11:47:20 +0000
Re:  Looking for a shorter mapping expression
>>>>> "Dimtre" == Dimtre Novatchev <dnovatchev@xxxxxxxxx> writes:

    >> How about:
    >> 
    >> f:a ($pFun, $pList)
    >> 
    >> :-) :-) :-)
    >> 
    >> I don't understand the compactness requirement.


    Dimtre> It can be very essential -- if the "/" operator allowed an
    Dimtre> arbitrary sequence on the left, then it would be
    Dimtre> preferrable to f:map()

    Dimtre> But I'm not satisfied at all with the currently (un)
    Dimtre> available ways to define the type of such higher order
    Dimtre> operators in XPath2.

Don't you mean XSLT 2.0

    Dimtre> Compare to the strict type definition in Haskell:

    Dimtre>         map :: (a -> b) -> [a] -> [b]


I see what you mean - for f:map you currently have:

    
    <xsl:function name="f:map" as="item()*">
      <xsl:param name="pFun" as="element()"/>
      <xsl:param name="pList1" as="item()*"/>

whereas what you want is:

    
    <xsl:function name="f:map" like="pList1">
      <xsl:param name="pFun" as="element()"/>
      <xsl:param name="pList1" as="item()*"/>

which is not valid XSLT 2.0.
And I guess it's probably too late to have such a proposal considered.
-- 
Colin Paul Adams
Preston Lancashire

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.