[whatwg] [WA1] The profile Attribute

Lachlan Hunt lachlan.hunt at lachy.id.au
Mon Apr 18 05:32:16 PDT 2005


James Graham wrote:
> <head profile="http://example.com#foo">
> <profile href="http://example.com#bar" title="bar" />
> <link rel="comments" href="#comments" />
> <link rel="license" href="license.html" profile="bar" />
> </head>

The problem with that method is that it doesn't allow values from 
multiple profiles to be included within the same element.  Whereas, a 
solution that adds namespaces more like the following, but doesn't 
require their use to reference the values where it is not ambiguous 
would be better.

For example, three profiles are defined with each given a namespace 
prefx and contain the listed values.

Profile 1: foo http://example.org/foo
   Values: a, b, c
Profile 2: bar http://example.com/bar
   Values: c, d
Profile 3: baz http://example.net/baz
   Values: d, e, f

foo and bar both contain "c", bar and baz both contain "d".  Without a 
namespace, the semantics from the first declared profile should be used 
in such cases and it is not possible to make use of the other.  With a 
form of optional namespace, it should be possible to refer to those 
values in the following ways:

The following unambiguosly refers "a" in foo in both cases:
   rel="a" OR rel="foo.a"

Because "c" is defined in both foo and bar, these are equivalent because 
foo is defined first
   rel="c" OR rel="foo.c"

With a namespace, "c" in bar, can also be unambiguosly referenced:
   rel="bar.c"

Similarly, the follwing can also be unambiguously referenced:
   rel="b d baz.d e f"

(the first "d" would refer to bar.d because bar is defined first and 
baz.d is obvious.  "b", "e" and "f" are unambiguous because there are no 
naming conflicts.)

If a solution can be found which allows for namespaces, but which does 
not require them to be used in most cases, which doesn't introduce even 
more problems, then I think that would probably be the best solution.

-- 
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/     Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox




More information about the whatwg mailing list