metanorma / stepmod2mn

Migrating STEPmod documents to Metanorma
0 stars 1 forks source link

Errors should not kill the documents #191

Closed ronaldtse closed 5 months ago

ronaldtse commented 5 months ago

These errors should be made into comments after the document attributes. The generated document must always be valid for compilation.

image
Intelligent2013 commented 5 months ago

Empty lines don't supported between the document attributes:

= Industrial automation systems and integration: Product data representation and exchange: Application module: Project resources
:docnumber: 10303
:tc-docnumber: ISO/TC 184/SC 4/WG 12 N00000

// _Error in module.xml/module/@wg.number - Error WG-2: No WG number provided (0 is invalid)._

:partnumber: 1392
:copyright-year: 
:language: en
:publish-date: 
:edition: 1
:title-intro-en: Industrial automation systems and integration
:title-intro-fr: Systèmes d'automatisation industrielle et intégration
:title-main-en: Product data representation and exchange
:title-main-fr: Représentation et échange de données de produits
:title-part-en: Application module: Project resources
:title-part-fr: Module d'application: Project resources

The presentation XML doesn't contains the elements title at all.

The correct markup is:

= Industrial automation systems and integration: Product data representation and exchange: Application module: Project resources
:docnumber: 10303
:tc-docnumber: ISO/TC 184/SC 4/WG 12 N00000
// _Error in module.xml/module/@wg.number - Error WG-2: No WG number provided (0 is invalid)._
:partnumber: 1392
:copyright-year: 
ronaldtse commented 5 months ago

@Intelligent2013 while you are at this, can you also strip the trailing whitespaces of the attributes? If there is no attribute value, please also strip the whitespace, e.g.

:published-date:    // <=== Please strip whitespace
Intelligent2013 commented 5 months ago

Fixed in https://github.com/metanorma/stepmod2mn/releases/tag/v1.57.

Some documents, for instance iso-10303-1137, iso-10303-1774, iso-10303-1818 don't generated by stepmod2mn anymore (they are missing in the repository index), therefore they didn't overwrite by new updated version, and still contain the non-commented Error... in the document.adoc. Therefore they should be removed manually from the folder documents.

ronaldtse commented 5 months ago

Some documents, for instance iso-10303-1137, iso-10303-1774, iso-10303-1818 don't generated by stepmod2mn anymore

ALL documents should still be generated (and we MUST keep them). They should only be missing from collection.yaml but still kept in a separate YAML file to keep track that they are around.