metanorma / mn-samples-plateau

Project PLATEAU by MLIT: Japanese Ministry of Land, Infrastructure, Transport and Tourism (国土交通省)
https://www.mlit.go.jp/plateau/
1 stars 0 forks source link

Use GML Dictionary XML files for Handbook #01 #129

Closed ronaldtse closed 2 months ago

ronaldtse commented 2 months ago

Fixes #128

@kwkwan this is for your work at #128 . Thanks!

ronaldtse commented 2 months ago

@kwkwan what's the status of this work?

kwkwan commented 2 months ago

@ronaldtse I have updated lutaml_gml_dictionary to support inline template in https://github.com/metanorma/metanorma-plugin-lutaml/pull/130. Would you review these changes to see whether they fit the requirements?

ronaldtse commented 2 months ago

Bibliography failures

These are all new failures:

citygml_20 does not have a corresponding anchor ID in the bibliography!
gsi_building_data_manual does not have a corresponding anchor ID in the bibliography!
iso_6707-1 does not have a corresponding anchor ID in the bibliography!
jis_e_1001 does not have a corresponding anchor ID in the bibliography!
jp_building_law does not have a corresponding anchor ID in the bibliography!
jp_road_law does not have a corresponding anchor ID in the bibliography!
maff_reservoir_hazard_maps does not have a corresponding anchor ID in the bibliography!
mlit_city_plan_investigation does not have a corresponding anchor ID in the bibliography!
mlit_emergency_roads does not have a corresponding anchor ID in the bibliography!
mlit_foundation_reqs does not have a corresponding anchor ID in the bibliography!
mlit_local_disaster does not have a corresponding anchor ID in the bibliography!
mlit_road_upkeep does not have a corresponding anchor ID in the bibliography!
nlftp does not have a corresponding anchor ID in the bibliography!
plateau_002 does not have a corresponding anchor ID in the bibliography!
plateau_010 does not have a corresponding anchor ID in the bibliography!
uniclass does not have a corresponding anchor ID in the bibliography!
No label has been processed for ID mlit_tsunami_guidelines
No label has been processed for ID jis_e_1001

PDF generation failure

Font failure

[mn2pdf] Input: XML (/var/folders/2t/xmdrn2sd2lv2w49dv0zw9_q00000gp/T/document20240820-5176-qjr10m.xml)
[mn2pdf] Input: XSL (/Users/mulgogi/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/metanorma-plateau-0.1.3/lib/isodoc/plateau/plateau.international-standard.xsl)
[mn2pdf] Output: PDF (/Users/mulgogi/src/mn/mn-samples-plateau/sources/001-v4/document.pdf)
[mn2pdf] 
[mn2pdf] [INFO] Generation of XSL-FO with information about the table's widths ...
[mn2pdf] [INFO] Generation of Intermediate Format with information about the table's widths ...
[mn2pdf] java.awt.FontFormatException: bad pfa font
[mn2pdf]    at java.desktop/sun.font.Type1Font.verifyPFA(Type1Font.java:324)
[mn2pdf]    at java.desktop/sun.font.Type1Font.verify(Type1Font.java:302)
[mn2pdf]    at java.desktop/sun.font.Type1Font.<init>(Type1Font.java:172)
[mn2pdf]    at java.desktop/sun.font.SunFontManager.createFont2D(SunFontManager.java:2223)
[mn2pdf]    at java.desktop/java.awt.Font.<init>(Font.java:644)
[mn2pdf]    at java.desktop/java.awt.Font.createFont(Font.java:1250)
[mn2pdf]    at org.metanorma.fop.fontConfig.registerFont(fontConfig.java:927)
[mn2pdf]    at org.metanorma.fop.fontConfig.lambda$updateFontsForGraphicsEnvironment$34(fontConfig.java:897)
[mn2pdf]    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[mn2pdf]    at org.metanorma.fop.fontConfig.updateFontsForGraphicsEnvironment(fontConfig.java:896)
[mn2pdf]    at org.metanorma.fop.fontConfig.updateConfig(fontConfig.java:531)
[mn2pdf]    at org.metanorma.fop.fontConfig.getConfig(fontConfig.java:852)
[mn2pdf]    at org.metanorma.fop.PDFGenerator.setTablesWidths(PDFGenerator.java:1221)
[mn2pdf]    at org.metanorma.fop.PDFGenerator.convertmn2pdf(PDFGenerator.java:431)
[mn2pdf]    at org.metanorma.fop.PDFGenerator.process(PDFGenerator.java:301)
[mn2pdf]    at org.metanorma.fop.mn2pdf.main(mn2pdf.java:338)
[mn2pdf] WARNING: error in the font '/Users/mulgogi/.metanorma/fonts/NISC18030.ttf' registering.
[mn2pdf] [INFO] Intermediate format. Rendered page #1.
[mn2pdf] [INFO] Intermediate format. Rendered page #2.
[mn2pdf] [INFO] Intermediate format. Rendered page #3.
[mn2pdf] [INFO] Intermediate format. Rendered page #4.

Heap space

This is the first time it failed due to heap space. Is there some recent change that required more memory?

Ping @Intelligent2013

[mn2pdf] [INFO] Intermediate format. Rendered page #677.
[mn2pdf] [INFO] Intermediate format. Rendered page #678.
[mn2pdf] [INFO] Processing of Intermediate Format with information about the table's widths (table_if.xsl) ...
[mn2pdf] [INFO] Generated successfully!
[mn2pdf] [INFO] Generation XML with table's widths ...
[mn2pdf] [INFO] Generated successfully!
[mn2pdf] [INFO] XSL-FO file preparation...
[mn2pdf] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
[mn2pdf]    at java.base/java.util.Arrays.copyOfRange(Arrays.java:3822)
[mn2pdf]    at java.base/java.lang.StringUTF16.newString(StringUTF16.java:1179)
[mn2pdf]    at java.base/java.lang.String.substring(String.java:2709)
[mn2pdf]    at java.base/java.lang.String.substring(String.java:2676)
[mn2pdf]    at org.apache.xpath.objects.XString.substring(XString.java:875)
[mn2pdf]    at org.apache.xpath.functions.FuncSubstringAfter.execute(FuncSubstringAfter.java:51)
[mn2pdf]    at org.apache.xpath.XPath.execute(XPath.java:337)
[mn2pdf]    at org.apache.xalan.templates.ElemWithParam.getValue(ElemWithParam.java:203)
[mn2pdf]    at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:226)
[mn2pdf]    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
[mn2pdf]    at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128)
[mn2pdf]    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
[mn2pdf]    at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394)
[mn2pdf]    at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248)
[mn2pdf]    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
[mn2pdf]    at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128)
[mn2pdf]    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
[mn2pdf]    at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394)
[mn2pdf]    at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248)
[mn2pdf]    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
[mn2pdf]    at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128)
[mn2pdf]    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
[mn2pdf]    at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394)
[mn2pdf]    at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248)
[mn2pdf]    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
[mn2pdf]    at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128)
[mn2pdf]    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
[mn2pdf]    at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394)
[mn2pdf]    at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248)
[mn2pdf]    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
[mn2pdf]    at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128)
[mn2pdf]    at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
mn2pdf failed! Preparing...
kwkwan commented 2 months ago

Hi @ReesePlews, the documents in folder sources/001-v4 have been updated to lutaml_gml_dictionary to render GML dictionary. You can test it by running the following command:

bundle exec metanorma sources/001-v4/document.adoc 

Please check.

ronaldtse commented 2 months ago

I'm going to merge this first because all gems are released. The remaining failures will be filed separately.

ronaldtse commented 2 months ago

Thank you @kwkwan !

kwkwan commented 2 months ago

@ronaldtse I have posted the bug in https://github.com/metanorma/mn-samples-plateau/issues/143.

ReesePlews commented 2 months ago

Hi @ReesePlews, the documents in folder sources/001-v4 have been updated to lutaml_gml_dictionary to render GML dictionary. You can test it by running the following command:

bundle exec metanorma sources/001-v4/document.adoc 

Please check.

thank you @kwkwan i have been watching the progress on this development work. thank you very much! i will follow the procedure and have a look at the document.

ronaldtse commented 2 months ago

@ReesePlews sorry the document is actually broken right now, #146 will address it.

ReesePlews commented 2 months ago

thanks @ronaldtse yes, i saw the other messages and understood. i just wanted to check the code list generation that @kwkwan worked on. thanks for checking into those issues, i will check again later.

Intelligent2013 commented 2 months ago

Font failure

[mn2pdf] java.awt.FontFormatException: bad pfa font
...
[mn2pdf] WARNING: error in the font '/Users/mulgogi/.metanorma/fonts/NISC18030.ttf' registering.

This issue doesn't any affect of the PDF rendering and was raised earlier here https://github.com/fontist/fontist/issues/344, but fixed there in the version v1.18.1. But the latest is v1.21.1

@ronaldtse could you check the result of the command gem which fontist?

Heap space

This is the first time it failed due to heap space. Is there some recent change that required more memory?

@ronaldtse no. I'll check the reason.