<?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>3597</bug_id>
          
          <creation_ts>2006-08-13 12:43:28 +0000</creation_ts>
          <short_desc>SeqExprCast-179 input valid?</short_desc>
          <delta_ts>2006-08-13 14:39:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>0.9.4</version>
          <rep_platform>Macintosh</rep_platform>
          <op_sys>All</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="Martin Probst">martin</reporter>
          <assigned_to name="Andrew Eisenberg">andrew.eisenberg</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>11103</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Probst">martin</who>
    <bug_when>2006-08-13 12:43:28 +0000</bug_when>
    <thetext>SeqExprCast-179 is esentially this:

(: Purpose: &apos;PDT3H2M10.001S&apos; is an invalid lexical representation for xs:dayTimeDuration. :)
xs:dayTimeDuration(&quot;PDT3H2M10.001S&quot;)

The XQuery DM spec specifies xs:dayTimeDuration to be an extension of xs:duration.

The given string matches the xs:duration pattern (PnYnMnDTnHnMnS, last n may be a fraction). The restriction is specified to be: &quot;[^YM]*[DT].*&quot;

My mad regular expression skills and sed tell me, this is a legal value for that restriction:
# echo PDT3H2M10.001S | sed -e &apos;s|[^YM]*[DT].*|Matched!|&apos;
Matched!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11104</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-08-13 14:21:40 +0000</bug_when>
    <thetext>The pattern facet restriction &quot;[^YM]*[DT].*&quot; is saying &quot;if the lexical value is valid for xs:duration and matches &quot;[^YM]*[DT].*&quot;, then it is valid for xs:dayTimeDuration&quot;. 

Or to put it another way &quot;a duration is a valid dayTimeDuration if it contains a D or a T that isn&apos;t preceded by a Y or an M.&quot;

PDT3H2M10.001S is not valid in the lexical space of xs:duration, so it&apos;s irrelevant whether it matches the restricted pattern or not.

Michael Kay
personal response</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11105</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Probst">martin</who>
    <bug_when>2006-08-13 14:29:27 +0000</bug_when>
    <thetext>I get it. Thanks for the explanation, I didn&apos;t pay attention to the fact that xs:duration always requires a Y component.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>