AntennaHouse / pdf5-ml

Antenna House PDF5-ML DITA-OT Plug-in
23 stars 9 forks source link

Fatal error when publishing topic fig @frame #194

Closed steinbacher01 closed 3 years ago

steinbacher01 commented 3 years ago

When publishing a topic that has <fig frame=""> the pub fails.

     [xslt] Failed to process C:\Users\502704~1\AppData\Local\Temp\temp20201223092211315\bm_CorometricsUserManual_CONVERTED.xml
Error: The following error occurred while executing this line:
C:\dita-ot-3.4.1\plugins\com.antennahouse.pdf5.ml\build.xml:210: The following error occurred while executing this line:
C:\dita-ot-3.4.1\plugins\com.antennahouse.pdf5.ml\build_transform.xml:41: The following error occurred while executing this line:
C:\dita-ot-3.4.1\plugins\com.antennahouse.pdf5.ml\build_transform.xml:76: The following error occurred while executing this line:
C:\dita-ot-3.4.1\plugins\com.antennahouse.pdf5.ml\build_transform.xml:89: The following error occurred while executing this line:
C:\dita-ot-3.4.1\plugins\com.antennahouse.pdf5.ml\build_transform.xml:101: Fatal error during transformation using C:\dita-ot-3.4.1\plugins\com.ge.pdf5.ml\xsl\dita2fo_shell.xsl: A sequence of more than one item is not allowed as the value of variable $originStartIndent (@start-indent="inherited-property-value(start-indent)", @start-indent="inherited-property-value(start-indent)") ; SystemID: file:/C:/dita-ot-3.4.1/plugins/com.antennahouse.pdf5.ml/xsl/dita2fo_attribute.xsl; Line#: 476

I tried a few different values for @frame and I get the same error.

Is there a way to fix this, or does PDF5.ml not support fig @frame?

Thanks,

Leroy Steinbacher

steinbacher01 commented 3 years ago

Actually, I think this issue is in our custom ge-pdf5-ml plugin. I published to the base pdf5.ml and it works as expected.

steinbacher01 commented 3 years ago

Update: This error was the result of a duplicate attribute setting in a translation config style file.

Our Chinese (zh-TW_style.xml) style file had this attribute set for atsFig.

        <!-- fig -->
        <attribute-set name="atsFig">
            <attribute name="space-before">$Para_Space_Before</attribute>
            <attribute name="start-indent">inherited-property-value(start-indent)</attribute>
            <attribute name="keep-with-previous.within-page">7</attribute>
        </attribute-set>

The defualt_style.xml file also called the same attribute name for atsFig.

            <!-- fig -->
            <attribute-set name="atsFig">
                <attribute name="space-before">$Para_Space_Before</attribute>
                <attribute name="start-indent">inherited-property-value(start-indent)</attribute>
            </attribute-set>

It seems that start-indent value is cummulative if defined twice, resulting in the fatal error.

ToshihikoMakita commented 3 years ago

The same attribute will be merged when the result of getAttributeset is written to output XSL-FO. If you get start-indent attribute directly from the result of getAttributeset, the variable may contain multiple start-indent attributes. The last one will be the effective value.

steinbacher01 commented 3 years ago

Thank you for the additional information.