<?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>2903</bug_id>
          
          <creation_ts>2006-02-20 23:29:34 +0000</creation_ts>
          <short_desc>fn-idref-xx incorrect input specified</short_desc>
          <delta_ts>2006-08-09 10:00:19 +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>PC</rep_platform>
          <op_sys>Windows XP</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="Carmelo Montanez">carmelo</assigned_to>
          <cc>amassari</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>8341</commentid>
    <comment_count>0</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-02-20 23:29:34 +0000</bug_when>
    <thetext>fn-idref-5 is specified as taking emptydoc as input-context1
but is specified as generating a non-empty result.
I fail all the following for probably the same reason
fn-idref-5
fn-idref-6
fn-idref-7
fn-idref-8
fn-idref-9
fn-idref-10
fn-idref-11
fn-idref-12
fn-idref-13
fn-idref-14
fn-idref-15
fn-idref-16
fn-idref-17
fn-idref-18
fn-idref-19
fn-idref-20
fn-idref-21</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8570</commentid>
    <comment_count>1</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-03-06 15:42:47 +0000</bug_when>
    <thetext>David:

Correct.  Changed the catalog file to load the correct file.  Please close the
bug if in agreement and able to verify.

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8629</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-03-08 16:31:47 +0000</bug_when>
    <thetext>It would be helpful, Carmelo, if you could tell us what the correct source file is!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8656</commentid>
    <comment_count>3</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-03-09 19:21:00 +0000</bug_when>
    <thetext>oops sorry.  It is &quot;id.xml&quot;.  I will submit a new version of it now.
The one that was released, I am afraid may not be good enough to run the 
tests.  I can e-mail you a copy of it or you can grab it from the
CVS repository.  Should be ready in about 10 minutes.

Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9486</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-04-27 08:17:07 +0000</bug_when>
    <thetext>The id.xml file included in the 0.9.0 distribution is wrong. It contains elements such as

&lt;elementwithidref-1&gt;id1&lt;/elementwithidref-1&gt;

where id1 is supposedly an IDREF value; but there is no way of achieving this with a DTD, it can only be achieved with a schema. DTDs only allow IDREF attributes, not IDREF elements. The DTD defines this element as &lt;!ELEMENT elementwithidref-1 (IDREF)&gt; which declares an element that has a child element named IDREF (and doesn&apos;t allow #PCDATA content) - this document therefore isn&apos;t even valid against the DTD.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9568</commentid>
    <comment_count>5</comment_count>
    <who name="Alberto Massari">amassari</who>
    <bug_when>2006-05-03 13:20:18 +0000</bug_when>
    <thetext>Also, the DTD is missing this declaration

&lt;!ATTLIST elementwithid-5
    anId ID #REQUIRED&gt;

Also, it would be helpful if the DTD was defined in an external file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9569</commentid>
    <comment_count>6</comment_count>
    <who name="Alberto Massari">amassari</who>
    <bug_when>2006-05-03 13:22:19 +0000</bug_when>
    <thetext>Another limitation of DTDs is that an element can only have one ID attribute: so

&lt;!ATTLIST elementwithid-4 
    anId3 ID #REQUIRED
    anId4 ID #REQUIRED&gt;    

is not correct</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9582</commentid>
    <comment_count>7</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-05-03 19:16:17 +0000</bug_when>
    <thetext>All:

I will turn the file into a schema.

Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9789</commentid>
    <comment_count>8</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-05-15 20:19:49 +0000</bug_when>
    <thetext>David:

Thanks for the comment.  The &quot;id.xml&quot; was modified to be valid in relation 
to the &quot;id.xsd&quot; schema.  The tests were changed to reflect schema usage. 
New tests (and where required, new results) were submitted.  Catalog file was changed to reflect new inputs.  

Please close the bug in in agreement.  Somehow I think this is not quiet over yet.

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9986</commentid>
    <comment_count>9</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-06-13 12:11:30 +0000</bug_when>
    <thetext>Reopening this one.
the tests that now depend on PSVI input (eg fn-idref-5) should be moved to an optional area of the test suite for systems supporting the schema import feature, or (less useful)
alternative expected results should be provided for the case that there are no
nodes of type ID or IDREF in the input (as no DTD is provided).

If the tests are left in the minimal conformance area, and just additional expected result files are provided which typically will be empty as nothing will be selected by id() or idref() then the tests are seriously weekened as a system would &quot;pass&quot; the tests if it just had a stub implementation that always returned ().




David
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9992</commentid>
    <comment_count>10</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-06-13 14:38:11 +0000</bug_when>
    <thetext>Dave:

Thanks for the message.  Although I agree with you that adding the extra
outcome can weaken the test somewhat, I will be relutant to just move the tests
as there are others, which use schema and still part of the minimal
area tests.  

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9994</commentid>
    <comment_count>11</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-06-13 15:03:30 +0000</bug_when>
    <thetext>It doesn&apos;t just weaken them a bit, it really renders them pointless as a system can pass them just by making the functions no-op. 

Where there are multiple output-files supplied then (where it makes sense) there should be an extra attribute in the catalogue saying which kinds of processors should use which
expected result file. So in this case a system supporting psvi input would be required to return the current expected result file, and a system  not supporting psvi input would be required to return an empty result. There should also be some tests testing id/idref based on dtd declarations so that non schema systems also get tested for real implementations of id/idref. Note that supporting psvi input is not the same as supporting the schema import feature.
(Perhaps it should be. XSLT2 for example bans a system  that does not support schmema import from supporting schema type annotations on input)


&gt; I will be relutant to just move the tests
&gt; as there are others, which use schema and still part of the minimal
&gt; area tests.

Which is an architectural bug in the test suite, that &quot;minimal&quot; set of tests requires a feature that is explictly out of scope of the spec. The real fix is just not to do that, masking the problem by providing multiple result files, especially if these are not categorised in any way, is just papering over the cracks.



David (not really as grumpy as the above may indicate)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10012</commentid>
    <comment_count>12</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-06-13 19:00:14 +0000</bug_when>
    <thetext>Dave:

Thanks for the point.  We will look into this issue at the conf call.
Your comments are always welcome.  You provide good feedback.

Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10128</commentid>
    <comment_count>13</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-06-19 20:00:30 +0000</bug_when>
    <thetext>Just one extra minor detail to add to this sorry tale: in converting the tests to work with a schema, the namespace of the source documents was changed, but the namespace of the result documents was left null. So of course all the results are wrong even if you can get the test working.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10167</commentid>
    <comment_count>14</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-06-20 17:21:29 +0000</bug_when>
    <thetext>Dave:

We discussed your suggestions, but yet decided that it is better to leave the tests where they are and just allow for the alternate results.  We are very much aware of your arguments, but given the nature of fn:id and fn:idref,
a schema seems like a natural for those.

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10185</commentid>
    <comment_count>15</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-06-21 10:08:15 +0000</bug_when>
    <thetext>&gt; but given the nature of fn:id and fn:idref,
&gt; a schema seems like a natural for those.

I disagree, sorry.
ID and IDREF have been supported in DTD based products for around 20 years now,
so rather longer than XSD schema has been around. A conforming XQuery system explictly does not need to support XSD schema, but does need to support the core F&amp;O functions relating to ID processing. Given that XSD support in Xquery is an
optional feature, it is wrong to use it to test mandatory features.

David

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10222</commentid>
    <comment_count>16</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-06-23 14:33:00 +0000</bug_when>
    <thetext>Dave:

I write a DTD version of the ID/IDREF tests and make them available
from the basic area. 

Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10223</commentid>
    <comment_count>17</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-06-23 14:41:54 +0000</bug_when>
    <thetext>Thanks, sorry to cause extra work:-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10224</commentid>
    <comment_count>18</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-06-23 15:23:38 +0000</bug_when>
    <thetext>Its not a problem at all.  Hallf way there already!

Carmelo</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>