Page 1 of 1

Problem in frameworkExtensionScript.xsd: removeAction element's id attribute is too restrictive

Posted: Tue Mar 07, 2023 6:19 pm
by kai_weber
When working on an oXygen framework extension script I noticed that action IDs can be any string, but the frameworkExtensionScript.xsd delivered with oXygen (I'm using v25.0) defines the @id-attribute of the <removeAction> element with data type xs:NCName:

Code: Select all

<xs:element name="removeAction">
    <xs:annotation>
      <xs:documentation>Removes an action that was added in the Content Completion Assistant from
        the base framework configuration.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="id" use="required" type="xs:NCName">
        <xs:annotation>
          <xs:documentation>Action ID.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
So when I try to remove actions with action IDs that don't fit the xs:NCName data model, I get validation errors in my extension script file.

Here's an example from an open source project: Ediarum defines an author action with the ID "sic-corr[deleted]". My .exf file, which is based on the ediarum.BASE.edit framework, fails validation at the line:

Code: Select all

<removeAction id="sic-corr[deleted]"/>
Luckily, being able to validate the extension script or not doesn't influence the functionality: Even with the validation error for the above code line, the action is effectively removed from the derived framework, so it's not too big a deal.

Best regards,
Kai

Re: Problem in frameworkExtensionScript.xsd: removeAction element's id attribute is too restrictive

Posted: Thu Mar 09, 2023 1:54 pm
by alex_jitianu
Hi Kai,

Thank you for reporting this issue. I've added an issue to relax the schema and accept any string. You are right, the validation error doesn't affect the functionality. Meanwhile, you can make the change yourself in {oxygenInstallDir}\frameworks\extensions\frameworkExtensionScript\frameworkExtensionScript.xsd and replace xs:NCName with xs:string:

Code: Select all

<xs:attribute name="id" use="required" type="xs:NCName">
best regards,
Alex

Re: Problem in frameworkExtensionScript.xsd: removeAction element's id attribute is too restrictive

Posted: Thu Oct 12, 2023 8:49 am
by Radu
Hi,
As an update the newly released Oxygen 26 should no longer report a validation error in this case.
Regards,
Radu