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

stylesheet for SDSComXML version 4.4 and 4.2 #58

Open
Henrich-BGRCI opened this issue Jan 22, 2016 · 14 comments
Open

stylesheet for SDSComXML version 4.4 and 4.2 #58

Henrich-BGRCI opened this issue Jan 22, 2016 · 14 comments
Assignees

Comments

@Henrich-BGRCI
Copy link

With this issue I want to release the new stylesheet EDASxChem_style_v4.txt for displaying SDScomXML files. At least all fields defined for EDASxChem 4.2.1.1 are included.

For usage you have to change the file name to EDASxChem_style_v4.xslt and to add the following lines at the beginning of your SDScomXML file followed by the part:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="EDASxChem_style_v4.xslt"?>
<DatasheetFeed  xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.sdscomxml.eu/421/sdscomxml.xsd">

You are invited to test and discuss it and to report any bugs. On the long term run, I want to include more fields.

EDASxChem_style_v4.txt

@dirk-qualisys
Copy link
Member

May we treat this as an imcomplete, yet common SDScom stylesheet? I suggest to rename it and make it part of the deliverables, i.e. have it maintained and published with each SDScom release.

@nils-eska
Copy link
Contributor

Good work, but as long as this stylesheet does not contain the full SDScom scope, this should be only part of the SDBTransfer project. We should not mix the projects and the different scopes.

@dirk-qualisys
Copy link
Member

I think we need to find a common understanding here. As SDScom substandards, EDASxBau and EDASxChem cover parts of SDScom. I agree with Nils that the template should not be part of the releases if it is meant to cover (one of) those substandards only, but shouldn't we take this as the starting point to develop a complete stylesheet? In that case, we are talking about an SDScom template which is added now for further development. This would be my preference, and I am certainly willling to contribute to the template.

@dirk-qualisys
Copy link
Member

Mr Henrich today attached an updated stylesheet to issue #69.

@dirk-qualisys
Copy link
Member

As agreed in today's steering committee meeting, a full-blown SDScom stylesheet should be developed as part of the SDScom delivery. This stylesheet will be enhanced with remarks and editing hints so that it can replace the "BDI template" on the long-term.
A new issue will be opened for this SDScom stylesheet.

@Henrich-BGRCI
Copy link
Author

Just a new update of the style sheet:
EDASxChem_style.release20160426.txt

Rename the file ending to .xslt.

@Henrich-BGRCI Henrich-BGRCI reopened this Apr 26, 2016
@dirk-qualisys dirk-qualisys added this to the 4.x milestone Apr 30, 2016
@dirk-qualisys
Copy link
Member

dirk-qualisys commented Apr 30, 2016

Thank you! We can leave this issue open for further stylesheet updates until we create an SDScom stylesheet as described in issue #82.

@dirk-qualisys
Copy link
Member

@Henrich-BGRCI , do you agree to use your stylesheet as the starting point for a full SDScom stlesheet under our Creative Commons license? You have a copyright remark in your stylesheet that would contradict this.

If you agree, I would take your latest stylesheet version, remove the German description and replace it with our usual license link and integrate it into 5.0. Please confirm or object in this issue.

@dirk-qualisys dirk-qualisys modified the milestones: 4.x, 5.0.0 May 19, 2019
@dirk-qualisys dirk-qualisys removed this from the 5.0.0 milestone Oct 31, 2019
@SmolSoftBoi
Copy link

I started creating my own style sheet if this would help: https://github.com/EpicKris/sdscom-xsl

@dirk-qualisys
Copy link
Member

Closed since Kris's stylesheet covers this. Thanks again!

@Henrich-BGRCI
Copy link
Author

Here, I present a new stylesheet "SDSComXML Viewer" for covering most parts of SDSComXML version 4.4.0.2 and 4.2. The new stylesheet is published under http://creativecommons.org/licenses/by-sa/4.0/
SDScomXMLViewer_1.0.zip

"SDSComXML Viewer" consists of five parts:
SDSComXMLVierw.xslt: main part for reading depending files
SDSComXMLVierwCT.xslt: templates for the different sections of the safety datasheet
SDSComXMLVierwDT.xslt: templates according to the datatypes of the SDSComXML schema
SDSComXMLVierwMap.xslt: variable definition for translating SDScomXML element names into German
SDSComXMLVierw.css: CSS for formating the output html

To make the stylesheet more flexible and adaptable to changes in XSD, the schema files are loaded by the stylesheet. In principal, by modifying the files SDSComXMLVierwCT.xslt and SDSComXMLVierwDT.xslt, the stylesheet should be easily adaptable to SDSComXML version 5.

For converting SDSComXML into html you can use e.g. SaxonHE11-1J:
java -cp SaxonHE11-1J\saxon-he-11.1.jar net.sf.saxon.Transform -t -xsl:SDSComXMLViewer.xslt -o:example.html -s:3.xml

@Henrich-BGRCI Henrich-BGRCI changed the title stylesheet for EDASxChem stylesheet for SDSComXML version 4.4 and 4.2 Apr 28, 2022
@SmolSoftBoi
Copy link

Here, I present a new stylesheet "SDSComXML Viewer" for covering most parts of SDSComXML version 4.4.0.2 and 4.2. The new stylesheet is published under http://creativecommons.org/licenses/by-sa/4.0/ SDScomXMLViewer_1.0.zip

We have a stylesheet already: https://github.com/esdscom/esdscom-xsl

@Henrich-BGRCI
Copy link
Author

I know, but I started the programming for this stylesheet long time ago and just finished it (see my workshop slides from 2021).

As far as I can see from your code, it covers just a few sections and datatypes (so far, I wasn't able to run it). Whereas, in the stylesheet here, I use a kind of schema awareness for retrieving the datatype of an element in the XML, which makes it independent from the tree of elements and their names and able to display all data from the XML. The schema awareness should make it easy to adapt it to SDScom version 5, too. (Unfortunately, I have no SDS example files for version 5.)

@dirk-qualisys
Copy link
Member

First of all, thank you to both of you for your work on stylesheets!

I am currently working on preparing a real life, third-party SDS in our system and will try to complete the data export (currently covering just what our customers need, not all SDS fields) over the summer. Most likely there will be some problems due to different data formats in eSDScom compared to our internal system, but the result will be publicly available end of August I think. I will post the link in this issue then.

Assuming that your approaches have different strengths, it would be great to join the advantages of both style sheetsinto one so that the workload is reduced and there is just one stylesheet (also for @geoffbrooksdev to use for his Editor). But stylesheets and the tool stack you used is beyond my technical limits, so I hope you can find a way to cooperate.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants