On 10/8/2009 3:34 AM, Kevin Smith wrote:
On Thu, Oct 8, 2009 at 10:57 AM,<[email protected]> wrote:
On 7-Oct-2009, at 03:02,<[email protected]> wrote:
I have been going through pubsub and noticed that it is really hard
(impossible?) to extend it without editing the original schema. I am
not XSD expert but as far as I know there is no way, for example, to
add one attribute from own namespace to the schema with
tools provided
by XSD. The problem is that Pubsub schema defines all elements
directly as named element and XSD allows extension or
restriction only
to named complex- or simple types.
I believe this is on purpose. If you need to add your
own attributes and elements then you should put it in the item
payload with whatever custom xmlns you need.
Item payload is not always the right place to extend the protocol because in
some cases the extension should not be visible to the recipients. Specifying
schema in unextendable way leads into a situation where it is possible to
extend the protocol but impossible to document the extension in formal way.
I think (and someone else may contradict this later) that the
intention is that you can extend your implementations with namespaced
attributes if you want, and that the schemas are just infomative.
While the schema has been described as being supplementary, when this
issue of namespaced attributes was brought up earlier on jdev, while a
number of people favored allowing them, there wasn't anything definitive
I saw out of the discussion, except for Peter pointing out that some
implementations might have a problem with namespaced attributes and one
might submit bug reports for them to overcome this problem.
My personal thought is that while not explicitly allowing namespaced
attributes may in some way encourage agreements on standards, I believe
it deters more decentralized experimentation. I do believe that
implementations (and the specs correspondingly) should be required to
support more parsing of XML (at least bona fide namespacing and
namespacing of attributes) even if the spec doesn't recommend it.
Brett