mpostol / UA-Nodeset

Object-Oriented Internet - Machine To Machine (M2M) Communication Information Modeling
https://mpostol.github.io/UA-Nodeset/
MIT License
3 stars 3 forks source link

Incorrect encoding of publicationDate in ModelDesign XML file #50

Open eoursel opened 3 years ago

eoursel commented 3 years ago

Describe the bug

Tried with the DI model to generate modelDesign with asp. It appears that publication dates do not have a correct encoding; As a result of that the ModelCompiler stops with an exception.

To Reproduce

Steps to reproduce the behavior:

%ASPDIR%\asp "..\Opc.Ua.Di.NodeSet2.xml" -e "publish\Opc.Ua.Di.Model.xml" -s XMLstylesheet -n "http://opcfoundation.org/UA/DI/" %MODELCOMPILER% -d2 "publish\Opc.Ua.Di.Model.xml" -cg "publish\Opc.Ua.Di.Model.csv" -o2 "publish"

The ModelDesign file contains

 <Namespaces>
    <Namespace Name="Name0" Prefix="Prefix0" InternalPrefix="http://opcfoundation.org/UA/" XmlNamespace="http://opcfoundation.org/UA/" XmlPrefix="Prefix1" FilePath="" Version="1.04.8" PublicationDate="20/11/2020">http://opcfoundation.org/UA/</Namespace>
    <Namespace Name="Name2" Prefix="Prefix2" InternalPrefix="http://opcfoundation.org/UA/DI/" XmlNamespace="http://opcfoundation.org/UA/DI/" XmlPrefix="Prefix3" FilePath="" Version="1.03.0" PublicationDate="09/03/2021">http://opcfoundation.org/UA/DI/</Namespace>
  </Namespaces>

Expected behavior

Obviously publication date should be something like PublicationDate="2021-03-09T00:00:00Z"

Screenshots

image

Additional context

Perhaps it is because my machine has a french Locale? It could be the difference with your machine. Anyway, the encoding of the XML file should be independant of the locale of the machine, right?

Best regards