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

Re: XML Encoding of XPath: Examples

  • From: Murata Makoto <mura034@a...>
  • To: xml-dev@x...
  • Date: Sun, 18 Mar 2001 21:32:14 +0900

xpath examples
> >In the tree case, we have a similar result.  The expression approach
> >such as XPath (and thus Schematron) and the automaton approach such
> >as RELAX and TREX are inherently equivalent.
> 
> I disagree. Sort of. They are equivalent only from a theoretical and
> reductionist view.

I have already proved equivalence in my paper.  Please read it.  

> As long as Xpaths are not as powerful as regexes by not having grouping or
> reptition, and as long as regexes do not allow full XPaths for particles,
> current grammar-based and path-based systems are not remotely equivalent in
> fact.

Right.  I did not say that XPath is as expressive as RELAX or TREX.  
I just said that the expression approach and the automaton (or gramamar) 
approach are inherently equivalent.

>And it is the higher-level abstractions which the schema uses to model
>things that give much of the value of language.  Schematron has no notion of
>type. XML Schemas has no equivalent to Schematron's pattern. To say
>"equivalent" may confuse people that the equivalence is the same equivalence
>as saying "C# is equivalent to Java" rather than "a C++ program is
>equivalent to its binary compiled form": equivalence does not mean
>equivalently useful or useable or congenial.

If you dislike the word "equivalent", I am happy to switch to "equally
expressive", "exactly capture", etc.  I use these phrases as a computer 
science term.

>For example, lets have a pattern called "three equal sized arrays in three
>documents" with the definition  "the number of children in element X in this
>document should be the same as the number of children of element Y in that
>document (URL given in the attribute @Y on the X element in this document)
>and it should be the same as the number of children of element Z in another
>document (URL given as the attribute @Z on the X element in this document)."

Regular expressions and automata are equally expressive when we use
their original definitions.  However, people have introduced many
mechanisms such as back references (which is your example) to regular
expressions.  I agree that such extension make regular expressions
more expressive than automata or grammars.  Nevertheless, automata and
grammars continue to be useful, and thus original regular expressions
remain important.  I am talking about such original regular
expressions.

Cheers,

Makoto

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.