[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Testing XML don't use xUnit

  • From: George Cristian Bina <george@oxygenxml.com>
  • To: ihe.onwuka@gmail.com
  • Date: Thu, 11 Apr 2013 06:04:00 +0300

Re:  Testing XML don't use xUnit
Hi Ihe,

People asked for a Schematron example that you think cannot be written 
as an XPath only test then they wanted to show you the equivalent XPath 
for that.

Basically, in Schematron you have

rule/@context = XPath expression
assert/@test = XPath expression

these can be written in XPath 2.0 as

//(context)/test

where context is the rule/@context expression and test is the 
assert/@test expression.

So, the challenge will be to come up with a Schematron example for which 
someone cannot write an XPath equivalent. If you cannot provide such an 
example then you should accept that they are equivalent, at least for 
your use cases.

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 4/11/13 2:57 AM, Ihe Onwuka wrote:
> On Wed, Apr 10, 2013 at 8:14 PM, Andrew Welch <andrew.j.welch@gmail.com> wrote:
>> On 10 April 2013 17:30, Dimitre Novatchev <dnovatchev@gmail.com> wrote:
>>>> I'm completely bemused.
>>>
>>> So am I :)
>>
>> I have been for a while with this thread...
>>
>> I haven't been convinced of any problems with the technique I've been
>> using for a few years now (and other's too by the sounds of it), so
>> I'm happy to carry on using it.
>>
>
> You asked for an example. I gave you an example of code you wrote
> yourself which I can only presume is representative of test cases you
> write.
>
> String someValue = runQueryOnInput("/some/path/to/val/string(.)");
>
> String valueInResult = runQueryOnOutput("/result/path/to/val/string(.)");
>
> assertEquals(someValue, valueInResult);
>
> I told you all the vulnerabilities it had.
>
> Then you asked for another example and at this point I would
> respectfully point out that I am not willing to drop what I am doing
> to look for another example  every time you ask me to  when the
> example already provided is sufficient to illustrate the point.
>
> The argument in this thread was against plain xUnit. You said
> something about spinning some homebrew xQuery that I don't really get
> but it looks like it introduces an additional dependency and skillset
> demand over and above plain xUnit. Thats not what the thread is about.
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.