Loading ...
Sorry, an error occurred while loading the content.

xlink question

Expand Messages
  • johncoe42
    I was in the GenealogyXML yahoo groups and posted a suggestion about XLink. Is this a valid XLink usage?, I m trying to make two instances of xlink, one for
    Message 1 of 3 , Jan 31, 2004
    • 0 Attachment
      I was in the GenealogyXML yahoo groups and posted a suggestion about
      XLink. Is this a valid XLink usage?, I'm trying to make two instances
      of xlink, one for 'mother' & one for 'father'.
      I know there are other ways of doing the same thing, I want to make
      it more human readable.
      Am I 'against the design principles', as Michael Kay suggests in this
      attached exchange??
      Any feed-back greatly appriciated.

      --- In GenealogyXML@yahoogroups.com, "Michael Kay"
      <michael.h.kay@n...> wrote:
      > >
      > > You have a point that it is not descriptive, how about
      > > something like: xmlns:mother="http://www.w3.org/TR/xlink"
      > > xmlns:father="http://www.w3.org/TR/xlink"
      > > <person mother:href="#p1" father:href="#p2"/>
      >
      > One of the principles behind namespaces is that prefixes are
      arbitrary
      > and carry no meaning; it's only the namespace URI that matters. This
      > example, while legal, goes entirely against the design principles.
      >
      > Michael Kay
    • Ronald Bourret
      This doesn t just go against the design principles of namespaces, it isn t even namespace valid. The problem is that both attributes resolve to the href
      Message 2 of 3 , Feb 1 9:55 PM
      • 0 Attachment
        This doesn't just go against the design principles of namespaces, it
        isn't even namespace valid. The problem is that both attributes resolve
        to the href attribute in the http://www.w3.org/TR/xlink namespace. It is
        namespace-invalid to have to attributes with the same universal name on
        the same element.

        I'm not an XLink whiz, but I think that the following is correct.

        <person xlink:xmlns="http://www.w3.org/1999/xlink">
        <name>Ronald Bourret</name>
        <mother xlink:type="simple"
        xlink:href="#p1" />
        <father xlink:type="simple"
        xlink:href="#p2" />
        </person>

        One real advantage of this over the syntax proposed below is that it
        doesn't resort to any sort of trickery -- it's very clear that the
        mother element points to mom's element and the father element points to
        dad's element. I think this could be generalized by having a <relative>
        element with an xlink:arcrole element defining what kind of relative
        you're pointing to.

        Your message does point out one shortcoming of XLink, though, and that
        is that you can only have one link per element since you are restricted
        to using the href attribute. Some people definitely would have preferred
        to let people define their own linking attributes, but that didn't
        happen, so you need to put the links on different elements as is shown
        above.

        -- Ron

        johncoe42 wrote:
        >
        > I was in the GenealogyXML yahoo groups and posted a suggestion about
        > XLink. Is this a valid XLink usage?, I'm trying to make two instances
        > of xlink, one for 'mother' & one for 'father'.
        > I know there are other ways of doing the same thing, I want to make
        > it more human readable.
        > Am I 'against the design principles', as Michael Kay suggests in this
        > attached exchange??
        > Any feed-back greatly appriciated.
        >
        > --- In GenealogyXML@yahoogroups.com, "Michael Kay"
        > <michael.h.kay@n...> wrote:
        > > >
        > > > You have a point that it is not descriptive, how about
        > > > something like: xmlns:mother="http://www.w3.org/TR/xlink"
        > > > xmlns:father="http://www.w3.org/TR/xlink"
        > > > <person mother:href="#p1" father:href="#p2"/>
        > >
        > > One of the principles behind namespaces is that prefixes are
        > arbitrary
        > > and carry no meaning; it's only the namespace URI that matters. This
        > > example, while legal, goes entirely against the design principles.
        > >
        > > Michael Kay
      • johncoe42
        yes, I found a restriction aginst it in 5.3 of the namespace spec. Thanks for your input. ... resolve ... It is ... name on ... points to ... ...
        Message 3 of 3 , Feb 3 3:30 PM
        • 0 Attachment
          yes, I found a restriction aginst it in 5.3 of the namespace spec.
          Thanks for your input.
          --- In xml-dbms@yahoogroups.com, Ronald Bourret <rpbourret@r...>
          wrote:
          > This doesn't just go against the design principles of namespaces, it
          > isn't even namespace valid. The problem is that both attributes
          resolve
          > to the href attribute in the http://www.w3.org/TR/xlink namespace.
          It is
          > namespace-invalid to have to attributes with the same universal
          name on
          > the same element.
          >
          > I'm not an XLink whiz, but I think that the following is correct.
          >
          > <person xlink:xmlns="http://www.w3.org/1999/xlink">
          > <name>Ronald Bourret</name>
          > <mother xlink:type="simple"
          > xlink:href="#p1" />
          > <father xlink:type="simple"
          > xlink:href="#p2" />
          > </person>
          >
          > One real advantage of this over the syntax proposed below is that it
          > doesn't resort to any sort of trickery -- it's very clear that the
          > mother element points to mom's element and the father element
          points to
          > dad's element. I think this could be generalized by having a
          <relative>
          > element with an xlink:arcrole element defining what kind of relative
          > you're pointing to.
          >
          > Your message does point out one shortcoming of XLink, though, and
          that
          > is that you can only have one link per element since you are
          restricted
          > to using the href attribute. Some people definitely would have
          preferred
          > to let people define their own linking attributes, but that didn't
          > happen, so you need to put the links on different elements as is
          shown
          > above.
          >
          > -- Ron
          >
          > johncoe42 wrote:
          > >
          > > I was in the GenealogyXML yahoo groups and posted a suggestion
          about
          > > XLink. Is this a valid XLink usage?, I'm trying to make two
          instances
          > > of xlink, one for 'mother' & one for 'father'.
          > > I know there are other ways of doing the same thing, I want to
          make
          > > it more human readable.
          > > Am I 'against the design principles', as Michael Kay suggests in
          this
          > > attached exchange??
          > > Any feed-back greatly appriciated.
          > >
          > > --- In GenealogyXML@yahoogroups.com, "Michael Kay"
          > > <michael.h.kay@n...> wrote:
          > > > >
          > > > > You have a point that it is not descriptive, how about
          > > > > something like: xmlns:mother="http://www.w3.org/TR/xlink"
          > > > > xmlns:father="http://www.w3.org/TR/xlink"
          > > > > <person mother:href="#p1" father:href="#p2"/>
          > > >
          > > > One of the principles behind namespaces is that prefixes are
          > > arbitrary
          > > > and carry no meaning; it's only the namespace URI that matters.
          This
          > > > example, while legal, goes entirely against the design
          principles.
          > > >
          > > > Michael Kay
        Your message has been successfully submitted and would be delivered to recipients shortly.