<?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>15547</bug_id>
          
          <creation_ts>2012-01-13 16:38:18 +0000</creation_ts>
          <short_desc>[FO30] analyze-string and schemas</short_desc>
          <delta_ts>2012-10-02 12:56:52 +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>Functions and Operators 3.0</component>
          <version>Member-only Editors Drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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="Tim Mills">tim</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>jim.melton</cc>
          
          <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>62666</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-01-13 16:38:18 +0000</bug_when>
    <thetext>According to F&amp;O 3.0:

&quot;A schema is defined for the structure of the returned element, containing the definitions below. The returned element and its descendants will have type annotations obtained by validating the returned element against this schema, unless the function is used in an environment where type annotations are not supported (for example, a Basic XSLT Processor), in which case the elements will all be annotated as xs:untyped and the attributes as xs:untypedAtomic.&quot;

Does this therefore mean that these schema types and element/attribute declarations are in-scope?  That is, is it permissable to use

schema-element(&quot;http://www.w3.org/2005/xpath-functions&quot;:analyze-string-result)

without raising error XPST0008?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62671</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-01-13 17:16:05 +0000</bug_when>
    <thetext>I don&apos;t think the current text says anything which would allow you to infer that these types are in-scope. The mere fact that an instance document carries a type annotation doesn&apos;t make the name of that type available at compile time.

We could choose to make these type names &quot;built in&quot; so that they are always in-scope, but we don&apos;t currently do so, I think.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65863</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-03-20 18:30:44 +0000</bug_when>
    <thetext>The WG determined that these schema types are not automatically part of the static context, though implementations are free to add them to the static context if they wish. (In which case they must declare that they do so, since addition of extra things to the static context is implementation-defined). A non-normative note to this effect will be added to the fn:analyze-string specification.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74956</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-10-01 19:54:59 +0000</bug_when>
    <thetext>Added this note belatedly, as agreed. Note that F+O can only really say that the contents of the static context are host-language defined; a host language could if it wished say that these schema components will always be present in the static context. So the note says:

&lt;p diff=&quot;add&quot; at=&quot;L&quot;&gt;The declarations and definitions in the above schema are not automatically
            available in the static context of the &lt;code&gt;fn:analyze-string&lt;/code&gt; function call (or of any other expression).
            The contents of the static context are host-language defined, and in some host languages are implementation-defined.&lt;/p&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75044</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-10-02 12:56:52 +0000</bug_when>
    <thetext>Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>