Does this DTD capture all the needed info? I'm not sure what the specs
are because
https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat
is still a bit confusing.
Please comment so I can get to work on the new export_xml function.
Sample DTD:
<!DOCTYPE root-element SYSTEM "dtd.file">
<!ELEMENT clientConfig (emailProvider)>
<!ELEMENT emailProvider (domain, displayName,displayShortName,
incomingServer, outgoingServer)>
<!ATTLIST emailProvider id CDATA "
example.com" >
<!ELEMENT domain (#PCDATA)>
<!ELEMENT displayName (#PCDATA)>
<!ELEMENT displayShortName (#PCDATA)>
<!ELEMENT incomingServer (hostname, port, socketType, username,
authentication)>
<!ATTLIST incomingServer type CDATA "pop3">
<!ELEMENT hostname (#PCDATA)>
<!ELEMENT port (#PCDATA)>
<!ELEMENT socketType (#PCDATA)>
<!ELEMENT username (#PCDATA)>
<!ELEMENT authentication (#PCDATA)>
<!ELEMENT outgoingServer (hostname port, socketType, username,
authentication, addThisServer, useGlobalPreferredServer)>
<!ATTLIST outgoingServer type CDATA "pop3">
<!ELEMENT hostname (#PCDATA)>
<!ELEMENT port (#PCDATA)>
<!ELEMENT socketType (#PCDATA)>
<!ELEMENT username (#PCDATA)>
<!ELEMENT authentication (#PCDATA)>
<!ELEMENT addThisServer (#PCDATA)>
<!ELEMENT useGlobalPreferredServer (#PCDATA)>
On Oct 18, 10:27 am, David Ascher <
dasc...@mozillamessaging.com>
wrote:
> (reading bug 522253)
>
> I agree, the Thundebird:Autoconfig page needs a rewrite. I suggest we do
> the following:
>
> - start with a page that describes the exact format used in current
> version (let's call it 1)
> - move everything in that page that doesn't correspond to the current
> format into a separate page.
>
> Aside: validating against Relax-NG might be easier these days than
> against a DTD -- and writing a RelaxNG schema is easier than a DTD, and
> equivalent.
>
> Here's one thing which we probably want to think about very soon, as it
> may have TB3-blocking implications. We should think a bit about
> versioning schemas.
>
> 1) I don't recall whether Thunderbird exposes a version number in its
> URL, which
live.momo.com could deal with. It should, encoding a version
> number which is stored in TB (although likely stored as a pref, so that
> we could work with add-ons to experiment with later versions). In
> general, we should pass in as much information as we can as parameters
> to the HTTP request, so that we can deal with things on the server if
> necessary. As an example, see:
>
> pref <
http://mxr.mozilla.org/comm-central/ident?i=pref>("mailnews.migration.header_addons_url","
http://live.mozillamessaging.com/%APP%/addons/search?q=header&locale=...");
>
> letaddon_url <
http://mxr.mozilla.org/comm-central/ident?i=addon_url> =Cc <
http://mxr.mozilla.org/comm-central/ident?i=Cc>["@
mozilla.org/toolkit/URLFormatterService;1"]
> .getService <
http://mxr.mozilla.org/comm-central/ident?i=getService>(Ci <
http://mxr.mozilla.org/comm-central/ident?i=Ci>.nsIURLFormatter <
http://mxr.mozilla.org/comm-central/ident?i=nsIURLFormatter>)
> .formatURLPref <
http://mxr.mozilla.org/comm-central/ident?i=formatURLPref>("mailnews.migration.header_addons_url");
> document <
http://mxr.mozilla.org/comm-central/ident?i=document>.getElementById <
http://mxr.mozilla.org/comm-central/ident?i=getElementById>("header_addons").setAttribute <
http://mxr.mozilla.org/comm-central/ident?i=setAttribute>("href",addon_url <
http://mxr.mozilla.org/comm-central/ident?i=addon_url>);