Danny Ayers wrote:
On Thu, 16 Dec 2004 16:29:54 -0500, Sam Ruby <[EMAIL PROTECTED]> wrote:
Danny Ayers wrote:
Which I think leaves the position that both the following would be legal:
<media:thing name="here" />
The feedvalidator treats this as legal.
<item name="here" />
The feedvalidator treats this as illegal. Which has caught more than a few mispellings of isPermaLink.
You can guess what's coming...how does/should the feedvalidator treat:
<media:content url="http://example.org/song.mp3" />
If the element is in an unrecognized namespace, then the whole element is treated as valid.
If the element is in a recognized namespace, then the validator validates all attributes which are either in no namespace or in a recognized namespace. All others are treated as valid.
I can't really see where any special (semantic) relationship should be assumed for the element/attributes structure compared to the element/children structure based on the infoset. Personally I would lean towards having the feedvalidator at least warn on all those examples above to minimise confusion. Because it could easily get worse :
<guid isPermaLink="true">...
known/valid.
<media:guid isPermaLink="true">...
unknown/valid.
<media:guid media:isPermaLink="true">...
unknown/valid.
<film:guid media:isPermaLink="true">...
unknown/valid.
<guid media:isPermaLink="true">...
unknown/valid.
<link isPermaLink="true">...
known/valid
<link isPermaLink="possibly">...
known/invalid
<link media:isPermaLink="true">...
unknown/valid
Which are valid? Which of the attributes share the same semantics?
Inferring that attributes which are in an explicit namespace are the same might be reasonable. But inferring that attributes which are not in a namespace are the same because they happen to be spelled the same may produce false positives.
- Sam Ruby
