Schema problem with sampler2D

While writing some unit tests for a collada reader I’m currently writing I stumbled over a validation problem with a test DAE file. The file contains this:


<sampler2D>
  <wrap_s>BORDER</wrap_s>
  <wrap_t>CLAMP</wrap_t>
  <minfilter>NEAREST</minfilter>
  <magfilter>LINEAR</magfilter>
</sampler2D> 

According to the PDF spec this should be correct. But my XML Editor (The standard XML editor in Eclipse) gives me this error:


'sampler2D' must have no character or element information item [children], because the type's content type is empty.

Is this an error in the schema file or is the definition for the sampler2D element to complex to understand for the Eclipse XML editor?

The first child element has to be a <source> element.

Not sure why Eclipse is giving you such a misleading error message.

I’m talking about COLLADA 1.5.0. Sorry, forgot to mention this. According to the spec there is no source element in sampler2D anymore. But a missing or wrong element is not the problem here, Eclipse definitely thinks the sampler2D element must be completely empty. Even completion doesn’t bring up any valid child element (And completion works perfectly for everything else).

So the question stays: Bug in the Schema file or bug in the Eclipse XML editor? But when nobody else ever mentioned this problem then I guess it works correctly in other products so it’s most likely a bug in the Eclipse XML editor.

Seems like a bug in Eclipse to me. That is a complexType that is defined by a complexContent with a restriction.