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

Re: [rest-discuss] RDF Forms

Expand Messages
  • Mark Baker
    Hi Alex, ... Using a canonical serialization for an RDF Form in XML, I think that this could quite easily be done. The action URI is the URI of either the
    Message 1 of 26 , Feb 9, 2004
    • 0 Attachment
      Hi Alex,

      On Fri, Feb 06, 2004 at 05:00:08PM -0500, S. Alexander Jacobson wrote:
      > In this world, the XSLT developer should be
      > completely ignorant of server architecture,
      > depending entirely on the content of the generated
      > XML to construct HTML pages. In particular, the
      > XML should supply both href and action attribute
      > values. It should also supply the information for
      > the XSLT developer to construct HTML forms to
      > query/post to those action resources.
      >
      > The problem is we need to choose a way to present
      > that information. My suggestion is to use relaxNG
      > in the following manner:
      >
      > <form action="url" method="POST" src="schema.rng"/>

      Using a canonical serialization for an RDF Form in XML, I think that
      this could quite easily be done. The "action" URI is the URI of
      either the resource of type Container or type Indexable. And if the
      former, it's a POST form, if the latter, a GET form. I don't see what
      role any schema language may play there; send the RDF with an embedded
      RDF form, attach the style sheet, and it'll get converted to an HTML
      form on the client.

      > An issue w/ using an XML specification language
      > here is that you need to use javascript to get
      > browsers to POST XML and perhaps you don't want to
      > pass XML in query strings. The question is
      > whether these issues loom so large that it is
      > worth the complexity of Yet Another Forms
      > Spefication System (RDF-Forms, WIDL, X-Forms,
      > etc).
      >
      > I'd rather just have the server automatically
      > interpret a name/value posting as
      > <POST><name>value</name><name2>value</name></POST>
      > etc. And have the schema/dtd specify which
      > names are valid in what combination and number.
      > Or use javascript on the client to do better.
      >
      > Thoughts?

      FWIW, I wasn't considering browsers at all when I designed RDF Forms.
      I was focused entirely on application-to-application integration.
      But I don't see the problem with XSLTing between RDF Forms and HTML
      forms. You could also do it with XForms I reckon, but I like my XML to
      be RDF/XML where possible.

      Mark.
      --
      Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca
    • S. Alexander Jacobson
      Mark, ... Are you advocating RDF as a replacement for DTDs/RelaxNG/XMLSchema? If not, why do you want the language describing data sent from the server (e.g.
      Message 2 of 26 , Feb 9, 2004
      • 0 Attachment
        Mark,

        On Mon, 9 Feb 2004, Mark Baker wrote:
        > You could also do it with XForms I reckon, but I like my XML to
        > be RDF/XML where possible.

        Are you advocating RDF as a replacement for
        DTDs/RelaxNG/XMLSchema?

        If not, why do you want the language describing
        data sent from the server (e.g. DTD, RelaxNG,
        Schema) to be different language to describe data
        sent to the server (RDF)?

        If yes, why is it better to transmit raw RDF
        rather than relaxNG/XMLschema with links to an RDF
        description of the schema elements?

        -Alex-

        _________________________________________________________________
        S. Alexander Jacobson mailto:me@...
        tel:917-770-6565 http://alexjacobson.com
      • Mark Baker
        ... You betcha! ... I discussed that in a recent talk; http://www.markbaker.ca/Talks/2004-xmlself/slide1-0.html Mark. -- Mark Baker. Ottawa, Ontario, CANADA.
        Message 3 of 26 , Feb 9, 2004
        • 0 Attachment
          On Mon, Feb 09, 2004 at 06:23:27PM -0500, S. Alexander Jacobson wrote:
          > Mark,
          >
          > On Mon, 9 Feb 2004, Mark Baker wrote:
          > > You could also do it with XForms I reckon, but I like my XML to
          > > be RDF/XML where possible.
          >
          > Are you advocating RDF as a replacement for
          > DTDs/RelaxNG/XMLSchema?

          You betcha!

          > If yes, why is it better to transmit raw RDF
          > rather than relaxNG/XMLschema with links to an RDF
          > description of the schema elements?

          I discussed that in a recent talk;

          http://www.markbaker.ca/Talks/2004-xmlself/slide1-0.html

          Mark.
          --
          Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca
        • S. Alexander Jacobson
          In the talk, you said: * You can go from XML namespace to document specific processing. *
          Message 4 of 26 , Feb 12, 2004
          • 0 Attachment
            In the talk, you said:

            * You can go from XML namespace to document specific processing.
            <http://www.markbaker.ca/Talks/2004-xmlself/slide19-0.html>

            * Namespaces give meaning to XML elements w/r/t their parents if any.
            * RDF is the format for representing those namespaces
            http://www.markbaker.ca/Talks/2004-xmlself/slide24-0.html

            This is totally cool and totally clear. I've
            never actually grokked the purpose of RDF before.
            Thank you.

            So my current understanding is that
            DTD/Schema/RelaxNG are ways to describe what XML
            elements an application produces/consumes, RDF is
            a way to describe the meaning of those elements,
            and namespaces are a way to identify them.

            But, you want to use RDF to replace
            DTD/Schema/RelaxNG and I'm not seeing how that
            works.

            For example, how can we use RDF to say that we
            require/produce a name, an age, and a list of
            phone numbers?

            Perhaps RDF-forms is an answer. But it seems
            less expressive than DTDs/RelaxNG/Schema.

            -Alex-

            _________________________________________________________________
            S. Alexander Jacobson mailto:me@...
            tel:917-770-6565 http://alexjacobson.com
          • Vincent D Murphy
            ... I agree. Mark presented each protocol from ethernet up to XML as having a field telling the next layer up what it s protocol/language is. Like this:
            Message 5 of 26 , Feb 12, 2004
            • 0 Attachment
              On 12 Feb 2004, at 19:15, S. Alexander Jacobson wrote:
              > This is totally cool and totally clear.

              I agree.

              Mark presented each protocol from ethernet up to XML as
              having a field telling the next layer up what it's
              protocol/language is.

              Like this:

              ethernet->IP (field in ethernet frame)
              IP->TCP (field in IP packet)
              TCP->HTTP (via port number and/or SRV DNS records)
              HTTP->XML (mime-type)
              XML-> this is where it gets interesting
            • Mark Baker
              ... Hey, great. I love doing that. ... You d use RDF Schema and/or OWL, or perhaps even stuff further up (e.g. rules language). These are RDF vocabularies
              Message 6 of 26 , Feb 13, 2004
              • 0 Attachment
                On Thu, Feb 12, 2004 at 02:15:33PM -0500, S. Alexander Jacobson wrote:
                > In the talk, you said:
                >
                > * You can go from XML namespace to document specific processing.
                > <http://www.markbaker.ca/Talks/2004-xmlself/slide19-0.html>
                >
                > * Namespaces give meaning to XML elements w/r/t their parents if any.
                > * RDF is the format for representing those namespaces
                > http://www.markbaker.ca/Talks/2004-xmlself/slide24-0.html
                >
                > This is totally cool and totally clear. I've
                > never actually grokked the purpose of RDF before.
                > Thank you.

                Hey, great. I love doing that.

                > So my current understanding is that
                > DTD/Schema/RelaxNG are ways to describe what XML
                > elements an application produces/consumes, RDF is
                > a way to describe the meaning of those elements,
                > and namespaces are a way to identify them.
                >
                > But, you want to use RDF to replace
                > DTD/Schema/RelaxNG and I'm not seeing how that
                > works.
                >
                > For example, how can we use RDF to say that we
                > require/produce a name, an age, and a list of
                > phone numbers?

                You'd use RDF Schema and/or OWL, or perhaps even stuff further up (e.g.
                rules language). These are RDF vocabularies that define constraints on
                resources and their relationships, rather than doing it on syntax.

                For example, see;

                http://www.w3.org/TR/2004/REC-owl-guide-20040210/#simpleCardinality

                > Perhaps RDF-forms is an answer. But it seems
                > less expressive than DTDs/RelaxNG/Schema.

                I don't think RDF Forms plays much of a role there.

                Mark.
                --
                Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca
              • Mark Baker
                I m glad you liked them, but for the record (though it s mentioned in there already), those slides were copied verbatim from Timbl s WWW2002 keynote. I did
                Message 7 of 26 , Feb 13, 2004
                • 0 Attachment
                  I'm glad you liked them, but for the record (though it's mentioned in
                  there already), those slides were copied verbatim from Timbl's WWW2002
                  keynote.

                  I did that because it was a great example, but also because I wanted
                  to point out what I perceived as an error regarding application/xml
                  and self-description.

                  Mark.

                  On Thu, Feb 12, 2004 at 08:37:11PM +0000, Vincent D Murphy wrote:
                  > On 12 Feb 2004, at 19:15, S. Alexander Jacobson wrote:
                  > > This is totally cool and totally clear.
                  >
                  > I agree.
                  >
                  > Mark presented each protocol from ethernet up to XML as
                  > having a field telling the next layer up what it's
                  > protocol/language is.
                  >
                  > Like this:
                  >
                  > ethernet->IP (field in ethernet frame)
                  > IP->TCP (field in IP packet)
                  > TCP->HTTP (via port number and/or SRV DNS records)
                  > HTTP->XML (mime-type)
                  > XML-> this is where it gets interesting

                  --
                  Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca
                • Mark Baker
                  A correction ... ... As was pointed out to me on www-ws-desc@w3.org, those two aren t really comparable. I have never used DTDs/XML Schemas (all my XML has
                  Message 8 of 26 , Feb 16, 2004
                  • 0 Attachment
                    A correction ...

                    On Fri, Feb 13, 2004 at 11:27:51PM -0500, Mark Baker wrote:
                    > > So my current understanding is that
                    > > DTD/Schema/RelaxNG are ways to describe what XML
                    > > elements an application produces/consumes, RDF is
                    > > a way to describe the meaning of those elements,
                    > > and namespaces are a way to identify them.
                    > >
                    > > But, you want to use RDF to replace
                    > > DTD/Schema/RelaxNG and I'm not seeing how that
                    > > works.
                    > >
                    > > For example, how can we use RDF to say that we
                    > > require/produce a name, an age, and a list of
                    > > phone numbers?
                    >
                    > You'd use RDF Schema and/or OWL, or perhaps even stuff further up (e.g.
                    > rules language). These are RDF vocabularies that define constraints on
                    > resources and their relationships, rather than doing it on syntax.

                    As was pointed out to me on www-ws-desc@..., those two aren't
                    really comparable. I have never used DTDs/XML Schemas (all my XML
                    has been RDF for 2+ years), and just failed to recognize that an
                    XML Schema constrains the relationship between elements in a document
                    scope, not a global scope.

                    In RDF/OWL, there's no way to say "in this document, Person has to
                    have an Age"; there's only a way to say "People have one age", which
                    says nothing about what any particular document might say.

                    Of course, what you find when you switch to RDF is that you don't
                    need to say "in this document ...". Or at least I've never had the
                    need, and I've done a fair bit of RDF (not much OWL though). So
                    perhaps the answer to your question is "You don't need to".

                    Mark.
                    --
                    Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca
                  • S. Alexander Jacobson
                    ... Don t need to? I m confused. Isn t addressing this problem, the goal of your RDF Forms proposal!? Note: I restarted this thead in the hope of being able
                    Message 9 of 26 , Feb 20, 2004
                    • 0 Attachment
                      > Of course, what you find when you switch to RDF is that you don't
                      > need to say "in this document ...". Or at least I've never had the
                      > need, and I've done a fair bit of RDF (not much OWL though). So
                      > perhaps the answer to your question is "You don't need to".

                      Don't need to? I'm confused. Isn't addressing
                      this problem, the goal of your RDF Forms
                      proposal!?

                      Note: I restarted this thead in the hope of being
                      able to specify what data a URI expects to have
                      POSTed to it, and, perhaps what data to expect as
                      a result e.g.

                      <form method="POST" action="http://uri"
                      dataSchema="relaxSchema.rng"
                      resultSchema="relaxSchema2.rng"/>

                      With this sort of system, I could build automated
                      web site testing tools simlar to QuickCheck
                      <http://www.cs.chalmers.se/~rjmh/QuickCheck/>

                      -Alex-

                      _________________________________________________________________
                      S. Alexander Jacobson mailto:me@...
                      tel:917-770-6565 http://alexjacobson.com




                      On Mon, 16 Feb 2004, Mark Baker wrote:

                      > A correction ...
                      >
                      > On Fri, Feb 13, 2004 at 11:27:51PM -0500, Mark Baker wrote:
                      > > > So my current understanding is that
                      > > > DTD/Schema/RelaxNG are ways to describe what XML
                      > > > elements an application produces/consumes, RDF is
                      > > > a way to describe the meaning of those elements,
                      > > > and namespaces are a way to identify them.
                      > > >
                      > > > But, you want to use RDF to replace
                      > > > DTD/Schema/RelaxNG and I'm not seeing how that
                      > > > works.
                      > > >
                      > > > For example, how can we use RDF to say that we
                      > > > require/produce a name, an age, and a list of
                      > > > phone numbers?
                      > >
                      > > You'd use RDF Schema and/or OWL, or perhaps even stuff further up (e.g.
                      > > rules language). These are RDF vocabularies that define constraints on
                      > > resources and their relationships, rather than doing it on syntax.
                      >
                      > As was pointed out to me on www-ws-desc@..., those two aren't
                      > really comparable. I have never used DTDs/XML Schemas (all my XML
                      > has been RDF for 2+ years), and just failed to recognize that an
                      > XML Schema constrains the relationship between elements in a document
                      > scope, not a global scope.
                      >
                      > In RDF/OWL, there's no way to say "in this document, Person has to
                      > have an Age"; there's only a way to say "People have one age", which
                      > says nothing about what any particular document might say.
                      >
                      > Of course, what you find when you switch to RDF is that you don't
                      > need to say "in this document ...". Or at least I've never had the
                      > need, and I've done a fair bit of RDF (not much OWL though). So
                      > perhaps the answer to your question is "You don't need to".
                      >
                      > Mark.
                      > --
                      > Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca
                      >
                      >
                      >
                      > Yahoo! Groups Links
                      >
                      >
                      >
                      >
                      >
                    • Mark Baker
                      ... No. What I meant by those comments was that in RDF you can t do XML Schema stuff, such as saying all foo elements need to contain one or more bar
                      Message 10 of 26 , Feb 22, 2004
                      • 0 Attachment
                        On Fri, Feb 20, 2004 at 07:36:59PM -0500, S. Alexander Jacobson wrote:
                        > > Of course, what you find when you switch to RDF is that you don't
                        > > need to say "in this document ...". Or at least I've never had the
                        > > need, and I've done a fair bit of RDF (not much OWL though). So
                        > > perhaps the answer to your question is "You don't need to".
                        >
                        > Don't need to? I'm confused. Isn't addressing
                        > this problem, the goal of your RDF Forms
                        > proposal!?

                        No. What I meant by those comments was that in RDF you can't do XML
                        Schema stuff, such as saying "all foo elements need to contain one or
                        more bar elements".

                        > Note: I restarted this thead in the hope of being
                        > able to specify what data a URI expects to have
                        > POSTed to it, and, perhaps what data to expect as
                        > a result e.g.
                        >
                        > <form method="POST" action="http://uri"
                        > dataSchema="relaxSchema.rng"
                        > resultSchema="relaxSchema2.rng"/>
                        >
                        > With this sort of system, I could build automated
                        > web site testing tools simlar to QuickCheck
                        > <http://www.cs.chalmers.se/~rjmh/QuickCheck/>

                        Sure. But I don't think "resultSchema" is useful, since the data will
                        describe its type anyhow. Also, I also think that media types are what
                        you want there, not schemas.

                        Mark.
                        --
                        Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca
                      • S. Alexander Jacobson
                        Re media-types vs schema/dtd/relaxNG/RDFForms I don t believe there is a standard way to identify specific DTD/relaxNG/RDFForms within the text/XML media type.
                        Message 11 of 26 , Feb 23, 2004
                        • 0 Attachment
                          Re media-types vs schema/dtd/relaxNG/RDFForms

                          I don't believe there is a standard way to
                          identify specific DTD/relaxNG/RDFForms
                          within the text/XML media type. I recall there is
                          one for schema, but have no reason yet to believe
                          that I would prefer to use schema to constrain the
                          XML as opposed to DTD, RelaxNG, or RDFForms.
                          (Hence my reply to your RDF Forms post :-))

                          Re resultSchema vs the returned media-type

                          I want to verify that the URL produced the output
                          expected from the POST. The fact that it
                          produces image/jpeg does not tell me whether that
                          output is reasonable given what was POSTed.

                          Updated proposed representations:

                          <form action="http://uri">
                          <send method="GET">
                          <x type="application/urlencoded" constraint="MarkBakerForm.rdf"/>
                          </send>
                          <send method="POST">
                          <x type="application/urlencoded" constraint="MarkBakerForm.rdf"/>
                          <x type="text/xml" constraint="foo.dtd"/>
                          </send>
                          <result status="200">
                          <x type="text/xml constraint="goo.rng"/>
                          <x type="image/jpeg />
                          </result>
                          </form>

                          However, I would prefer to use only a single
                          constraint language (or a single constraint
                          language per media type). Still looking for
                          thoughts here on constraint languages? Can we
                          just use relaxNG and some mapping to
                          application/urlencoded?

                          -Alex-

                          _________________________________________________________________
                          S. Alexander Jacobson mailto:me@...
                          tel:917-770-6565 http://alexjacobson.com

                          On Sun, 22 Feb 2004, Mark Baker wrote:

                          > On Fri, Feb 20, 2004 at 07:36:59PM -0500, S. Alexander Jacobson wrote:
                          > > > Of course, what you find when you switch to RDF is that you don't
                          > > > need to say "in this document ...". Or at least I've never had the
                          > > > need, and I've done a fair bit of RDF (not much OWL though). So
                          > > > perhaps the answer to your question is "You don't need to".
                          > >
                          > > Don't need to? I'm confused. Isn't addressing
                          > > this problem, the goal of your RDF Forms
                          > > proposal!?
                          >
                          > No. What I meant by those comments was that in RDF you can't do XML
                          > Schema stuff, such as saying "all foo elements need to contain one or
                          > more bar elements".
                          >
                          > > Note: I restarted this thead in the hope of being
                          > > able to specify what data a URI expects to have
                          > > POSTed to it, and, perhaps what data to expect as
                          > > a result e.g.
                          > >
                          > > <form method="POST" action="http://uri"
                          > > dataSchema="relaxSchema.rng"
                          > > resultSchema="relaxSchema2.rng"/>
                          > >
                          > > With this sort of system, I could build automated
                          > > web site testing tools simlar to QuickCheck
                          > > <http://www.cs.chalmers.se/~rjmh/QuickCheck/>
                          >
                          > Sure. But I don't think "resultSchema" is useful, since the data will
                          > describe its type anyhow. Also, I also think that media types are what
                          > you want there, not schemas.
                          >
                          > Mark.
                          > --
                          > Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca
                          >
                        Your message has been successfully submitted and would be delivered to recipients shortly.