Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GML Dictionary XML files for Handbook #01 #129

Merged
merged 9 commits into from
Aug 20, 2024
Merged

Conversation

ronaldtse
Copy link
Contributor

@ronaldtse ronaldtse commented Jul 30, 2024

Fixes #128

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

@ronaldtse ronaldtse added the enhancement New feature or request label Jul 30, 2024
@kwkwan kwkwan self-assigned this Aug 1, 2024
@ronaldtse
Copy link
Contributor Author

@kwkwan what's the status of this work?

@kwkwan
Copy link
Contributor

kwkwan commented Aug 14, 2024

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

@kwkwan kwkwan force-pushed the use-gml-dictionary-01 branch 2 times, most recently from 8c205b7 to 456d705 Compare August 20, 2024 01:51
@ronaldtse
Copy link
Contributor Author

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
Copy link
Contributor

kwkwan commented Aug 20, 2024

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
Copy link
Contributor Author

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

@ronaldtse
Copy link
Contributor Author

Thank you @kwkwan !

@ronaldtse ronaldtse merged commit 0ac986e into main Aug 20, 2024
1 check failed
@ronaldtse ronaldtse deleted the use-gml-dictionary-01 branch August 20, 2024 03:06
@kwkwan
Copy link
Contributor

kwkwan commented Aug 20, 2024

@ronaldtse I have posted the bug in #143.

@ReesePlews
Copy link
Contributor

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
Copy link
Contributor Author

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

@ReesePlews
Copy link
Contributor

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
Copy link
Contributor

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 fontist/fontist#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document 01: Generate XML code lists using GML files and GML gem
4 participants