Closed Flurb closed 3 years ago
Hi Mohammed,
Schematron is used for validating XML files as far as I know, checking for the absence/presence of certain sections in an XML file. By using JAXB and the included XJC tool, we are generating Java classes from the official IEC 61850-6 XSD schemas (https://www.iec.ch/dyn/www/f?p=103:227:4631044159258::::FSP_ORG_ID,FSP_LANG_ID:1273,25). As a second step, we use JAXB itself to build an SCL file based on the generated Java model classes.
By generating the outgoing SCL file models based on the official XSD schemas, we are guaranteed to have a correct SCL file. That's our validation, so we don't need Schematron for that anymore :) If IEC 61850-6 got updated and the XSDs got updated from IEC, then we immediately got the updates ourselves.
For incoming IEC CIM files we are using RDF4J. We can make the assumption that all CIM files have the RDF framework integrated, so therefore we chose RDF4J to be the tool to parse RDF XML CIM files, so we can easily query them.
Hi @Flurb If I understand, for you XML constrains validation, is not XML processing ?
Actually Schematron is structural schema language as XSD and RelaxNG. They all, some how, check for presence/absence. JAXB, I've been using even since (in fact you can find it in RTE's first pull request - late January). XSD is limited. It can't express all functional constrains. JAXB won't go beyond what is in the XSD. The SCL XSD don't interpret all constrains in the IEC 61850 because of the XSD limitation.
With all the possibilties that Schematron bring to the table in XML processing, it worth taking it in account.
Plus JAXB (Objectify XSD rules) and Schematron (rules - include XSD's and beyond) have different goal.
Are you really sure Compas don't need additional schema validation? or when you say "we" you mean Alliander and the CIM development ?
As I said, I think Slack can be very helpful to exchange ideas.
yes it's all part of the XML processing topic!
And with "we" I mean CoMPAS of course! I don't see the added value of Schematron for our use case (besides using JAXB and using the XSD schemas for generating the Java model classes), but it's definitely worth talking about!
"I don't see the added value of Schematron for our use case" (if "our" means all ComPAs) How you intend, for example, to validate your SCL file against external NSD (IEC 61850 standard) ? I can give many example that are not express in the SCL XSD. Private namespace are one of those .....
Hi all, This merge was quick.
Why remove Schematron as possibility for XML constrains processing? Perhaps there's good reason.
I don't thing JAXB support Schematron. May be with some workaround on XSLT, one can deal with old Schematron's implementation. But they have complete different goal.
There are several packages for Schematron support:
I think Slack can be very helpful to exchange ideas.