• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Export autonumbering in XML

Guest
Nov 03, 2022 Nov 03, 2022

Copy link to clipboard

Copied

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.

Views

307

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Nov 04, 2022 Nov 04, 2022

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2022 Nov 14, 2022

Copy link to clipboard

Copied

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 !

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2022 Nov 14, 2022

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Nov 15, 2022 Nov 15, 2022

Copy link to clipboard

Copied

LATEST

XSLT is an interesting idea. If it is possible and you have the knowledge, it might be the cleanest path. But you mention that your autonumbering is complex, so I don't know if it is a reasonable solution. You would have to rebuild any logic that FM is already doing. In any case, I'd be interested to know what you come up with.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2022 Nov 14, 2022

Copy link to clipboard

Copied

I would think Russ and a few others here could help you with an XSLT that would transform your list items into paragraphs with numbers (which are actually formatting, in this situation...) transformed into content that exists in a para element.

-Matt Sullivan
FrameMaker Course Creator, Author, Trainer, Consultant

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines