Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Element 'Label(s)' as CoMPAS SCL Extension to the CoMPAS XSD #160

Closed
dlabordus opened this issue Sep 5, 2022 · 1 comment · Fixed by #162
Closed

Add Element 'Label(s)' as CoMPAS SCL Extension to the CoMPAS XSD #160

dlabordus opened this issue Sep 5, 2022 · 1 comment · Fixed by #162
Assignees
Labels
enhancement New feature or request

Comments

@dlabordus
Copy link

dlabordus commented Sep 5, 2022

User Story
Add a CoMPAS Extension to store labels for a SCL File to make filtering easier if a lot of SCL Files are stored in the SCL Data Service.

Additional information
The idea is the add a extra Element 'Labels' to the CoMPAS SCL Extension. This Element will be added to the private section of the SCL Element (beside the SclName and SclFileType)

    <xs:simpleType name="tCompasLabel">
        <xs:annotation>
            <xs:documentation>Label added to the SCL File to filter on</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:normalizedString">
            <xs:minLength value="1"/>
            <xs:pattern value="[A-Za-z][0-9A-Za-z_-]*"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="tCompasLabels">
        <xs:annotation>
            <xs:documentation>List of Labels belonging to the SCL File to filter on with a maximum number of labels</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="Label" type="tCompasLabel" minOccurs="0" maxOccurs="20"/>
        </xs:sequence>
    </xs:complexType>

    <xs:element name="Labels" type="tCompasLabels"/>

Example of Private Section in SCL XML File

<SCL xmlns="http://www.iec.ch/61850/2003/SCL" xmlns:compas="https://www.lfenergy.org/compas/extension/v1" 
          release="4" revision="B" version="2007">
  <Private type="compas_scl">
    <compas:SclName>MiniGrid</compas:SclName>
    <compas:SclFileType>CID</compas:SclFileType>
    <compas:Labels>
     <compas:Label>Label1</compas:Label>
     <compas:Label>Label2</compas:Label>
    </compas:Labels>
  </Private>
  ...
</SCL>
@dlabordus dlabordus added the enhancement New feature or request label Sep 5, 2022
@dlabordus
Copy link
Author

Maybe also make a little change to the element type 'tCompasSclName', so that the minimal length will be at least 1.

    <!--
    SCL Name element.
    -->
    <xs:simpleType name="tCompasSclName">
        <xs:annotation>
            <xs:documentation>Name of the SCL configuration, extension excluded</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:normalizedString">
            <xs:minLength value="1"/>
        </xs:restriction>
    </xs:simpleType>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant