Re: Testcase attrcreatetextnode2.xml in level1/core does not exercise the test

Comments inlined.

--Mary
  ----- Original Message ----- 
  From: Curt Arnold 
  To: www-dom-ts@w3.org 
  Cc: Rick Rivello ; Mary Brady 
  Sent: Wednesday, April 24, 2002 12:34 PM
  Subject: Re: Testcase attrcreatetextnode2.xml in level1/core does not exercise the test


  There appears to have been a 24 hour delay in messages getting relayed.  It is not just you.

  The conformant value is "Y&ent1;" or "Y%ent1" depending on the test.  The test was intended to expose a potential flaw where the parameter was processed through an entity expansion step.  If that flaw existed then "Y&ent1;" would be incorrectly expanded to "Yes", however "Y%ent1" would either not be recognized as anything special or even more unlikely as a incomplete parameter entity reference.  If such a flaw existed, "Y&ent1;" is much more likely to expose it than "Y%ent1".

  I believe the use of the same fragment "Y&ent1;" in staff.xml and in the test was intentional, that the test author wanted to do something with a DOM method that looked very much like content in the XML document, but had different results due to the entity expansion step in parsing the XML document and the lack of an entity expansion step in processing values set by DOM methods.

  I don't think there is any difficulty distinguishing between the initial state and a conformant state.  After the setValue call, the attribute would have a value that would have required the XML document to have contained "Y&ent1;".

  I'm pretty sure that attrcreatetextnode3 does what the author of attrcreatetextnode was wanting to do but didn't quite accomplish.

  [mb] I disagree -- it was simply a mistake in invoking the entity.  These tests were originally authored here at NIST, so I'm privy to what the 
  author intended.  This one was written early on and has simply been translated into java and then DOM TSML with the error.  The intent of 
  the test was to set it to "Y&ent1;" and it was simply an error.  I don't see the need for four tests (and find having four of them rather 
  confusing), and don't believe that having a test that sets the value to a flawed parameter entity reference is particularly useful.  Overall, 
  the goal here is to have a good set of conformance tests.  I don't see problems in modifying flawed tests to do what they should do rather 
  than creating additional tests.  Just simply make the corrections, and update the metadata.  The cvs log will annotate differences and 
  allow one to see the progression of the tests.  Additional tests should only be created if something else needs to be tested.    
    ----- Original Message ----- 
    From: Mary Brady 
    To: www-dom-ts@w3.org 
    Cc: mbrady@nist.gov 
    Sent: Wednesday, April 24, 2002 8:45 AM
    Subject: Re: Testcase attrcreatetextnode2.xml in level1/core does not exercise the test


    Hmmm -- not I'm even more confused.  When I looked at 
    the original test, I thought that the expected result was 
    supposed to be "Y&ent1;", not the expanded version.  I 
    don't have the spec in front of me at the moment, but I 
    believe both it and the comment against it were that the 
    expected result should not expand the entity, rather be 
    the text itself.  Thus, there was a problem with the test, 
    setting the result to "Y%ent1" instead of "Y&ent1;".  At 
    that point, I would have changed the test to simply use 
    "Y&ent1;" instead.  After further consideration, it might 
    be better to change it to be some other entity, maybe 
    "Y&ent2;", since that particular attribute is already set 
    to "Y&ent1;" in the staff.xml file -- it's difficult to determine 
    that the setValue actually did anything otherwise.

    --Mary

    P.S.  Please for the moment cc: Rick and/or myself or 
    www-dom-ts issues if you want feedback.  We seem to 
    be having problems getting mail from this list.

Received on Wednesday, 24 April 2002 13:39:27 UTC