Results 1 to 4 of 4

Thread: Schema problem with sampler2D

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    4

    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:
    Code :
    <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:
    Code :
    '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?

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Schema problem with sampler2D

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

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

  3. #3
    Junior Member
    Join Date
    Jul 2010
    Posts
    4

    Re: Schema problem with sampler2D

    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.

  4. #4
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Schema problem with sampler2D

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •