I’m having trouble saving a particular archetype from Archetype Editor. Other archetypes are apparently saved without issue. I’m getting the following error message. The archetype is attached to this email. I’d be extremely happy if anyone could tell me why this happens and how to fix it… J
Kind regards, Silje Ljosland Bakke
Coordinator, National Editorial Board for Archetypes, National ICT Norway
Adviser, R&D dept, E-health section, Bergen Hospital Trust
I’m having trouble saving a particular archetype from Archetype Editor. Other archetypes are apparently saved without issue. I’m getting the following error message. The archetype is attached to this email. I’d be extremely happy if anyone could tell me why this happens and how to fix it…
Hi Silje,
I took a look at the archetype in a text editor (TextWrangler) and it’s displaying the entire definition section on one line. Something is clearly wrong with the line endings in the ADL file, so I did a hex dump of it to have a closer inspection. This is what the hex dump looks like around the keyword ‘definition’:
Those two ‘0a0d' pairs on the first line are carriage return-linefeed pairs, which are normal on Windows. Then see the ‘0a' on the second line? That’s a linefeed, and there’s no ‘0d' carriage return accompanying it; this is normal on Linux or a Mac.
So it looks like someone has edited the ADL file in a text editor in way that’s somehow caused a mixture of the two styles of line endings. The ADL Parser internally normally removes all of the carriage returns before it starts parsing the archetype, but my guess would be that it’s got confused when it encountered this inconsistent formatting within the file. This has probably caused it to think that almost all of the definition section is inside the first comment in the definition section!
I would suggest opening the file in a text editor, and then re-type all of the line endings manually in the definition section. Then save it again. Depending on the text editor, hopefully it will save all of the line endings consistently one way or the other for you. Then try opening it in Archetype Editor again.