Q: namespaces

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Patrick TJ McPhee

    #16
    Re: namespaces

    In article <bm6e2q$2h0o$1@ pc-news.cogsci.ed. ac.uk>,
    Richard Tobin <richard@cogsci .ed.ac.uk> wrote:

    % The namespace spec *could* have said that an unprefixed attribute is
    % in the namespace of its element. This would have had an advantage for
    % attributes that can be used both on elements in "their own" namespace
    % and on other elements, such as

    [...]

    % Why wasn't this done? I *think* - and you'd need to ask the original
    % authors for a definitive answer - that they didn't want to imply that
    % the foo attribute on one element in a namespace was the same as the
    % foo attribute on another element.

    It seems more likely that they didn't want to force xpath-like languages
    to have prefixes on all their attributes, which would be the logical
    outcome. Namespaces have less value for attributes than for elements,
    and it's less cumbersome to deal with attributes in no name space than
    to deal with attributes in a namespace.
    --

    Patrick TJ McPhee
    East York Canada
    ptjm@interlog.c om

    Comment

    • Richard Tobin

      #17
      Re: namespaces

      In article <bm6ohn$8kg$2@n ews.eusc.inter. net>,
      Patrick TJ McPhee <ptjm@interlog. com> wrote:
      [color=blue]
      >It seems more likely that they didn't want to force xpath-like languages
      >to have prefixes on all their attributes, which would be the logical
      >outcome.[/color]

      It wouldn't have to work that way. @foo could just mean "an attribute
      foo in the namespace of its element". There might have to be a
      special syntax for the case of an attribute in no namespace, but that
      would be rarely needed since you wouldn't be able to have such an
      attribute except on an element in no namespace, in which case @foo
      would still match it.

      -- Richard
      --
      Spam filter: to mail me from a .com/.net site, put my surname in the headers.

      FreeBSD rules!

      Comment

      • Martin Boehm

        #18
        Re: namespaces

        "Richard Tobin" <richard@cogsci .ed.ac.uk> wrote in message
        news:bm6pg3$2l3 5$1@pc-news.cogsci.ed. ac.uk
        [color=blue]
        > It wouldn't have to work that way. @foo could just mean "an attribute
        > foo in the namespace of its element". There might have to be a
        > special syntax for the case of an attribute in no namespace, but that
        > would be rarely needed since you wouldn't be able to have such an
        > attribute except on an element in no namespace, in which case @foo
        > would still match it.[/color]

        That is more or less what I wanted to point out. Maybe my wording was
        not as clear as yours, I don't think I could have put it that way. ;-)

        Martin


        Comment

        • Patrick TJ McPhee

          #19
          Re: namespaces

          In article <bm6pg3$2l35$1@ pc-news.cogsci.ed. ac.uk>,
          Richard Tobin <richard@cogsci .ed.ac.uk> wrote:
          % In article <bm6ohn$8kg$2@n ews.eusc.inter. net>,
          % Patrick TJ McPhee <ptjm@interlog. com> wrote:
          %
          % >It seems more likely that they didn't want to force xpath-like languages
          % >to have prefixes on all their attributes, which would be the logical
          % >outcome.
          %
          % It wouldn't have to work that way.

          No, but you're talking about the w3c. It _would_ work that way.
          --

          Patrick TJ McPhee
          East York Canada
          ptjm@interlog.c om

          Comment

          Working...