[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] what do "compositor" and "particle" mean?
- From: Michael Kay <mike@saxonica.com>
- To: xml-dev@lists.xml.org
- Date: Wed, 08 Dec 2010 11:33:50 +0000
On 08/12/2010 05:52, Thufir wrote:
> What's the derivation of these words in relation to schema? I don't
> really understand the definition nor distinction between the two.
Yes, it's terribly confusing.
Think of the grammar (the content model for a complex type) as a tree.
Particles are the nodes on that tree. The terminal nodes are element
particles and wildcard particles; the non-terminal nodes are model group
particles. A compositor (all, choice, sequence) is a label or property
appearing on a non-terminal node in the tree.
By analogy, think of the tree for an expression like (a + b*c). There
are terminal (leaf) nodes representing the symbols a, b, c, and
non-terminal (non-leaf) nodes representing the operators + and *. All
the nodes are particles; the compositors correspond to the operators (+,
*) appearing as labels on the non-leaf nodes. Now replace this
expression with a grammar like (a | b c); hopefully the analogy becomes
clear.
Michael Kay
Saxonica
> At
> the moment, I'm referencing
>
> http://www.xml.com/pub/a/2000/11/29/schemas/part1.html?page=4
>
> for the most part as a tutorial.
>
> compositors:
> sequence
> choice
> all
>
> particles:
> element
> sequence
> choice
>
> but would welcome pointers to better material explaining this
> particular sub-topic in more detail as I haven't found a better source
> as of yet.
>
>
> thanks,
>
> Thufir
>
> _______________________________________________________________________
>
> 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]