esdscom / sdscom-xml

Schema definition and other documents of eSDScom (formerly SDScom and ESCom), the standard for electronic exchange of Safety Data Sheets in a structured, processible way across Europe and other regions. Please read the wiki for more info. All work is licensed under CC BY-ND 4.0 (https://creativecommons.org/licenses/by-nd/4.0/legalcode)
https://www.esdscom.eu
27 stars 6 forks source link

Printable Hazard Class and Category #226

Closed dirk-qualisys closed 4 years ago

dirk-qualisys commented 4 years ago

While it has advantages to represent HazardClassCategory as an enumeration type so it can be used across legal regions, applications like online shops require a localized representation for classifications. This should be added as a mandatory phrase field HazardClassCategoryPrintable.

Suter-IK commented 4 years ago

I agree in the benefit of having a field HazardClassCategoryPrintable, but does it really need to be mandatory? Wouldn't it be enough to solve it with some xsl code like this:

        <xsl:choose>
          <xsl:when test="HazardClassCategoryPrintable">
            <xsl:apply-templates select="HazardClassCategoryPrintable"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:apply-templates select="HazardClassCategory"/>
          </xsl:otherwise>
        </xsl:choose>
dirk-qualisys commented 4 years ago

That's right, if printing is the only feature. But in the application that triggered this issue, it is necessary to import data into a database which is phrase based. Making this optional would require code to generate phrases that do not exist yet, plus you cannot be sure that the fixed text is compliant with your target region. Since every SDS author has to create a proper regionalized textual representation anyway, I don't think the burden of a mandatory field is huge. Also, SDScom should contain everything needed for a compliant SDS.

What would the reasons be for making it optional?

Suter-IK commented 4 years ago

I agree, it's easy to fill the additional field, so no problem to have it mandatory.