Skip to main content
November 3, 2022
Question

Export autonumbering in XML

  • November 3, 2022
  • 1 reply
  • 475 views

Hi,

I know that this specific question has been considered irrelevant in this community, but my client demands that the exported XML file explicitly contains the numbers generated automatically by FrameMaker.

The source file is a structured document with several paragraph labels with autonumbering. We cannot easily regenerate the numbering after the export because the autonumber rules are quite complicated (with a lot of resets and gaps in the numbering, so not that "automatic").

I have searched several developer guides and read about read/write rules, without success.

I assume that these numbers can be retrieved since it can be done when exporting to html (checking the box about autonumbering) or rtf formats.

What would be the read/write rule to get the autonumber of an element 'NUME' with a paragraph style having autonumbering ?

 

Thank you in advance for your time and effort.

    This topic has been closed for replies.

    1 reply

    Legend
    November 4, 2022

    Hi, I think your first sentence really summarizes the dilemma... that paragraph numbering is considered a rendering artifact and not an integral part of the content or the metadata. I will not say this with 100% certainty because I am too scared, but I am 99% sure that there is no solution with read/write rules or other non-programmatic means.

     

    I'm basically sure that the only solution is with custom code. A read/write API client could do this, but API clients are complicated in general and read/write clients are probably the most complicated.

     

    An ExtendScript could temporarily transfer the autonumber text to the regular paragraph content before the save action and then automatically delete it afterwards. This would not be a practical solution if you needed the numbers with every single save, but if you only needed them for a final export before transfer to a third party, it might be the simplest option.

     

    ExtendScript is not trivial, but neither is it rocket science. I'm curious to know if an infrequent scripting maneuver like this would work or if you need it on a per-save basis.

     

    Russ

    Participant
    November 14, 2022

    Thanks a lot for your answer, this will save me a lot of time looking for a simple solution.

    Indeed, I just need the maneuver for one final export to my client. I will dig right away into ExtendScipt to see how to achieve this, but if you already have some clue or link, well don't hesitate !

     

    frameexpert
    Community Expert
    Community Expert
    November 14, 2022

    If you want to meet about this and show me details via a web meeting, I can help you determine the scope of either an XSLT or ExtendScript solution. rick at frameexpert dot com