Re: dot-oaf style questions



on 11/21/01 12:08 PM, Dirk-Jan C. Binnema at bulkmeel yahoo co uk wrote:

> - shouldn't oaf files use the <?xml version="1.0"> to be well-formed?
> does anybody care?

Sure. They should. But it's not a disaster that they don't.

> - <!-- comments --> in .oaf files are not allowed, although they would
> be quite useful; any work being done to add support for comments?

They should be allowed. What gives you the impression that they are not?
Since we just use libxml to parse the files, I can't see how we could
disallow comments.

> - in my /usr/share/oaf i see many oaf files that have
> "IDL:Bonobo/Unknown:1.0" as one of their repo_ids; that doesn't seem
> correct; either the corresponding components *do* expose Bonobo/Unknown
> (which seems rather pointless), or else they don't in which case the
> .oaf files are wrong. Note that exposing e.g "Bonobo/Control" does *not*
> mean you're automagically exposing Bonobo/Unknown (although of course
> Bonobo/Control derives from Bonobo/Unknown.

In practice, it currently doesn't matter if these lists of repo_ids aren't
exactly right, which is what creates the problem. The only time the repo_ids
matter is when doing bonobo-activation queries, such as the ones that
Nautilus uses to find views. So the people creating the files can get them
wrong as long as they are "close enough". If we want people to get them
right, we probably need some way to check them. Asking people to get them
right with no way to test is like asking someone to write a program and
debug it without ever being able to run it.

You seem pretty sure of the semantics here. But I'm not. Exposing
Bonobo/Control, which derives from Bonobo/Unknown, does seem like it exposes
Bonobo/Unknown. But this is all beside the point for the current uses of
repo_ids anyway, so it's probably not worth debating.

> - Has anybody succeeded is using xmllint on .oaf files? What are the
> magic command line parameters? I think we somehow need to specify the
> document type in the .oaf files (?). Now, I get:
> 
> % xmllint -noout --valid --loaddtd  \
>       /usr/src/cvs/bonobo-activation/docs/bonobo-activation.dtd \
>       /usr/share/oaf/Nautilus_shell.oaf
> 
> /usr/src/cvs/bonobo-activation/docs/bonobo-activation.dtd:5: error:
> xmlParseStartTag: invalid element name
> <!ELEMENT oaf_info (oaf_server+)>
> ^
> /usr/src/cvs/bonobo-activation/docs/bonobo-activation.dtd:5: error:
> Extra content at the end of the document
> <!ELEMENT oaf_info (oaf_server+)>
> ^
> /usr/share/oaf/Nautilus_shell.oaf:1: validity error: Validation failed:
> no DTD found !
> <oaf_info>
>       ^

I know that someone did use that DTD with xmllint a while back before
checking the DTD in. The error above doesn't mean that the DTD needs to be
in the file. The first error prevents the DTD from being parsed. The later
error "no DTD found" is misleading. If we fix the DTD, we can probably use
xmllint again.

    -- Darin




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