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

On Thu, Apr 11, 2013 at 4:04 AM, George Cristian Bina
<george@oxygenxml.com> wrote:
> 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.
>

Would it be fair for me to characterise that as follows.

For every instance in which I can harness static dispatch semantics to
fire the correct  rule (or match the correct  template) you can define
a variable with the corresponding XPath (it cannot just be //context
because context may feature in multiple content models)  that will
lead to the correct assertion, being fired. Therefore a style of
programming that does not harness static dispatch (I'll call that pull
 procedural) is equivalent to a style of programming that does (push).


[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