[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: Radu Cernuta <radu.cernuta@gmail.com>
  • To: John Cowan <cowan@mercury.ccil.org>
  • Date: Fri, 26 Aug 2011 10:58:46 +0300

Re:  RE: Build Rich Complexity from a Small Set ofWell-Defined
I'm not sure I understand how “markup combinators” are defined and why
are they called like this, but they seem to be the named global
components of the XML Schema and the xs:schema element itself. If I
understand well, the base of this grouping is the fact that  they can
all be referenced from within a schema, either by name, or by URI. The
referencing is done with the purpose of providing modularity so that
grammars can be assembled in a variety of ways.

If this is the case, the RELAX NG correspondent of “markup
combinators” is not what was previously called the “basic patterns”.

In RELAX NG referencing is achieved with rng:ref within one
rng:grammar pattern, rng:parentRef  to the parent rng:grammar pattern
within the same schema document entity, and rng:externalRef  over
different schema document entities. In all those situations the
reference is replaced by the referenced.

For allowing redefinitions, additional grammar assembling mechanisms
are available, namely the merging of grammars using rng:include
element and the combining of definitions of the same name using the
combine attribute.

Radu Cernuta

2011/8/25, John Cowan <cowan@mercury.ccil.org>:
> 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
> _______________________________________________________________________
> 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

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


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.
First Name
Last Name
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.