<div dir="ltr">Hi Rob,<div><br></div><div>Just off the top of my mind, I would expect some challenges with respect to dynamically vs. statically known information. With a literal, all annotations are known statically. With a variable, this is no longer the case. This may have unexpected implications for function type checking, etc.</div><div><br></div><div>I hope it makes sense.</div><div><br></div><div>Kind regards,</div><div>Ghislain</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 23, 2015 at 4:49 PM, Rob Stapper <span dir="ltr"><<a href="mailto:r.stapper@lijbrandt.nl" target="_blank">r.stapper@lijbrandt.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="NL" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US">Hi,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Is it possible that in a nearby release of the XQUERY-standard the parameters of the annotations in function-declarations can also hold string-variables?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">e.g.  <u></u><u></u></span></p><p><u></u><span lang="EN-US" style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">         </span></span></span><u></u><span lang="EN-US">declare %myAnnotation( $annotationValue) function f ( ){()}  ;<u></u><u></u></span></p><p><u></u><span lang="EN-US" style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">         </span></span></span><u></u><span lang="EN-US">instead of:  declare %myAnnotation( ‘myLiteral’) function f ( ){()}  ;<u></u><u></u></span></p><p><u></u><span lang="EN-US" style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">         </span></span></span><u></u><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">My use-case is that I want to be able to check some of my functions for specific properties during processing.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">- it would be nice if the source of the annotationValue at function-creation could be the same as at function-checking, e.g.<u></u><u></u></span></p><p><u></u><span lang="EN-US" style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">         </span></span></span><u></u><span lang="EN-US">declare variable $annotationValue := ‘testValue’ ;<u></u><u></u></span></p><p><u></u><span lang="EN-US" style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">         </span></span></span><u></u><span lang="EN-US">declare %myAnnotation( $annotationValue) function f( ){()}  ;<u></u><u></u></span></p><p><u></u><span lang="EN-US" style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">         </span></span></span><u></u><span lang="EN-US">declare function test( $f, $annotationValue){ …..test annotation:%myAnnotation of function( $f) for value: $annotationValue…..} ;<u></u><u></u></span></p><p><u></u><span lang="EN-US" style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">         </span></span></span><u></u><span lang="EN-US">………….. test( $myFunction, $myTestValue) ……..<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">- another, more important point is that the constructor-function for these annotated functions can be called from different places in my program with different values. So actually function-creation is also during processing.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Is this something that W3C sees as a useful enough addition and is it feasible within the given capacity?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thanks in advance,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Rob Stapper<u></u><u></u></span></p></div>
<br><br>
<hr style="border:none;color:#909090;background-color:#b0b0b0;min-height:1px;width:99%">
<table style="border-collapse:collapse;border:none">
        <tbody><tr>
                <td style="border:none;padding:0px 15px 0px 8px">
                        <a href="https://www.avast.com/antivirus" target="_blank">
                                <img border="0" src="http://static.avast.com/emails/avast-mail-stamp.png" alt="Avast logo">
                        </a>
                </td>
                <td>
                        <p style="color:#3d4d5a;font-family:"Calibri","Verdana","Arial","Helvetica";font-size:12pt">
                                Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
                                <br><a href="https://www.avast.com/antivirus" target="_blank">www.avast.com</a>
                        </p>
                </td>
        </tr>
</tbody></table>
<br>
</div><br>_______________________________________________<br>
<a href="mailto:talk@x-query.com">talk@x-query.com</a><br>
<a href="http://x-query.com/mailman/listinfo/talk" rel="noreferrer" target="_blank">http://x-query.com/mailman/listinfo/talk</a><br></blockquote></div><br></div>