<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>1248</bug_id>
          
          <creation_ts>2005-04-14 10:23:16 +0000</creation_ts>
          <short_desc>function-available and compile time errors (editorial)</short_desc>
          <delta_ts>2005-07-21 18:50:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 2.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 2000</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Carlisle">davidc</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3745</commentid>
    <comment_count>0</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2005-04-14 10:23:16 +0000</bug_when>
    <thetext>http://www.w3.org/TR/xslt20/#function-function-available

says
The function-available function can be used with the xsl:choose and xsl:if
instructions,...

There probably should be a warning (either here or in the existing note at the
end of that section) that using xsl:choose or xsl:if to mark a conditional block
of code is unsafe as you may get compile time errors even in the branches that
will not be executed.

This came up on comp.text.xml this week where a user was trying to use msxml
node set with msxml and native temporary tree with saxon 8 but saxon 
died on the unknown msxsl:node-set function even though it was protected by an
xsl:choose, addition of some xsl:use-when tests solved the original poster&apos;s
problem, but I think that a note here would help (assuming the users read notes
in the spec:-)

Another minor comment on function-available, most references to the use of this
function use the idiom
a string that is a valid QName, 
but 10.3 Stylesheet Functions says:

If a stylesheet function has been defined with a particular expanded-QName,
then a call on function-available will return true when called with an
argument that is a QName that expands to this same expanded-QName.
         ^^^^^^^^^^^^^^^^^

which probably isn&apos;t quite so clear/accurate.

David
PS, for your records I leave both these points to the editor and accept the
resolution, whatever.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3544</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-05-07 22:34:03 +0000</bug_when>
    <thetext>Thanks for these comments, David. The XSL WG reviewed them and asked the editor
to revise the text to fix the problems identified. This I have done. In the
intro to function-available, I have retained the reference to use-when and have
dropped the reference to choose/if. I&apos;ve then added two examples, one showing
use of function-available with xsl:choose to achieve portability between XSLT
1.0 and 2.0, and a second example showing function-available with use-when to
achieve portability between 2.0 and a future XSLT version.

In the description of stylesheet functions, I&apos;ve changed &quot;QName&quot; here to
&quot;lexical QName&quot;.

Thankyou for you advance acceptance of the outcome!

Michael Kay
for the XSL WG</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>