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

how to auto-generate unique IDs for attributes

Explorer ,
Mar 26, 2020 Mar 26, 2020

Hello,

I'm exploring FM further and meeting new misunderstandings.

I'm to make an XML according to predefined DTD from initially unstructured FM file.

I've built the EDD, convertion table, r/w rules, another dtd for "save as xml", structured application definition.

My xml file contains repeating elements (affiliation, citation, table, figure) which must have unique IDs. I need figures to have IDs "Fig1", "Fig2" etc., citation items - IDs "CR1", "CR2", etc. and these IDs are the attribute values for "internalRefs" elements that "frame" the references in text according to the number of referenced object (but they are not real cross-refs in the sense of FM but only a description of refs).

How can I do this?

I think it is about the help topic "auto-generating of unique IDs for attributes".

I defined the auto-generate rules (and unluckily only for one type of objects) but I failed to apply them.

I wrote the config .xml file but how does it work and when?

TOPICS
Feature request , Structured , XML author
1.9K
Translate
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

correct answers 1 Correct answer

Community Expert , Mar 26, 2020 Mar 26, 2020

I am not sure how this is supposed to work, but why don't you use XSLT to apply the ids on export. If you need help with this, contact me off list and we can have a meeting. Thanks.

Translate
Community Expert ,
Mar 26, 2020 Mar 26, 2020

After you create the config file, you can add it to your structured application. I haven't tested it, but that is how it is supposed to work.

 

image.png

Translate
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
Explorer ,
Mar 26, 2020 Mar 26, 2020

Thank you.

I've already done this but my transformation way (import element definitions -> structure current document -> modify the structured document as it does not transform as I need -> save as xml) stopped working. Enumeration didn't appeared and r/w rules didn't apply. Then I returned to documentation and read that it is an .ini config file that is to be added to structured application and it contains another parameters.

And the question remains: how can I use the required feature?

Translate
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 ,
Mar 26, 2020 Mar 26, 2020

The structured application will only be used on import or export of XML. It won't be used when you structure the current document.

Translate
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
Explorer ,
Mar 26, 2020 Mar 26, 2020

After the structured doc is created I export it to XML. I think the config.xml will be applied at this step but it doesn't. How can I use it?

Translate
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 ,
Mar 26, 2020 Mar 26, 2020

I am not sure how this is supposed to work, but why don't you use XSLT to apply the ids on export. If you need help with this, contact me off list and we can have a meeting. Thanks.

Translate
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
Explorer ,
Apr 05, 2020 Apr 05, 2020
LATEST

Thank you. After studying XSLT I've managed to write and after several consultations to link the working variant of xslt file to App.

Translate
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