[Bug 12788] [XQueryX30] Overeager testing of reserved-function-names constraint

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12788

Jim Melton <jim.melton@acm.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Jim Melton <jim.melton@acm.org> 2011-05-31 23:08:57 UTC ---
Thanks for reporting this bug. I have corrected it in the XQueryX stylesheet by
replacing the following test in two places (the templates for
xqx:literalFunctionItemExpr and xqx:functionCallExpr):

    <xsl:if test="xqx:functionName = 'node' or
                  xqx:functionName = 'document-node' or
                  xqx:functionName = 'element' or
                  xqx:functionName = 'attribute' or
                  xqx:functionName = 'schema-element' or
                  xqx:functionName = 'schema-attribute' or
                  xqx:functionName = 'processing-instruction' or
                  xqx:functionName = 'comment' or
                  xqx:functionName = 'text' or
                  xqx:functionName = 'function' or
                  xqx:functionName = 'namespace-node' or
                  xqx:functionName = 'item' or
                  xqx:functionName = 'if' or
                  xqx:functionName = 'switch' or
                  xqx:functionName = 'typeswitch' or
                  xqx:functionName = 'empty-sequence')">

with:

    <xsl:if test="(xqx:functionName = 'node' or
                   xqx:functionName = 'document-node' or
                   xqx:functionName = 'element' or
                   xqx:functionName = 'attribute' or
                   xqx:functionName = 'schema-element' or
                   xqx:functionName = 'schema-attribute' or
                   xqx:functionName = 'processing-instruction' or
                   xqx:functionName = 'comment' or
                   xqx:functionName = 'text' or
                   xqx:functionName = 'function' or
                   xqx:functionName = 'namespace-node' or
                   xqx:functionName = 'item' or
                   xqx:functionName = 'if' or
                   xqx:functionName = 'switch' or
                   xqx:functionName = 'typeswitch' or
                   xqx:functionName = 'empty-sequence') and
                   ((not(xqx:functionName/@xqx:prefix) and
not(xqx:functionName/@xqx:URI)) or
                    xqx:functionName/@xqx:prefix = '' or
                    xqx:functionName/@xqx:URI = '')">

If you agree that this resolves the problem, please mark this bug CLOSED.
Otherwise, please let me know how it does not resolve the problem.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 31 May 2011 23:08:59 UTC