Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-core-dev] Extension point schemas don't seem to use namespaces properly

[This is a repeat of a posting to the eclipse.tools newsgroup. My apologies
if response has crossed in the mail.]

The schemas define a targetNamespace, but that namespace is not used in ref
attributes to qualify global element names. For example, in templates.exsd
provided by org.eclipse.pde, we have:

<schema targetNamespace="org.eclipse.pde.ui">
...
  <element name="extension">
    <complexType>
      <sequence>
        <element ref="template" minOccurs="1" maxOccurs="unbounded"/>
      </sequence>
      ...
    </complexType>
  </element>

  <element name="template">
    ...
  </element>
...
</schema>

The value of a ref attribute is a QName. Since "schema" and "template" are
both unqualified they must be in the same namespace, but they aren't.

Is there some interpretation of XMLSchema I'm not aware of that makes this
usage correct?

If not, this must be a non-standard XMLSchema subset. (The schema editor
marks properly qualified ref attributes as errors.) So the question
naturally arises: Is there some documentation of the subset implemented?
What other restrictions apply?

Bob




Back to the top