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]
XPath as a machine-testable, machine-executable data specificationlanguage

Hi Folks,

 

1. Most sentences written in natural languages are subject to differing interpretations. That is, sentences are ambiguous.

 

2. Natural language sentences are not machine-testable or machine-executable.

 

3. Data specifications are often written in a natural language.

 

4. Therefore data specifications are ambiguous, not machine-testable, and not machine-executable.

 

5. Of course, you can create a bunch of unit tests for a data specification that is written in a natural language. But the developers of those unit tests may have misinterpreted the—ambiguous—specification.

 

6. Data relationships in XML-formatted data can be expressed using XPath.

 

7. The meaning of XPath expressions have been precisely, rigorously defined. In fact, XPath expressions have been so rigorously defined, they can be processed by a machine.

 

8. XPath is a machine-executable data relationship language.

 

9. A data specification specifies data relationships.

 

10. Therefore the data relationships in a data specification can be expressed in a machine-testable and machine-executable manner using XPath.

 

11. Although it can be challenging to write correct XPath expressions, with care it is possible.

 

12. The benefit of using XPath as a data specification language is an unambiguous, rigorous, machine-testable, and machine-executable data specification.

 

Recommendations:

 

a. Format your data as XML.

 

b. Use XPath to create a machine-testable, machine-executable data specification.

 

c. Supplement the XPath expressions in the data specification with a natural language description.

 

d. Make the XPath normative and the natural language description non-normative.

 

Thoughts?

 

/Roger

 

P.S. JSON does not have an equivalent XPath language. Rather, there is a JSON Pointer language, but it is very limited and not suitable as a full-fledged machine-executable data relationship language. This gives XML an edge over JSON.

 

 



[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