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

Re: [rest-discuss] WRDL Notes

Expand Messages
  • Paul Prescod
    ... Will do. ... True. ... I think that there has to be standardization. If I write a tool to extract documentation from a WRDL it will only work if I know
    Message 1 of 2 , Mar 1, 2002
      Jason Diamond wrote:
      > Hi, Paul.
      > I see you have a new draft up! Would it be possible to put the date of each
      > draft at the top so that we can tell when you've made changes?

      Will do.

      > The DTD has a bad mixed content model for the documentation element (you
      > need a * at the end).


      > ... Wouldn't making it ANY be easier? What if I want to
      > use DocBook for my documentation?

      I think that there has to be standardization. If I write a tool to
      extract documentation from a WRDL it will only work if I know what the
      element types are. Therefore I want to strongly encourage people towards
      one standard (whether it be XHTML or Docbook) and if you really must do
      your own thing then you can do it in an AppInfo tag.

      (This is why I prefer a single annotation
      > element with a content model of ANY--I could then put multiple elements in
      > there with different names or attributes to indicate mediaType or language
      > or anything else I wanted.)

      How do you figure out how to process the elements? From the namespace? I
      thought you didn't trust that?

      > The links to the Babelfish example and Python implementation are broken.

      I'm having trouble uploading through a firewall but I'll fix that when I

      > Regarding the new namespace attribute on representationType elements: My
      > faith in being able to use namespaces to reliably identify a document is
      > very slim. I see them (as Patrick Stickler recently pointed out) as merely
      > punctuation. The mediaType attribute seems much more capable of identifying
      > a representation. What would we use the namespace attribute for?

      Because many XML vocabularies will not have media types. I am very
      sympathetic to Patrick's view but in my own language I'm more concerned
      about popularity than purity. If the W3C decides that namespaces are The
      Way to identify document types then I want WRDL to be compatible. If
      they don't, I'll deprecate it. Plus, there is no good replacement.
      DOCTYPES only work with DTDs. There is no standardized PI or anything

      > Regarding the new schema elements: Do we really want to embed schemas in
      > WRDL documents? Wouldn't it be more maintainable if we could reference them?

      That's why it has an href attribute!

      > Regarding the occurs attribute on reference elements: Should there be a way
      > for the generated proxies to require that a reference appears? I might
      > suggest regular expression-like values "?" for zero or one, "*" for zero or
      > more, and "+" for one or more. The absence of an occurs attribute could
      > imply that only one reference is required (what happens if there's more than
      > one? Does it only match the first?). This makes it possible for proxies to
      > throw exceptions if a required reference is missng.

      What about stealing minOccurs and maxOccurs from XML Schema?

      > Regarding the key attribute: You don't mention it but I assume that it's
      > implied, does the presence of a key attribute always indicate that multiple
      > references are allowed?

      Probably better to still require the minOccurs attribute but...

      > ... Would the occurs attribute then apply to the number
      > of values that can be associated with each key?

      No, I can't follow that logic. I think it should still just count the
      number of hits to the reference.

      > Regarding the type attribute on reference elements: The description is
      > somewhat vague. If I do a GET on a URI identified by a reference, is it like
      > doing a GET on a resourceType with the same name as the type attribute?


      > ... What
      > happens when the type is missing? What would the proxy generator generate
      > then? Would it return something generic like a byte stream?

      Yes, the Python implementation (which I thought was on the site) has a
      GenericResource type. It has no references so it is basically a
      navigational dead-end. But you can GET and POST and PUT and DELETE it.
      And yes you can get the byte stream if you ask for it (but that's true
      even of XML resources).

      Paul Prescod
    Your message has been successfully submitted and would be delivered to recipients shortly.