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

Re: MicroXML

  • From: James Clark <jjc@jclark.com>
  • To: Andrew Welch <andrew.j.welch@gmail.com>
  • Date: Mon, 13 Dec 2010 17:29:14 +0700

Re:  MicroXML
I can definitely see advantages in this option.  I would summarise it as:

- no colons in element or attribute names,
- except that attribute names can start with "xml:";
- there's nothing to stop you having an attribute called "xmlns", but MicroXML will treat it just like any other attribute

Big upside: guaranteed to be namespace well-formed; simpler.

Big downside: some XML infosets cannot be expressed.

I would be interested to know whether others also find this option preferable.

James

On Mon, Dec 13, 2010 at 5:12 PM, Andrew Welch <andrew.j.welch@gmail.com> wrote:
On 13 December 2010 09:42, James Clark <jjc@jclark.com> wrote:
> On Mon, Dec 13, 2010 at 4:33 PM, Andrew Welch <andrew.j.welch@gmail.com>
> wrote:
>>
>> On 13 December 2010 09:01, James Clark <jjc@jclark.com> wrote:
>> > I wrote a post describing a fairly minimal subset of XML:
>> >    http://blog.jclark.com/2010/12/microxml.html
>>
>> Looks great - apart from the xmlns requirement if prefixes are used...
>> doesn't that make it no longer a subset?
>
> It's designed to be a subset of XML 1.0 but not of XML 1.0 + XML Namespaces.

...I think everyone takes "XML" to mean "XML 1.0 + XML Namespaces" so
to say something is a "subset of XML" but not mean namespaces you
might get done for false advertising :)

> However, it does allow you to make your documents be namespace well-formed
> if you want.  This is a tough problem: full XML Namespaces seems like too
> much complexity, so I've tried to find a compromise.

If you didn't have to compromise, what would you do?  I would say in
situations where namespace-like features are needed, use XML 1.0.


>> b) use an underscore or dot, eg <mycomp.foo>
>>
>
> You could just disallow colons in element and attribute names, but then you
> lose the ability to work with XML vocabularies that require the use of the
> non-default namespace (eg xlink:*, xml:*).

Is that an issue...?  If so, use xml 1.0.

The kind of use-case for MicroXML that I see is where someone is given
the task of creating some XML for the first time and they need some
guidance on what to do... a quick google reveals "MicroXML" to be the
best easiest format for simple XML, and they follow the rules "no
namespaces", "no DTDs", "no CDATA sections" etc and create some good
clean XML that's then easy to work with.

At the moment, the inclination seems to be to use a default namespace
just because that seems like the right thing to do, they leave off the
prolog but save the file in Windows-1252, wrap all text in CDATA
sections and/or run the XML through some custom escaping code...  an
ultra-simple alternative would solve all of that.


--
Andrew Welch
http://andrewjwelch.com


  • References:

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