W3A – Questions & Answers

May 30, 1995

W3A Questions and Answers

Here are some questions about and objections to W3A. I’ve added tentative answers, but the discussion isn’t over yet. This document is meant as a summary of the most important questions and it will be extended as the discussion continues. (Last updated: 27 June 1994.)

How do SGML style sheets fit in?

(Terry Allen <terry@ora.com>)

I assumed that stylesheets are explicitly linked to an HTML document as

<LINK REL=Style HREF="layout.sty">. The HTML viewer must call
W3AopenDoc(), W3AreadDoc() and W3AcloseDoc() in order to get the style

sheet.

For general SGML: I don’t know... Does anybody know how style sheets are supposed to be linked to document instances, e.g., in DSSSL? [BB]

Dynamic linking is too Unix-specific

(Daniel W. Connolly <connolly@hal.com>)

Good point. On HP-UX, the easiest implementation is with shared libraries instead of dynamic loading; can’t Windows DLLs be loaded explicitly? If not, is there a more or less portable solution at all?

However, when the source of the browser is available for re-compilation, the same API can also be used for normal linking. [BB]

Why not use Python (or Scheme48 or...) to write applets in?

(Daniel W. Connolly <connolly@hal.com>)

You can still do that (link the Python interpreter as an ‘applet’). Maybe there are better ways. I certainly like the possibility to quickly hack a new applet in Python, but I wouldn’t like to restrict applets to Python or some other interpreted language only. [BB]

The ‘objects’ in these interfaces (the browser, for example) are implicit in the function calls, causing the state for the objects to be stored in global variables

(Daniel W. Connolly <connolly@hal.com>)

Not quite, there is either a file descriptor or an ID (‘magic cookie’) to identify the particular instance of the applet. I can change int to void * and call it ‘self’ instead of ‘fd’. Would that help? (I like it better as it is, though.) [BB]

It doesn’t allow browsers to ‘prefer’ one format over another.

(Daniel W. Connolly <connolly@hal.com>)

That can be easily fixed. I regard the preference as the user’s choice, so it is basically a change to the configuration file (and the W3ABrowserInfo structure, of course.) [BB]

Can it deal with a hypermedia document architecture that accomodates compound/complex documents with links between them?

(Daniel W. Connolly <connolly@hal.com>)

This is something that I’ve been thinking about but that I couldn’t solve. I think about it as ‘synchronization’ but I have difficulty finding a good model for it. Yes, HyTime may hold a clue here, but adding HyTime to the browser is far from trivial. [BB]

There is no coherent exception mechanism (i.e. no error handling model)

(Daniel W. Connolly <connolly@hal.com>)

Yes, that is high on my agenda. But I do hope that status codes in combination with the errno variable are enough, though. I know it is old-fashioned and it relies on the programmer being conscientious, but the scheme is traditional, well understood and easy to implement.

I’ve worked with the Python model of exception handling (in another language) and it certainly cleans up the code and it also ensures that no exception goes unnoticed. So, proposals are still welcome. [BB]

We need two kinds of ‘safe’ programming languages: the lisp/perl/smalltalk/python style safe language where the programmer can’t screw up the runtime system the way one can with C and C++...(cont’d)

(Daniel W. Connolly <connolly@hal.com>)

Why do we need applets to be in a bounded runtime environment (in casu an interpreter)? I need more arguments [BB]

... and the safe-tcl/Obliq/telescript style safe language where untrusted code can be run with bounded access to resources.

(Daniel W. Connolly <connolly@hal.com>)

In my view, such a script is simply another document that is downloaded to just another ‘viewer’ applet (‘view’ in a generalised sense...), although it brings one back to the ‘synchronization’ issue (see above). [BB]

Can consistency of the GUI be ensured?

No. If the look & feel of a certain applet doesn’t suit you, you’ll have to find (or write) another one.

Is multithreading possible?

The browser and the applets may be multithreaded, but neither side may assume that the other can deal with concurrent access. In other words: all calls to the API functions must occur in the same thread (maybe this can be relaxed a bit, with careful coding?)

How is posting news, or replying to mail handled?

The simplest answer is that the viewer applet for ‘message/rfc822’ will include an editor and appropriate commands for this. However, one might want to use a separate editor accessory if one exists... any ideas?

Sending a message after it has been composed is handled within W3A with the W3Aopen and W3Awrite functions, provided the necessary agents are loaded, of course.

Where is the ‘View source’ command handled?

Some browsers may have this command built in, but it could also be a function of some viewers.

Where is the ‘Save to file’ command handled?

Again, some browsers may have this command, but it is more likely that a viewer implements it, since it is supposed to know more about the format of the data.

Can the user dynamically change the ‘Accept:’ headers, e.g., to temporarily prefer one format over another?

A browser could, of course, offer this feature. In that case it is a user-interface issue. But it is currently not possible from within a viewer. I can imagine that a viewer wants to specify particular ‘Accept:’ headers when it processes in-line images. So, some mechanism must be found for this.

I’ll have to think about this. How about a variable-length argument list for the W3Aopen function, containing ‘Accept:’ lines?

Bert Bos