Sveino / Nordic44

Synthetic Power System of the Nordic high voltage transmission System
Other
1 stars 0 forks source link

problems converting xml files to turtle #4

Open VladimirAlexiev opened 2 years ago

VladimirAlexiev commented 2 years ago

I tried to convert the xml files to turtle:

# cd CGMES_2_4
# riot --formatted=turtle Nordic44_CGM_36f_MF.xml  1>Nordic44_CGM_36f_MF.ttl
19:03:13 WARN  riot            :: [line: 8, col: 31] {W119} A processing instruction is in RDF content. No processing was done.
## this is at <?iec61970-552 version="2.0"?>

# riot --formatted=turtle Nordic44_CGM_38_CO.xml  1>Nordic44_CGM_38_CO.ttl
19:03:19 ERROR riot            :: [line: 8, col: 2 ] Element type "rdf:RDF" must be followed by either attribute specifications, ">" or "/>".
## this is at   <!-- Header namespace -->. You cannot include comments in the middle of attributes

# cd ../CDPSM_2_0
## ALL files return this error:
19:07:55 WARN  riot            :: [line: 2, col: 31] {W119} A processing instruction is in RDF content. No processing was done.

# riot --formatted=turtle Nordic44_03_inc.xml  1>Nordic44_03_inc.ttl
19:07:55 WARN  riot            :: [line: 22, col: 37] {W107} Bad URI: <http:://iec.ch/TC57/61970-552/DifferenceModel/1#DifferenceModel> Code: 57/REQUIRED_COMPONENT_MISSING in HOST: A component that is required by the scheme is missing.
19:07:55 WARN  riot            :: [line: 23, col: 57] {W107} Bad URI: <http:://iec.ch/TC57/61970-552/DifferenceModel/1#reverseDifferences> Code: 57/REQUIRED_COMPONENT_MISSING in HOST: A component that is required by the scheme is missing.
19:07:55 WARN  riot            :: [line: 30, col: 57] {W107} Bad URI: <http:://iec.ch/TC57/61970-552/DifferenceModel/1#forwardDifferences> Code: 57/REQUIRED_COMPONENT_MISSING in HOST: A component that is required by the scheme is missing.
## the problem is the double colon

19:07:55 WARN  riot            :: [line: 23, col: 57] {W106} Unknown rdf:parseType: 'Statements' (treated as 'Literal'.
19:07:55 WARN  riot            :: [line: 30, col: 57] {W106} Unknown rdf:parseType: 'Statements' (treated as 'Literal'.
# the problem is that rdf:parseType: 'Statements' is a non-standard CIM invention

Such statements are captured as rdf:XMLLiteral rather than RDF, eg:

dm:forwardDifferences  "\n\t  \t\t<cim:OperatingShare xmlns:cim=\"http://iec.ch/TC57/CIM/CIM100#\"
 xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" 
rdf:about=\"urn:uuid:85e930e3-5409-4f2a-b343-5fd271d1a348\">\n\t\t\t\t
<!--Operating Participant B -->\n\t\t\t\t
<cim:OperatingShare.OperatingParticipant rdf:resource=\"urn:uuid:18e06751-54c1-44c8-86d9-0e9f5f358289\">
</cim:OperatingShare.OperatingParticipant>\n\t\t\t
</cim:OperatingShare>  \n\t  \n      "^^rdf:XMLLiteral 
Sveino commented 1 year ago

"<?iec61970-552 version="2.0""

this is sadly something that was added as part of IEC 61970-552:Ed2. I was a bit afraid this could be an issue. The MF model with go back to Ed1 and this will be remove.

riot --formatted=turtle Nordic44_03_inc.xml 1>Nordic44_03_inc.ttl

This items are a biggere challange, but we need to address incremenal as part of JSON-LD.

VladimirAlexiev commented 1 year ago

How about "You cannot include comments in the middle of attributes"?

Sveino commented 1 year ago

I will move the previous version of Nordic44 (CGMES v2.4) to a separate repository so that we can run the Turle validation on the repository.