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

how to auto-generate unique IDs for attributes

Explorer ,
Mar 26, 2020 Mar 26, 2020

Copy link to clipboard

Copied

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

Views

1.6K

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

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.

Votes

Translate

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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?

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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?

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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.

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