← Prev in month ← Prev in thread
Next in thread → Next in month →

Re: [xml-dev] Inherent limitation in the expressability of XML markup?

From
G. Ken Holman <>
To
"" <>
Date
2011-03-21T12:02:24Z
ID
<>
Thread
Re: [xml-dev] 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:
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
← Prev in month ← Prev in thread
Next in thread → Next in month →