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

Re: RE: Build Rich Complexity from a Small Set ofWell-Defined

  • From: John Cowan <cowan@mercury.ccil.org>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Thu, 25 Aug 2011 10:13:53 -0400

Re:  RE: Build Rich Complexity from a Small Set ofWell-Defined
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]


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.