Subject: [Ecrit] draft-ietf-ecrit-lost-sync-00.txt

From: "Tschofenig, Hannes (NSN - FI/Espoo)" <[email-masked]>
Date: Mon, 13 Oct 2008 21:11:12 +0300

Hi all, 

I went through draft-ietf-ecrit-lost-sync-00.txt.  

I believe that only two interactions are needed, namely 

* pushMappingsRequest/ pushMappingsResponse
* getMappingsRequest / getMappingsResponse 

I modified the content of these messages slightly and here is the Relax
NG schema and also instance documents. I would like to thank Jari
Urpalainen for his feedback on the Relax NG schema. 

-------------- Relax NG Schema -----------------

<?xml version="1.0" encoding="utf-8"?>
	
<grammar ns="urn:ietf:params:xml:ns:lost-sync1"
xmlns="http://relaxng.org/ns/structure/1.0"
    xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">

    <include href="lost.rng"/>

    <start combine="choice">

        <a:documentation> Location-to-Service Translation (LoST)
Synchronization Protocol </a:documentation>

        <choice>
            <ref name="pushMappingsRequest"/>
            <ref name="pushMappingsResponse"/>
            <ref name="getMappingsRequest"/>
            <ref name="getMappingsResponse"/>
        </choice>
    </start>

    <define name="pushMappingsRequest">
        <element name="pushMappingsRequest">
            <element name="mappings">
                <oneOrMore>
                    <ref name="mapping"/>
                </oneOrMore>
            </element>

            <ref name="extensionPoint"/>
        </element>
    </define>

    <define name="pushMappingsResponse">
        <element name="pushMappingsResponse">
            <ref name="extensionPoint"/>
        </element>
    </define>

    <define name="getMappingsRequest">
        <element name="getMappingsRequest">
            <oneOrMore>
                <element name="m">
                    <choice>
                        <ref name="ScopeSource"/>
                        <ref name="ScopeSourceId"/>
                        <ref name="ScopeLastUpdated"/>
                    </choice>
                </element>
            </oneOrMore>
            <ref name="extensionPoint"/>
        </element>
    </define>

    <define name="getMappingsResponse">
        <element name="getMappingsResponse">

            <element name="mappings">
                <oneOrMore>
                    <ref name="mapping"/>
                </oneOrMore>
            </element>

            <ref name="extensionPoint"/>

        </element>
    </define>

    <define name="ScopeSource">
        <attribute name="source">
            <data type="token"/>
        </attribute>
    </define>

    <define name="ScopeSourceId">
        <attribute name="source">
            <data type="token"/>
        </attribute>
        <attribute name="sourceId">
            <data type="token"/>
        </attribute>
    </define>

    <define name="ScopeLastUpdated">
        <attribute name="source">
            <data type="token"/>
        </attribute>
        <attribute name="sourceId">
            <data type="token"/>
        </attribute>
        <attribute name="lastUpdated">
            <data type="dateTime"/>
        </attribute>
    </define>

</grammar>

--------------------------------------

A "minor" thing to add with this schema is that it is not forwards
compatible with the LoST Relax NG schema. The reason for this is the
fact that we did not define an extension point at the top level LoST
Relax NG schema. 

------------ Example - 1 --------------------------

<?xml version="1.0" encoding="UTF-8"?>
<sync:pushMappingsRequest xmlns:sync="urn:ietf:params:xml:ns:lost-sync1"
    xmlns="urn:ietf:params:xml:ns:lost1"
xmlns:p2="http://www.opengis.net/gml">

    <sync:mappings>

        <mapping source="authoritative.example"
sourceId="7e3f40b098c711dbb6060800200c9a66"
            lastUpdated="2008-11-26T01:00:00Z"
expires="2009-12-26T01:00:00Z">
            <displayName xml:lang="en"> Leonia Police Department
</displayName>
            <service>urn:service:sos.police</service>
            <serviceBoundary
profile="urn:ietf:params:lost:location-profile:basic-civic">
                <civicAddress
xmlns="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr">
                    <country>US</country>
                    <A1>NJ</A1>
                    <A3>Leonia</A3>
                    <PC>07605</PC>
                </civicAddress>
            </serviceBoundary>
            <uri>sip:[email-masked]</uri>
            <serviceNumber>911</serviceNumber>
        </mapping>

        <mapping expires="2009-01-01T01:44:33Z"
lastUpdated="2008-11-01T01:00:00Z"
            source="authoritative.example"
sourceId="7e3f40b098c711dbb606011111111111">
            <displayName xml:lang="en"> New York City Police Department
</displayName>
            <service>urn:service:sos.police</service>
            <serviceBoundary profile="geodetic-2d">
                <p2:Polygon srsName="urn:ogc:def::crs:EPSG::4326">
                    <p2:exterior>
                        <p2:LinearRing>
                            <p2:pos>37.775 -122.4194</p2:pos>
                            <p2:pos>37.555 -122.4194</p2:pos>
                            <p2:pos>37.555 -122.4264</p2:pos>
                            <p2:pos>37.775 -122.4264</p2:pos>
                            <p2:pos>37.775 -122.4194</p2:pos>
                        </p2:LinearRing>
                    </p2:exterior>
                </p2:Polygon>
            </serviceBoundary>
            <uri>sip:[email-masked]</uri>
            <uri>xmpp:[email-masked]</uri>
            <serviceNumber>911</serviceNumber>
        </mapping>

        <mapping source="nj.us.example" sourceId="123"
lastUpdated="2008-11-01T01:00:00Z"
            expires="2008-11-01T01:00:00Z"/>
    </sync:mappings>

</sync:pushMappingsRequest>

-----------------------------------

------------ Example - 2 --------------------------

<?xml version="1.0" encoding="UTF-8"?>
<pushMappingsResponse xmlns="urn:ietf:params:xml:ns:lost-sync1"/> 

-----------------------------------

------------ Example - 3 --------------------------

<?xml version="1.0" encoding="UTF-8"?>
<getMappingsRequest xmlns="urn:ietf:params:xml:ns:lost-sync1">
    <m source="authoritative.bar.example"
sourceId="7e3f40b098c711dbb6060800200c9a66"
        lastUpdated="2006-11-01T01:00:00Z"/>
    <m source="authoritative.foo.example"/>
</getMappingsRequest>

-----------------------------------

------------ Example - 4 --------------------------

<?xml version="1.0" encoding="UTF-8"?>
<sync:getMappingsResponse xmlns:sync="urn:ietf:params:xml:ns:lost-sync1"
    xmlns="urn:ietf:params:xml:ns:lost1"
xmlns:p2="http://www.opengis.net/gml">

    <sync:mappings>

        <mapping source="authoritative.bar.example"
sourceId="7e3f40b098c711dbb6060800200c9a66"
            lastUpdated="2008-11-26T01:00:00Z"
expires="2009-12-26T01:00:00Z">
            <displayName xml:lang="en"> Leonia Police Department
</displayName>
            <service>urn:service:sos.police</service>
            <serviceBoundary
profile="urn:ietf:params:lost:location-profile:basic-civic">
                <civicAddress
xmlns="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr">
                    <country>US</country>
                    <A1>NJ</A1>
                    <A3>Leonia</A3>
                    <PC>07605</PC>
                </civicAddress>
            </serviceBoundary>
            <uri>sip:[email-masked]</uri>
            <serviceNumber>911</serviceNumber>
        </mapping>

        <mapping expires="2009-01-01T01:44:33Z"
lastUpdated="2008-11-01T01:00:00Z"
            source="authoritative.foo.example"
sourceId="7e3f40b098c711dbb606011111111111">
            <displayName xml:lang="en"> New York City Police Department
</displayName>
            <service>urn:service:sos.police</service>
            <serviceBoundary profile="geodetic-2d">
                <p2:Polygon srsName="urn:ogc:def::crs:EPSG::4326">
                    <p2:exterior>
                        <p2:LinearRing>
                            <p2:pos>37.775 -122.4194</p2:pos>
                            <p2:pos>37.555 -122.4194</p2:pos>
                            <p2:pos>37.555 -122.4264</p2:pos>
                            <p2:pos>37.775 -122.4264</p2:pos>
                            <p2:pos>37.775 -122.4194</p2:pos>
                        </p2:LinearRing>
                    </p2:exterior>
                </p2:Polygon>
            </serviceBoundary>
            <uri>sip:[email-masked]</uri>
            <uri>xmpp:[email-masked]</uri>
            <serviceNumber>911</serviceNumber>
        </mapping>

    </sync:mappings>

</sync:getMappingsResponse>
 
-----------------------------------

Todo: 
* I need to play a bit with error messages as well. 
* Write text around the schema and the examples.

Ciao
Hannes

_______________________________________________
Ecrit mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/ecrit