Re: [PATCH 0/4] APN type and plan extensions for automatic provisioning

Hello everyone,

On 07/28/2011 06:51 PM, Dan Williams wrote:
On Thu, 2011-07-28 at 10:59 -0400, Eric Shienbrood wrote:
I think the only way to allow multiple tokens in an attribute is by
declaring the type to be NMTOKENS. But if you do that, then it can't
be an enumeration, so you lose the validation that that provides. If
you want to use an enumeration, then you'll have to allow for multiple
'plan' or 'type' elements.

Hmm, oh well... maybe we need to do that then.  I think having multiple
plan and type tokens is the best way to do this ATM so maybe we do have
to put these into the body of the APN.

So, there are multiple choices:

1. Multiple values for the "type" and "plan" attributes:

<apn value="foobar" type="internet wap" plan="prepaid postpaid">

This isn't possible to validate since XML doesn't allow multiple tokens for the attribute.

2. Multiple attributes with the same name:

<apn value="foobar" type="internet" type="wap" plan="prepaid" plan="postpaid">

XML doesn't allow this either?

3. To put the "type" and "plan" into the body and use them as elements, i.e:

<apn value="foo">

But, here the same problem again, i.e. the content of the element can't be restricted with the enumeration, right?

4. How about using attributes this way?

<apn value="foobar" internet="yes" prepaid="yes" postpaid="yes">

<!ATTLIST apn internet (yes) #IMPLIED>
<!ATTLIST apn mms (yes) #IMPLIED>
<!ATTLIST apn wap (yes) #IMPLIED>
<!ATTLIST apn prepaid (yes) #IMPLIED>
<!ATTLIST apn postpaid (yes) #IMPLIED>

Anything missed? Please comment.

Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki

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