Subject: ForCES XML Parsing

From: Evangelos Haleplidis <[email-masked]>
Date: Mon, 14 Nov 2005 10:38:32 +0200

Greetings to the list,

I am currently trying to create a ForCES implementation based on the
<draft-ietf-forces-model-05.txt> and the
<draft-ietf-forces-protocol-05.txt>.

As I parsed the following three xml documents:

- lfb model schema (From the model draft)
- FE Object xml (From the model draft)
- FE Protocol xml (From the protocol draft)

I report the inconsistencies I found out after the end of this e-mail.

Also I'm attaching an lfb model schema, a FE Protocol xml and an FE Object
xml, inside the xmls.zip, that have been validated.

As before I used XML Spy from Altova.

Regards,

Evangelos Haleplidis.

================

--------------
FE Protocol xml
--------------

1. Page 82

                    <synopsis>
                        The CE heartbeat policy 1, refer to RFC xxxx
                        Section 6.2.1 for details </synopsis>
                    <synopsis>

Should be changed to:

                    <synopsis>
                        The CE heartbeat policy 1, refer to RFC xxxx
                        Section 6.2.1 for details
			  </synopsis>

2. Page 85

             <synopsis>
               The CE Heartbeat Dead Interval in millisecs</synopsis>
             </synopsis>

Should be changed to:

             <synopsis>
               The CE Heartbeat Dead Interval in millisecs
             </synopsis>

3. Page 85

             <synopsis>
               The FE Heartbeat Policy</synopsis>
             </synopsis>

Should be changed to:

             <synopsis>
               The FE Heartbeat Policy
             </synopsis>

4. Page 85

             <synopsis>
               The FE Heartbeat Interval in millisecs</synopsis>
             </synopsis>

Should be changed to:

             <synopsis>
               The FE Heartbeat Interval in millisecs
             </synopsis>

5. Page 86

             <synopsis>
                The FE Restart Policy</synopsis>
             </synopsis>

Should be changed to:

             <synopsis>
                The FE Restart Policy
             </synopsis>

6. Page 86

             <synopsis>
               The CE Failover Policy</synopsis>
             </synopsis>

Should be changed to:

             <synopsis>
               The CE Failover Policy
             </synopsis>

7. Page 86

             <synopsis>
               The CE Timeout Interval in millisecs</synopsis>
             </synopsis>

Should be changed to:

             <synopsis>
               The CE Timeout Interval in millisecs
             </synopsis>

======================

-------------
FE Object XML
-------------

1. Page 87

               <version>1.0<version/>

Needs to be changed to:

               <version>1.0</version>

2. Page 82

xsi:schemaLocation="http://ietf.org/forces/1.0/lfbmodel"
           provides="FEObject">

It must be changed to:

xsi:schemaLocation="http://ietf.org/forces/1.0/lfbmodel pathTo\lfbmodel.xsd"
           provides="FEObject">

3. Page 85

                   <typeRef>OctetSting[16]</typeRef>

Must be changed to:

                   <typeRef>octetstring[16]</typeRef>

=============================

-----------
LFB Model schema
-----------

1. Page 62

          <xsd:element name=φaliasφ type="typeRefNMTOKEN"/>

Should be changed to:

          <xsd:element name="alias" type="typeRefNMTOKEN"/>

2. Page 73

          <xsd:element name="contentKey" minOccurs="0
                       maxOccurs="unbounded">

Should be changed to:

          <xsd:element name="contentKey" minOccurs="0"
                       maxOccurs="unbounded">

3. Page 74

          <xsd:element name="derivedFrom" type="typeRefNMTOKEN"
                       minOccurs="0"/>

4. Page 76 and Page 78

                <!-- ref must refer to a name of a defined frame type --

                <!-- ref must refer to a name of a defined frame type --

The -- in the end MUST BE -->. By a simple copy-paste the -- and the > in
the next line is not the same as -->.

5. Again the Key declarations:

The Key declarations must exist inside <element>s.

I. Page 74
         <xsd:key name="contentKeyID">
          <xsd:selector xpath="lfb:contentKey"/>
          <xsd:field xpath="@contentKeyID"/>
        </xsd:key>

It must be moved in page 73 just before </element>

So, the correction should be:

          <xsd:element name="contentKey" minOccurs="0
                       maxOccurs="unbounded">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="contentKeyField"
      maxOccurs="unbounded"
                             type="xsd:string"/>
              </xsd:sequence>
              <xsd:attribute name="contentKeyID" use="required"
                             type="xsd:integer"/>
            </xsd:complexType>
	         <xsd:key name="contentKeyID">
      	    <xsd:selector xpath="lfb:contentKey"/>
      	    <xsd:field xpath="@contentKeyID"/>
      	  </xsd:key>
          </xsd:element>

II. Page 74

        <xsd:key name="structElementID">
          <xsd:selector xpath="lfb:element"/>
          <xsd:field xpath="@elementID"/>
        </xsd:key>

It must be moved above again.

So the correction should be:

          <xsd:element name="derivedFrom" type="typeRefNMTOKEN"
                       minOccurs="0"/>
          <xsd:element name="element" maxOccurs="unbounded">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="name" type="xsd:NMTOKEN"/>
                <xsd:element ref="synopsis"/>
                <xsd:element name="optional" minOccurs="0"/>
                <xsd:group ref="typeDeclarationGroup"/>
              </xsd:sequence>
              <xsd:attribute name="elementID" use="required"
                             type="xsd:integer"/>
            </xsd:complexType>
	        <xsd:key name="structElementID">
	          <xsd:selector xpath="lfb:element"/>
	          <xsd:field xpath="@elementID"/>
	        </xsd:key>
          </xsd:element>

==================

When I cross-checked the FE Protocol LFB XML with the LFB model schema I
came up with the following inconsistencies:

1. Before each opening of <atomic> there was a need for <synopsis>.

Solution: Either make the <synopsis> an optional field or include it
inside the FEProtocolLFB schema.

2. The capabilities should be after the attributes.

Solution: Move the capabilities after the </attributes>

3. Problem with the field ID.

       <LFBClassDef>
         <name>FEPO</name>
         <id>1</id>

Should be changed to:

	<LFBClassDef LFBClassID="1">
			<name>FEPO</name>

====================

---

From: Jamal Hadi Salim <[email-masked]>
Date: Mon, 14 Nov 2005 07:20:44 -0500

> Greetings to the list,

And greetings to you.

Both good catches. Could you open these two as two tracker items )one
against the protocol and other against model) so we dont loose them? 
Tracker can be found at:
http://www.mip4.org/issues/tracker/forces/

cheers,
jamal

---

From: "Joel M. Halpern" <[email-masked]>
Date: Mon, 14 Nov 2005 07:51:19 -0500

As Jamal said, thank you.
It is very good to hear that another person is working on an implementation.
I will make sure the model document gets these repairs.

Yours,
Joel M. Halpern

---

From: Weiming Wang <[email-masked]>
Date: Tue, 15 Nov 2005 00:19:14 +0800

I appreciate your catches too.  I suppose we should immediately fix them rather
than opening a tracker issue to differ them.

Thanks very much.
Weiming

----- Original Message -----
From: "Evangelos Haleplidis" <[email-masked]>
Subject: ForCES XML Parsing

Greetings to the list,

Regards,

Evangelos Haleplidis.

================

--------------
FE Protocol xml
--------------

1. Page 82

                    <synopsis>

Should be changed to:

                    <synopsis>

2. Page 85

             <synopsis>

Should be changed to:

             <synopsis>

3. Page 85

             <synopsis>

Should be changed to:

             <synopsis>
               The FE Heartbeat Policy
             </synopsis>

4. Page 85

             <synopsis>

Should be changed to:

             <synopsis>

5. Page 86

             <synopsis>

Should be changed to:

             <synopsis>
                The FE Restart Policy
             </synopsis>

6. Page 86

             <synopsis>

Should be changed to:

             <synopsis>
               The CE Failover Policy
             </synopsis>

7. Page 86

             <synopsis>

Should be changed to:

             <synopsis>

======================

-------------
FE Object XML
-------------

1. Page 87

               <version>1.0<version/>

Needs to be changed to:

               <version>1.0</version>

2. Page 82

It must be changed to:

3. Page 85

Must be changed to:

-----------
LFB Model schema
-----------

1. Page 62

          <xsd:element name=?alias?type="typeRefNMTOKEN"/>

Should be changed to:

2. Page 73

Should be changed to:

3. Page 74

4. Page 76 and Page 78

I. Page 74

II. Page 74

==================

       <LFBClassDef>
         <name>FEPO</name>
         <id>1</id>

Should be changed to:

====================