dita-community/org.dita-community.split-page-sequences

plugin doesn't recognize outputclass="page-sequence-start_glossary-sequence"

SSAGitHub opened this issue · 5 comments

I've traced some of the plugin code and this is where I'm finding a problem...

  • the plugin contains an override topic.xsl
  • within topic.xsl function sps:getPageSequenceData(.) is being called on line 28
  • the topic element is being passed into sps:getPageSequenceData(.) instead of the map; therefore, the outputclass values containing "page-sequence-start_" and "page-sequence-end_" are never being found.

From the DITA-OT transform log...

 [echo] *****************************************************************
 [echo] * basedir = C:\Users\sashmead\workspace\dometic-docs\Workshop Equipment\Air Con Service Units\OPM ASC\topics\en-US
 [echo] * dita.dir = C:\Users\sashmead\AppData\Roaming\Dometic\DITA\dita-ot
 [echo] * transtype = pdf2
 [echo] * tempdir = C:\Users\sashmead\workspace\dometic-docs\Workshop Equipment\Air Con Service Units\OPM ASC\topics\en-US/temp/topic-pdf/oxygen_dita_temp
 [echo] * outputdir = C:\Users\sashmead\workspace\dometic-docs\Workshop Equipment\Air Con Service Units\OPM ASC\topics\en-US/out/topic-pdf
 [echo] * clean.temp = true
 [echo] * DITA-OT version = 3.6.0
 [echo] * XML parser = Xerces
 [echo] * XSLT processor = Saxon
 [echo] * collator = ICU
 [echo] *****************************************************************

This is a partial view of the map...

<topicref href="CON_TargetGroupASC.dita" keys="CON_TargetGroupASC"
    />
<topicref href="CON_Hotline.dita" keys="CON_Hotline"/>
<topicref href="CON_ExplanationOfSymbols.dita" keys="CON_ExplanationOfSymbols"/>
<topicref href="CON_SafetyInstructionsOPMASC.dita" keys="CON_SafetyInstructionsOPMASC" **outputclass="page-sequence-start_glossary-sequence">**
    <topicref href="CON_SafetyOperatingTheDeviceSafely.dita"
        keys="CON_SafetyOperatingTheDeviceSafely"/>
    <topicref href="CON_SafetyHandlingRefrigerantSafely.dita"
        keys="CON_SafetyHandlingRefrigerantSafely"/>
    <topicref href="CON_SafetyMeasuresByOperator.dita" keys="CON_SafetyMeasuresByOperator"/>
</topicref>
<topicref href="CON_ScopeOfDeliveryASC6300GLEASC6400GLE.dita" keys="CON_ScopeOfDeliveryASC6300GLEASC6400GLE"/>
<topicref href="CON_Accessories.dita" keys="CON_Accessories" **outputclass="page-sequence-end_glossary-sequence"**/>
<topicref href="CON_IntendedUse.dita" keys="CON_IntendedUse"/>
<topicref href="CON_TechnicalDescription.dita" keys="CON_TechnicalDescription">

Immediate issue is that the page-sequence-determining process is not applied to chapter-level topics.

If I create test case that has topics within a chapter where a topicref specifies @outputclass then it is applied as expected.

So the fix is to extend the chapter-level topic handling to also set up the page sequence associations there.

This is a bit more involved but I will pursue it.

Actually, thinking about it more: there is no need to handle splitting the page sequence on chapter-level topics because there is already an extension mechanism in the PDF2 transform setting those page sequences.

The split-page-sequences processing is intended only for splitting page sequences that are already established at a higher level, i.e., topics within a chapter or figures or tables within a topic.

So I don't think this is actually a bug.

Thanks Eliot,
I'm able to see that the map below will allow me to switch to the "glossary" page-sequence-master. Basically I just moved the outputclass down to a lower element.

Can you give me any pointers for using this code for a transtype other than pdf2? Thank you!

<topicref href="CON_Hotline.dita" keys="CON_Hotline"/>
<topicref href="CON_ExplanationOfSymbols.dita" keys="CON_ExplanationOfSymbols"/>
<topicref href="CON_SafetyInstructionsOPMASC.dita" keys="CON_SafetyInstructionsOPMASC">
    <topicref href="CON_SafetyOperatingTheDeviceSafely.dita"
        keys="CON_SafetyOperatingTheDeviceSafely" **outputclass="page-sequence-start_glossary-sequence"/**>
    <topicref href="CON_SafetyHandlingRefrigerantSafely.dita"
        keys="CON_SafetyHandlingRefrigerantSafely"/>
    <topicref href="CON_SafetyMeasuresByOperator.dita" keys="CON_SafetyMeasuresByOperator" **outputclass="page-sequence-end_glossary-sequence"**/>
</topicref>
<topicref href="CON_ScopeOfDeliveryASC6300GLEASC6400GLE.dita" keys="CON_ScopeOfDeliveryASC6300GLEASC6400GLE"/>

Closing this as "not a bug".

I also added a note to the README to make the intent of the plug-in clearer.