usnistgov / oscal-xslt

Open source XSLT for OSCAL display and processing
Other
6 stars 3 forks source link

Catalog view updates #4

Closed wendellpiez closed 1 year ago

wendellpiez commented 1 year ago

This includes several improvements in XSLT for HTML and FO-based PDF production, making them more robust, more featureful and more general.

Includes scripts and a pom.xml file for invoking the production pipeline in Maven.

When these are tested and documented this should be ready.

aj-stein-nist commented 1 year ago

@Arminta-Jenkins-NIST and @nikitawootten-nist, I would like if you can review this before the end of Sprint 67. Please pull down the code and the README documentation here. Thanks!

aj-stein-nist commented 1 year ago

Not completely related so I put it in the OSCAL DKB wiki as an entry, but I added information about how to set up Oxygen transformations in the style I would if you will not exclusively rely on the Maven shell script.

https://github.com/usnistgov/OSCAL/wiki/Developer-Knowledge-Base/5810ad9a2d965fc526995d53ccb91ac129958b69

nikitawootten-nist commented 1 year ago

Hi Wendell, I'm also having trouble running the PDF generation script:

 ➜ ./mvn-make-catalog-pdf.sh basic-catalog.xml result.pdf
[INFO] Scanning for projects...
[INFO]
[INFO] -------< gov.nist.secauto.oscal.tools.core:oscal-xml-formatting >-------
[INFO] Building oscal-xml-formatting 1.0.0
[INFO]   from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- exec:3.1.0:java (default-cli) @ oscal-xml-formatting ---
Apr 24, 2023 4:02:09 PM org.apache.fop.apps.FOUserAgent processEvent
INFO: Rendered page #1.
Apr 24, 2023 4:02:09 PM org.apache.fop.apps.FOUserAgent processEvent
WARNING: The contents of fo:region-after on page i exceed the available area in the block-progression direction by 4800 millipoints. (See position 1:4091)
Apr 24, 2023 4:02:09 PM org.apache.fop.apps.FOUserAgent processEvent
WARNING: The following feature isn't implemented by Apache FOP, yet: table-layout="auto" (on fo:table) (See position 1:8458)
Error on line 1 column 10474 of basic-catalog.xml:
  SXCH0003  org.apache.fop.fo.ValidationException: "fo:page-sequence" is not a valid child
  of "fo:block"! (See position 1:10474). Caused by org.apache.fop.fo.ValidationException:
  file:/Users/naw2/Documents/repos/oscal/oscal-xslt/publish/basic-catalog.xml:1:10474:
  "fo:page-sequence" is not a valid child of "fo:block"! (See position 1:10474)
[com.xmlcalabash.drivers.Main.main()] ERROR com.xmlcalabash.util.DefaultXProcMessageListener - render-oscal-catalog.xpl:52:67:Failed to process FO document with FOP
[com.xmlcalabash.drivers.Main.main()] ERROR com.xmlcalabash.util.DefaultXProcMessageListener -     cause: file:/Users/naw2/Documents/repos/oscal/oscal-xslt/publish/basic-catalog.xml:1:10474:err:SXCH0003:org.apache.fop.fo.ValidationException: "fo:page-sequence" is not a valid child of "fo:block"! (See position 1:10474)
[com.xmlcalabash.drivers.Main.main()] ERROR com.xmlcalabash.drivers.Main - Failed to process FO document with FOP
[com.xmlcalabash.drivers.Main.main()] ERROR com.xmlcalabash.drivers.Main - Underlying exception: org.apache.fop.fo.ValidationException: "fo:page-sequence" is not a valid child of "fo:block"! (See position 1:10474)
wendellpiez commented 1 year ago

@nikitawootten-nist @Arminta-Jenkins-NIST feel free to try again thanks!

(The basic-catalog.xml isn't the prettiest thing ever but at least it should run now.)

nikitawootten-nist commented 1 year ago

The new update does fix the issue triggered by generating a PDF on a basic catalog!

nikitawootten-nist commented 1 year ago

@wendellpiez is this ready to merge now?