<?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>21882</bug_id>
          
          <creation_ts>2013-04-30 19:11:46 +0000</creation_ts>
          <short_desc>FOTS test case function-literal-494 should raise an error instead of returning result.</short_desc>
          <delta_ts>2013-05-01 08:21: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>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</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="Markos Zaharioudakis">markos_za</reporter>
          <assigned_to name="O&apos;Neil Delpratt">oneil</assigned_to>
          <cc>mike</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>87042</commentid>
    <comment_count>0</comment_count>
    <who name="Markos Zaharioudakis">markos_za</who>
    <bug_when>2013-04-30 19:11:46 +0000</bug_when>
    <thetext>The string given as argiment to the xs:normalizedString() function does not conform to the facets of xs:normalizedString, and as a result, the test should raise FORG0001, according to http://www.w3.org/TR/xpath-functions-30/#casting-within-branch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87044</commentid>
    <comment_count>1</comment_count>
    <who name="Markos Zaharioudakis">markos_za</who>
    <bug_when>2013-04-30 19:13:12 +0000</bug_when>
    <thetext>This applies to test case fn-function-lookup-494 as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87045</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2013-04-30 20:25:35 +0000</bug_when>
    <thetext>The relevant rules are in F+O section 18.2. To quote:

The supplied string is mapped to a typed value of the target type as defined in [XML Schema Part 2: Datatypes Second Edition]. Whitespace normalization is applied as indicated by the whiteSpace facet for the datatype. The resulting whitespace-normalized string must be a valid lexical form for the datatype. The semantics of casting follow the rules of XML Schema validation.

I think you have overlooked the rule about whitespace normalization. The whitespace facet for xs:normalizedString is &quot;replace&quot;. This means that the first thing casting does is x09, x0A, and x0C by x20; after this replacement the value is within the lexical space of xs:normalizedSpace and casting therefore succeeds.

The rules in 18.2 take precedence over those in 18.3.3 by virtue of the fifth paragraph of section 18 which states: &quot;When casting from xs:string or xs:untypedAtomic the semantics in 18.2 Casting from xs:string and xs:untypedAtomic apply, regardless of target type.&quot;

I am therefore closing this as invalid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87056</commentid>
    <comment_count>3</comment_count>
    <who name="Markos Zaharioudakis">markos_za</who>
    <bug_when>2013-04-30 23:45:16 +0000</bug_when>
    <thetext>Thanks for the clarification.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>