ui5experts / ui5-schemas

:rocket: UI5 Schemas allows you to develop SAPUI5/OpenUI5 XML at a maximum convenience. It downloads, upgrades and sets up SAPUI5/OpenUI5 XML schemas for a better development experience in your favorite IDE (if it is WebStorm ;).
MIT License
49 stars 8 forks source link

Support: is there a bug in the UI5 XSD files? #16

Closed necavit closed 5 years ago

necavit commented 5 years ago

Hi there! πŸ˜„ Super nice project to have around! I have an issue with schema validation in PHPStorm... I am not sure who's to blame: the IDE or the schemas from SAP! Once the schemas are installed and linked to the IDE, the following view definition gives some errors:

<core:View controllerName="example.app.Controller"
           xmlns="sap.m"
           xmlns:tnt="sap.tnt"
           xmlns:core="sap.ui.core" displayBlock="true">
  <tnt:ToolHeader>
    <IconTabHeader>
      <items>
        <IconTabFilter text="{i18n>text}" key="the-key"/>
        <!--Invalid content was found starting with element '{"sap.m":IconTabFilter}'. One of '{"sap.ui.core":Control, "sap.ui.core":Fragment, WC["http://www.w3.org/1999/xhtml"]}' is expected.-->
      </items>
    </IconTabHeader>
  </tnt:ToolHeader>
</core:View>

Of course, IconTabFilter is actually a Control, but the validation fails here... Which is funny, because intelli-sense does suggest IconTabFilter as a valid element to be contained in the <items> aggregation πŸ™ƒ Do you know whether this is an IDE's fault or an XSD's one? Have you faced this issue before? If so... could you get around it? πŸ˜… Thanks a lot and best regards!

cschuff commented 5 years ago

Hi,

this is a flaw with the actual SAPUI5 schema. sap.m.IconTabHeader allows for Control or Fragment in the items aggregation whereas sap.m.IconTabFilter is an item...

I think this problem arises from the interface sap.m.IconTab they are using which does not seem to be reflected in the schema.

Therefore closing the issue.

BR Chris