0
votes

I am getting a following error though I have mentioned my schema location. I have made some mistake out there. Please help me on this.

I am trying to find similar posts but not able to find solutions to my problem. I think that I am missing some important peice of code. So, please help me on the same.

cvc-complex-type.2.4.a: Invalid content was found starting with element 'requireJs'.

Here is my .xml code.

<?xml version="1.0" encoding="UTF-8"?>
<sdkExtension
    xmlns="http://www.sap.com/bi/zen/sdk"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.sap.com/bi/zen/sdk http://www.sap.com/bi/zen/sdk" 
    id="com.sap.sample.scnguage"
    title="SCN Tutorial Guage"
    version="15.0"
    vendor="SAP">
    <license>license</license>
     <component
      databound="false"
      group=""
      handlerType="div"
      icon="res/gauge.png"
      id="SCNGauge"
      propertySheetPath="res/additional_properties_sheet/additional_properties_sheet.html"
      title="Gauge"
      tooltip=""
      visible="true">

    <requireJs modes="commons m">res/js/component</requireJs>

   <!--  <stdInclude kind="d3"/>
    <jsInclude>res/js/component.js</jsInclude>
    <cssInclude>res/css/component.css</cssInclude> -->

    <property
        id="startAngleDeg"
        title="Start Angle"
        type="float"/>
    <property
        id="endAngleDeg"
        title="End Angle"
        type="float"/>
    <property
        id="innerRad"
        title="Inner Radius"
        type="float"/>
    <property
        id="outerRad"
        title="Outer Radius"
        type="float"
        visible="false"/>
    <property
        id="offsetLeft"
        title="Centerpoint Offset X-Axis"
        type="int"
        visible="false"/>
    <property
        id="offsetDown"
        title="Centerpoint Offset Y-Axis"
        type="int"
        visible="false"/>
    <property
        id="paddingTop"
        title="Top Padding"
        type="int"/>
    <property
        id="paddingBottom"
        title="Bottom Padding"
        type="int"/>
    <property
        id="paddingLeft"
        title="Left Padding"
        type="int"/>
    <property
        id="paddingRight"
        title="Right Padding"
        type="int"/>
    <property
        id="colorCode"
        title="Color"
        type="Color"/>
    <initialization>
        <defaultValue property="WIDTH">100</defaultValue>
        <defaultValue property="HEIGHT">100</defaultValue>
        <defaultValue property="startAngleDeg">-90.0</defaultValue>
        <defaultValue property="endAngleDeg">90.0</defaultValue>
        <defaultValue property="colorCode">blue</defaultValue>
    </initialization>
  </component>
  </sdkExtension>
1
What XSD are you using to valid your XML? Without that your question will be closed because... Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: minimal reproducible example - kjhughes

1 Answers

0
votes

It seems to me that the schema used does not allow the requireJs element as a child of the component element or it should be in a different place.

Without the actual schema it's hard to say for sure though.