RE: CMChildren

Hi Rezaur,

At 11:35 AM 6/03/2001 -0800, you wrote:
> > with e.g. a DTD declaration like
> >     <!ELEMENT example (((child1, child2*)*) | child3+)>
> > because what kind of hierarchy of list-operators, CMChildren
> > and submodels
> > would you get here?
>The CMChildren describe the element declaration through a parse tree. The
>listOperator and the submodel describes this tree. So the structure for the
>above example will look like this:
>1. The element declaration for "Example" will point to a CMChildren say
>CMCh1.
>ElementDeclaration Example= {
>   contentType = ELEMENT;
>   CMChildren = CMCh1;
>   CMNamedNodeMap = EmptyNamedNodeMap; /* no attributes defined */
>   CMNamedNodeMap = {child1,child2,child3);
>}
>
>2. The structure of CMChildren CMCh1 will be like this.
>
>CMChildren CMCh1 = {
>      listOperator = "|";
>      elementType = 1; /* string data type */
>      multiplicity = 1;
>      CMNamedNodeMap={(CMChildren CMCh2)(CMChildren CMCh3)};
>      isPCDataOnly = false;
>};
>
>
>CMChildren CMCh2 =
>      listOperator = ",";
>      elementType = 1; /* string data type */
>      multiplicity = 0|many;
>      CMNamedNodeMap={(CMChildren CMCh4)(CMChildren CMCh5)};
>      isPCDataOnly = false;
>};

As the order of the sub-models is important for a sequence operator, should 
CMNodeList be used for "submodels" instead of CMNamedNodeMap?  According to 
the working draft:
         "CMNamedNodeMap is the CM analogue to NamedNodeMap. The order is 
not meaningful."


>CMChildren CMCh4 =
>      listOperator = "";
>      elementType = 1; /* string data type */
>      multiplicity = 1;
>      CMNamedNodeMap={(ElementDeclaration child1)};
>      isPCDataOnly = false;
>};
>
>CMChildren CMCh5 =
>      listOperator = "";
>      elementType = 1; /* string data type */
>      multiplicity = 0|more;
>      CMNamedNodeMap={(ElementDeclaration child2)};
>      isPCDataOnly = false;
>};
>
>CMChildren CMCh3 =
>      listOperator = "";
>      elementType = 1; /* string data type */
>      multiplicity = 1|more;
>      CMNamedNodeMap={(ElementDeclaration child3)};
>      isPCDataOnly = false;
>};
>
>Hope this helps.

The example has been extremely useful.

Thanks.
Ernest Wan

Received on Wednesday, 7 March 2001 09:25:45 UTC