I'm reviewing the full document now, and I have a few further
comments:
Section 2.2 Parsing
"Containers MUST NOT reject XML documents that are not valid (as
mandated by the canonicaland extendedschema definitions), as long as a
valid document can be derived from the markup that exists. This means
that Containers MUST ignore any attributes or tags that they can not
interpret. This requirement is included to facilitate extensions to
the schema for Container-specific uses."
This requirement limits the usefulness of the schema. If it is a
requirement we need, I'd suggest that it might be better to include
wildcards in the schema:
http://www.w3.org/TR/xmlschema-1/#Wildcards
http://www.w3.org/TR/xmlschema-0/#any
This would allow implementations to use a schema validator to ensure
that the parts of the document that *are* part of the schema are
correct, while still allowing additional elements and attributes.
Additionally, it would allow the validator to automatically enforce
the requirement that "Containers MAY support non-standard tags and
attributes, but they MUST be enclosed in a separate XML namespace."
The drawback is that if we want to allow additional elements and
attributes everywhere, then it would clutter up the schema a lot,
because we'd have to add wildcards all over the place. It would be
easy to miss places, too, especially as the format evolves in the
future.
But I wonder whether this is something we really want to allow in the
first place. If a gadget depends on some container-specific extension
to the spec format, and it's installed in some other container that
silently ignores the requirement, it could break in some subtle,
confusing, and perhaps even dangerous way. This extension method
doesn't have any standard way to gadgets to declare whether they
depend on a particular extension or simply make use of it when
available, and doesn't provide a way for gadgets to even know whether
the container supports the extension. On the other hand, features
satisfy all of these requirements. IMO containers should be encouraged
to use features rather than changes to the spec format whenever
possible.
Are there existing examples of where containers other than iGoogle
have extended the spec format? Can these be migrated to feature
extensions?
This does create a backwards-compatibility issue, so maybe it's too
late to change...
Section 2.4 Module
General comment on this whole section: I think it would be good to be
explicit about which child elements and attributes are required and
which are optional for each element.
Section 2.4.1 /ModulePrefs
The Google Gadgets XML reference at
http://code.google.com/apis/gadgets/docs/reference.html
includes some additional guidelines for screenshot and thumbnail:
---
screenshot
Optional string that gives the URL of a gadget screenshot. This must
be an image on a public web site that is not blocked by robots.txt.
PNG is the preferred format, though GIF and JPG are also acceptable.
Gadget screenshots should be 280 pixels wide. The height of the
screenshot should be the "natural" height of the gadget when it's in
use.
thumbnail
Optional string that gives the URL of a gadget thumbnail. This must be
an image on a public web site that is not blocked by robots.txt. PNG
is the preferred format, though GIF and JPG are also acceptable.
Gadget thumbnails should be 120x60 pixels.
---
I think it would be good to preserve that text.
Section 2.4.1.5 /ModulePrefs/Link
"Containers MAY support additional values, but they MUST be namespaced
to avoid collisions."
I think it could use additional detail explaining what's meant by
"namespaced" (is it just prefixed with the vendor name like
"google.foo" or "atlassian.bar"?)
Section 2.4.3 /Content
I think it would be helpful to note that the text within this element
is typically wrapped in CDATA to allow you to use HTML tags without
them being interpreted by the XML parser, and without having to
explicitly escape them.
Section 3. Variable Substitution
Looks like it's missing some line breaks in the MSG description.
"Containers MUST perform substitution on all elements and attributes
defined in Elements and Attributes (Section 2.3), with the exceptions
of /ModulePrefs/Locale (and children), or any element with an explicit
enumeration. Containers MUST NOT perform substitution on the raw text
of the XML."
This isn't totally clear to me. The intent is that all attribute
values and text content should be substituted (except where noted),
right? The second sentence is meant to require that element and
attribute names themselves aren't substituted?
Section 8.2 Optional Features
This is missing setprefs. That's always been a weird one, though,
since it adds methods to gadgets.Prefs rather than defining its own
namespace. I'd be pretty happy to make that API core & required, and
define the behavior if the container can't save prefs (which might be
the case in some situations for containers where the feature is
available, too).
On Oct 28, 10:54 am, Lane LiaBraaten <
lliab...@google.com> wrote:
> I've been working on the Gadgets XML reference (99% from Kevin's doc circa
> v0.8). Right now it's in svn in it's own file here:
http://opensocial-resources.googlecode.com/svn/spec/draft/OpenSocial-...