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

Re: Inherent limitation in the expressability of XML markup?

  • From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Mon, 21 Mar 2011 20:02:24 +0800

Re:  Inherent limitation in the expressability of XML markup?
At 2011-03-21 07:22 -0400, Costello, Roger L. wrote:
>XPath is a non-XML syntax.
>...
>Why isn't this co-constrain expressed using XML markup? Why do we 
>resort to non-XML syntax?

Because it is compact!

Note, Roger, that XQueryX has an XML vocabulary for XPath:

   http://www.w3.org/TR/xqueryx/

... an example from the spec ... who would want to write this each day?:

   <xqx:pathExpr>
     <xqx:stepExpr>
       <xqx:filterExpr>
         <xqx:functionCallExpr>
           <xqx:functionName>doc</xqx:functionName>
           <xqx:arguments>
             <xqx:stringConstantExpr>
               <xqx:value>http://bstore1.example.com/bib.xml</xqx:value>
             </xqx:stringConstantExpr>
           </xqx:arguments>
         </xqx:functionCallExpr>
       </xqx:filterExpr>
     </xqx:stepExpr>
     <xqx:stepExpr>
       <xqx:xpathAxis>child</xqx:xpathAxis>
       <xqx:nameTest>bib</xqx:nameTest>
     </xqx:stepExpr>
     <xqx:stepExpr>
       <xqx:xpathAxis>child</xqx:xpathAxis>
       <xqx:nameTest>book</xqx:nameTest>
     </xqx:stepExpr>
   </xqx:pathExpr>

Not me!

>Does it indicate an inherent limitation in the expressability of XML markup?

It's verbosity.

>  Has anyone characterized this limitation?

When you have tools to interact with to create verbose XML syntax, 
then having a compact syntax is not as important.  But there is so 
much to say in an XPath address, that having the compact syntax is 
probably easier than creating a tool for the user interface for XPath.

Note in this regard that RELAX-NG has its own compact syntax that is 
isomorphic to the XML syntax.  When I'm not worried about 
composability or manipulating a RELAX-NG grammar, and I'm not using a 
tool, I far prefer writing a schema by hand in the compact 
syntax.  When I do need to machine-process a RELAX-NG grammar, I use XML.

Horses for courses.

I hope this helps.

. . . . . . . . . . Ken


--
Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/x/
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal



[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.