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

Re: Improving XML desing?


fence desing
<juanrgonzaleza@c...> wrote:
> In
>
> [http://canonicalscience.blogspot.com/2006/04/canonml-markup- 
> language-beyond-tex-xml.html]
>
> i presented some basic thoughts on CanonML, a markup language  
> beyond TeX,
> XML, and alternatives as liminal, GODDAG, SGML concur, and others.  
> The new
> approach is clearly inspired in SXML.

Many people have already commented that s-expressions are more  
concise than XML. The standard rebuttal is that with deeply embedded  
tree structures it is virtually impossible to visually locate the end  
tag and therefore know which element ends where. Therefore, for  
trivial examples s-expressions are more readable, whereas for more  
complex examples XML is much more readable. CanonML appears to be yet  
another s-expression language, with confusing additional syntax that  
appears to serve no purpose (such as double colons), redundant  
duplication of forms ([::x] versus \x). It introduces not only the  
above problem but also

- confusion over whether whitespace is part of the text content or  
the markup (a step backward from SXML)
- lack of processing instruction mechanism
- lack of comment mechanism
- lack of character encoding mechanism
- lack of reusable entity mechanism
- lack of mechanism for modularity of documents (within different  
resources)
- lack of differentiation between unordered and ordered properties  
(XML attributes vs. child elements)

> Some of technical points of CanonML are beyond XML (i mean if one wait
> backward compatibility with XML 1.0-1.1), but other points could be
> considered for discussion on a future XML specification.

Not with your current proposal. The only advantage I can see to your  
language is that it may be slightly more readable for some small  
class of trivial documents. Now let's consider a more reasonable  
example:

<math xmlns='http://www.w3.org/1998/Math/MathML'>
   <mrow>
     <mo fence='true'>&#x2225;</mo>
     <mrow>
       <msup>
         <mi mathvariant='bold'>v</mi>
         <mi>L</mi>
       </msup>
       <mo>-</mo>
       <msubsup>
         <mi mathvariant='bold'>w</mi>
         <msup>
           <mi>c</mi>
           <mi>L</mi>
         </msup>
         <mi>L</mi>
       </msubsup>
     </mrow>
     <mo fence='true'>&#x2225;</mo>
     <mo>&le;</mo>
     <mo fence='true'>&#x2225;</mo>
     <mrow>
       <msup>
         <mi mathvariant='bold'>v</mi>
         <mi>L</mi>
       </msup>
       <mo>-</mo>
       <msubsup>
         <mi mathvariant='bold'>w</mi>
         <mi>i</mi>
         <mi>L</mi>
       </msubsup>
     </mrow>
     <mo fence='true'>&#x2225;</mo>
     <mo>&forall;</mo>
     <mi>i</mi>
   </mrow>
</math>

Let's try this in CanonML:

[::math [@ [::xmlns http://www.w3.org/1998/Math/MathML]] [::mrow  
[::mo [@ [::fence true]] â?¥] [::mrow [::msup [::mi [@ [::mathvariant  
bold]] v] [::mi L]] [::mo -] [::msubsup [::mi [@ [::mathvariant  
bold]] w] [::msup [::mi c] [::mi L]] [:mi L]]] [::mo [@ [::fence  
true]] â?¥] [::mo â?¤] [::mo [@ [::fence true]] â?¥] [::mrow [::msup  
[::mi [@ [::mathvariant bold]] v] [::mi L]] [:mo -] [:msubsup [::mi  
[@ [:mathvariant bold]] w] [::mi i] [::mi L]]] [::mo [@ [::fence  
true]] â?¥] [::mo â??] [::mi i]]]

Shorter, yes. But more readable? I know which one I'd prefer to debug  
the nesting of (and edit using vi over an ssh connection). Where does  
the second mrow element end, for instance? The third?
-- 
ç?¬ Chris Burdess
   "They that can give up essential liberty to obtain a little safety
   deserve neither liberty nor safety." - Benjamin Franklin




This is a digitally signed message part


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.