IwouldliketoconverttheXMLschemastotheCfile-structurewiththeXSDfileswhichprovidedbyISO.IcanseethatinOpenV2Gproject,therearedocumentsandfragmentsstructureintheEXIcodes.ButwhenIusethetoolstodotheconvert,Ifoundthatthefragmentstructureisnotgenerated.IseeintotheXSDfile,therearenothe'fragment'fieldintheXSDfiles.ButtherearegeneratedfragmentstructureinOpenV2G.CanyouexplainhowtogetthefragmentinformationfromtheXSDfile?I'm looking forward to your reply, thanks!Godfrey
Last edit: Godfrey 2023-01-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
[Definition:] EXI documents are EXI bodies with a single root element that conform to the Built-in Document Grammar (See 8.4.1 Built-in Document Grammar) or Schema-informed Document Grammar (See 8.5.1 Schema-informed Document Grammar).
[Definition:] EXI fragments are EXI bodies with zero or more root elements that conform to the Built-in Fragment Grammar (See 8.4.2 Built-in Fragment Grammar) or Schema-informed Fragment Grammar (See 8.5.2 Schema-informed Fragment Grammar).
Normally we use EXI documents. However, fragments are used to encode portions (for example sub-elements) that later can be signed etc.
Hope this helps,
-- Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Daniel
Thank you for your reply. I take two examples in ISO15118-2 and OpenV2G code to express my puzzlement.
1. SessionSetupReq only appear once in the xsd file, but this field exist in the document and fragment struct both.
2. ChargingComplete appeared twice in the xsd file, this field only exist in fragment struct. I can't see the difference between this field and other fields.
Can you give me some more help, thank you!
Regards
Godfrey
This aspect relates to the EXI specification.
If you want to know/understand all the details I urge you to read the spec.
see https://www.w3.org/TR/exi/
The openV2G library is exactly about not knowing all the details and simply using the provided interfaces.
To put it simple.
The document grammar is about encoding valid XML/EXI documents. Not all elements are valid root elements. SessionSetupReq is a valid element while ChargingComplete is apparently not.
The fragment grammar is the entry point for any document (valid or not valid) and hence contains all possible elements.
I hope this helps,
-- Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Daniel
Last edit: Godfrey 2023-01-17
Hi,
EXI differs between "documents" and "fragments".
see https://www.w3.org/TR/exi/#streams
[Definition:] EXI documents are EXI bodies with a single root element that conform to the Built-in Document Grammar (See 8.4.1 Built-in Document Grammar) or Schema-informed Document Grammar (See 8.5.1 Schema-informed Document Grammar).
[Definition:] EXI fragments are EXI bodies with zero or more root elements that conform to the Built-in Fragment Grammar (See 8.4.2 Built-in Fragment Grammar) or Schema-informed Fragment Grammar (See 8.5.2 Schema-informed Fragment Grammar).
Normally we use EXI documents. However, fragments are used to encode portions (for example sub-elements) that later can be signed etc.
Hope this helps,
-- Daniel
Hi Daniel
Thank you for your reply. I take two examples in ISO15118-2 and OpenV2G code to express my puzzlement.
1. SessionSetupReq only appear once in the xsd file, but this field exist in the document and fragment struct both.
2. ChargingComplete appeared twice in the xsd file, this field only exist in fragment struct. I can't see the difference between this field and other fields.
Can you give me some more help, thank you!
Regards
Godfrey
Hi,
This aspect relates to the EXI specification.
If you want to know/understand all the details I urge you to read the spec.
see https://www.w3.org/TR/exi/
The openV2G library is exactly about not knowing all the details and simply using the provided interfaces.
To put it simple.
The document grammar is about encoding valid XML/EXI documents. Not all elements are valid root elements. SessionSetupReq is a valid element while ChargingComplete is apparently not.
The fragment grammar is the entry point for any document (valid or not valid) and hence contains all possible elements.
I hope this helps,
-- Daniel