XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
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] RE: Build Rich Complexity from a Small Set ofWell-Defined Markup Combinators

Costello, Roger L. scripsit:

> RELAX NG has 9 markup combinators (element, attribute, reference,
> parent reference, empty, text, datatype, typed value, notAllowed)
> and 8 combining mechanisms (sequence, interleave, choice, optional,
> zeroOrMore, oneOrMore, list, mixed).

I should have left out parent reference, as the distinction between
references and parent references pertains to the way RELAX NG patterns
are arranged into grammars, and doesn't matter at this level.

Additionally, the combining patterns can be reduced to just sequence,
interleave, choice, oneOrMore, and list by the following reduction rules:

optional(p) = choice(p, empty)
zeroOrMore(p) = choice(oneOrMore(p), empty)
mixed(p) = interleave(p, text)

So that makes 8 basic patterns and 5 combining patterns.

> What other guidelines can you provide to those embarking on creating
> a markup language? Rich Salz mentioned the word "orthogonal". Would
> someone expound upon the role of orthogonally in creating markup
> combinators and combining mechanisms for a markup language?

"Orthogonality" is another way of saying "no special case rules", which
you already addressed.  RELAX NG is not perfectly orthogonal, but it is
far more so than XSD.  Most of the restrictions are those of XML: for
example, you can't have two attribute patterns of the same name within
the same element pattern, or an element or attribute pattern within an
attribute pattern, or a datatype as the top-level pattern.

The three main additional restrictions are:

1) You can't have a text pattern or an element pattern with a given name
on both sides of an interleave.

2) You can't combine simple-content patterns (datatype, typed value,
and list) except by using a choice.

3) An element or attribute can't contain both a simple-content pattern and
a complex-content pattern unless they are on opposite sides of a choice.

Compare this with the approximately 100 constraints on XML Schemas.

-- 
John Cowan            http://www.ccil.org/~cowan     cowan@ccil.org
Uneasy lies the head that wears the Editor's hat! --Eddie Foirbeis Climo


[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