OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] MicroXML

On Mon, Dec 13, 2010 at 5:29 PM, James Clark <jjc@jclark.com> wrote:
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.

In particular SVG is a problem, because it uses <a xlink:href=""...">" to do links.  But http://www.w3.org/Graphics/SVG/WG/wiki/Href says:

The SVG WG is considering allowing the href attribute to be used without the xlink: prefix, and possibly to allow incoming references to use the src attribute, for syntactic similarity to HTML, for SVG 2.0 (this does not affect SVG 1.1).

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


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.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS