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

Re: XML Redux

  • From: "Pete Cordell" <petexmldev@codalogic.com>
  • To: "Michael Kay" <mike@saxonica.com>,<xml-dev@l...>
  • Date: Tue, 15 Feb 2011 13:27:34 -0000

Re:  XML Redux
Original Message From: "Michael Kay"
> So we might have
>
> {  authors: [
>       {name: "Michael Kay", affiliation: "Saxonica"},
>       {name: "Liam Quin", affiliation: "W3C"}
>    ]
>    abstract: <para { style : "bold" }>Here be some dragons</para>
>    content: <section { numbers : [1,1,2] }><para>...</para></section>
> }

I like the direction of this.  I see a slight problem when you don't want
your marked up text to start with markup.  i.e. you want:

    abstract: Here be <em>some</em> dragons

Maybe you have to do:

    abstract: <Here be <em>some</em> dragons>

and:

    abstract: <<para { style : "bold" }>Here be some dragons</para>>

such that '<' denotes the start of a special kind of construct in the same
way that '{', '[', and '"' denote the start of special kinds of construct.

Also, I don't think you need the object markers around the 'attributes'.
e.g. you could simply do:

    abstract: <<para
            author: { GivenName: "Michael",
                    FamilyName: "Kay",
                    FavouriteQuote: <XSLT <em>Rocks</em>> },
            affiliation: "Saxonica">Here be some dragons</para>>

i.e. it's implicit that a marked up text type has an optional object in it. 
That said, not needing them is not a reason for not having them.  I don't 
think the commas are needed either.  They just make it look 'pretty'!

Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using C++ XML
data binding to convert XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info

Original Message From: "Michael Kay"

>
> On 14/02/2011 18:03, Liam R E Quin wrote:
>> I spent some time this weekend wondering how minimal one could make XML
>> and still have something useful. Then, like almost everyone else,
>> speculated on some random changes.
>>
>> http://www.barefootliam.org/xml/20110212-xml-redux
>>
>> (comments there are moderated to prevent spam, but should show up
>> eventually)
>>
>> Liam
>>
>>
> I'm inclined to be much more radical. There's no benefit in making
> incremental improvements that cause a lot of disruption; the world will
> stick with XML as it is today unless something radically better comes
> along. For some applications where XML has been exploited over the last
> ten years, JSON is radically better; for other applications, it's
> hopeless. Let's rethink from the ground up, learning from what has gone
> before in other traditions as well as our own.
>
> Angle brackets aren't a good way to handle structured data. It's not just
> the end tags that are redundant; there's usually no need to have separate
> names for a collection and its members, and there's no need to name each
> member of a homogeneous collection. They were invented for textual markup;
> let's stop trying to use them for other purposes.
>
> What data structures do we need? Basically those in JSON, plus structured
> text.
>
> * Maps (key - value pairs)
>
> * Sequences of values
>
> * Strings, numbers, booleans
>
> * Text elements
>
> For syntax, extend JSON with one additional kind of value - the text
> element - which looks like an XML element today, except that the
> attributes are replaced by a property of an element called its metadata
> which may be any of the above kind of values - most often a map, but not
> restricted.
>
> So we might have
>
> {  authors: [
>       {name: "Michael Kay", affiliation: "Saxonica"},
>       {name: "Liam Quin", affiliation: "W3C"}
>    ]
>    abstract: <para { style : "bold" }>Here be some dragons</para>
>    content: <section { numbers : [1,1,2] }><para>...</para></section>
> }
>
> This uses the tagging syntax where it was designed to be used, for textual
> markup; it uses notations designed for structured data when we want to
> hold structured data; and it gives full composability between the two -
> including of course elements within the metadata of another element.
>
> Michael Kay
> Saxonica
>
>
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>




  • Follow-Ups:

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