Re: Service Provider Database



to, 2008-06-05 kello 09:10 +0100, Bastien Nocera kirjoitti:
> On Thu, 2008-06-05 at 10:05 +0300, Antti Kaijanmäki wrote:
> > ma, 2008-06-02 kello 13:18 +0100, Bastien Nocera kirjoitti:
> > > On Mon, 2008-06-02 at 15:12 +0300, Antti Kaijanmäki wrote:
> > > >
> >      <snip>
> > > > 
> > > > <provider>
> > > >    <name>Service Provider - CDMA</name>
> > > >    <cdma />
> > > > </provider>
> > > > <provider>
> > > >    <name>Service Provider - GSM</name>
> > > >    <gsm>
> > > >       <apn>internet</apn>
> > > >    </gsm>
> > > > </provider>
> > > > <provider>
> > > >    <name>Service Provider - GSM prepaid</name>
> > > >    <gsm>
> > > >       <apn>prepaid.provider</apn>
> > > >    </gsm>
> > > > </provider>
> > > 
> > > I'd rather have:
> > > <provider type="gsm">
> > >  <name>Service Provider - GSM prepaid</name>
> > >   <apn>prepaid.provider</apn>
> > > </provider>
> > 
> > I see your point and this was my first idea also. But the problem with
> > this approach is that I can't validate this with a DTD. At least I
> > didn't find any way to state: 
> > 
> > 'if provider element has property "type"  set as "gsm" the element must
> > contain child element "apn" '
> > 
> > But I can state:
> > 
> > 'provider must have either "gsm", "cdma" or "phs" child element'
> 
> I also mentioned another option which you seem to have discounted, and
> can easily be used in a DTD.
> 
> <provider>
>   <gsm />
>   <name>Service Provider - GSM prepaid</name>
>   <apn>prepaid.provider</apn>
> </provider>

Your previous mail had "type" property also with this one and it had
the same problem as the first one had. That's why I didn't comment on
that. 

But if you meant to leave the property out like with this new one there
is still a problem. APN is present only with gsm connections. It would
be invalid to have :

<provider> <!-- or <provider type="gsm"> --!>
   <cdma />
   <name>Service Provider - GSM prepaid</name>
   <apn>prepaid.provider</apn>
 </provider>

and AFAIK you can not describe this kind of relation between two
elements on a same level with a DTD.


Why can't this be just like I proposed? :
 
<provider>
    <name>Service Provider - GSM prepaid</name>
    <gsm>
      <apn>prepaid.provider</apn>
    </gsm>
</provider>

 -- Antti

Attachment: signature.asc
Description: Digitaalisesti allekirjoitettu viestin osa



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]