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.
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
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.
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
Copy link to clipboard
Copied
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: