XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] 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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS