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

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]

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