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

Creating Hypertext links from XML input

Community Beginner ,
Oct 10, 2023 Oct 10, 2023

Copy link to clipboard

Copied

I am trying to create a document from XML input, and have successfully converted graphics and cross references from XML into associated elements in a structured FrameMaker document. My next challenge are hyperlinks. I understand that I will need read/write rules, and currently have:

element "Hypertext"{
	is fm marker element 
}

 I suspect I need to define certain attributes or something else so that I can actually bring in the text and the link itself from XML, but I am currently unsure how to do that. I looked over the Developer Reference and Guide, but they weren't specific enough and I don't know how to find the attributes or properties associated with different FM concepts like markers. 

 

I have a Hypertext marker element and container as mentioned in https://community.adobe.com/t5/framemaker-discussions/hypertext-element/m-p/12030554#M70684, and can successfully manually create a hyperlink, but I am looking to be able to format my XML using an XSLT in such a way that the information can be read in and the hyperlinks created through the import process.

TOPICS
Structured , XML author

Views

197

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

Mentor , Oct 11, 2023 Oct 11, 2023

Hi, I have this in my structured app and I think it is all you need:

 

 

element "hypertext_marker" 
{
  is fm marker element;
  attribute "text" is fm property marker text;
  attribute "type" is fm property marker type;
}

 

The marker text and type are directly what you would see in the FM UI. In XML, the element would be empty. Hope this helps.

 

Of course, you can pick whatever element and attribute names you want.

 

Russ

Votes

Translate

Translate
Community Expert ,
Oct 10, 2023 Oct 10, 2023

Copy link to clipboard

Copied

I'm out and about right now, bu you likely need to set the marker type within the read write rules.

-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
Mentor ,
Oct 11, 2023 Oct 11, 2023

Copy link to clipboard

Copied

Hi, I have this in my structured app and I think it is all you need:

 

 

element "hypertext_marker" 
{
  is fm marker element;
  attribute "text" is fm property marker text;
  attribute "type" is fm property marker type;
}

 

The marker text and type are directly what you would see in the FM UI. In XML, the element would be empty. Hope this helps.

 

Of course, you can pick whatever element and attribute names you want.

 

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
Community Expert ,
Oct 11, 2023 Oct 11, 2023

Copy link to clipboard

Copied

LATEST

I have used Russ's read/write syntax and it is correct. Since you are using XSLT, you can also use a processing instruction to create markers on import to FrameMaker. I used this approach because I didn't want an extra element in the structure and we weren't exporting XML out of FrameMaker. Here is an example XSLT snippet:

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