Highlighted

Display a custom text instead of content of structured elements

Community Beginner ,
Mar 31, 2016

Copy link to clipboard

Copied

Hello,

I was trying to find if there is a way to display in structured framemaker/exported pdf a custom text instead of the content inside an element or a group of elements.

For example, lets say I have defined  the following elements (which correspond to the following xml tags):

<material>

     <material_code>F14</material_code>

     <material_name>Methanol</material_name>

     <supplier_cage_code>08FU8</supplier_cage_code>

     <supplier_name>Hawker Beechcraft</supplier_name>

</material>



By default this displays as: F14Methanol08FU8Hawker Beechcraft


I would like to know if there is a way to define that instead of the whole content inside the <material></material> element Framemaker would display a custom message, like: Methanol (F14)

I have been searching for hours, but I don't know what to search exactly. Can anyone point me in the right direction?


   

TOPICS
Structured

Views

211

Likes

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

Display a custom text instead of content of structured elements

Community Beginner ,
Mar 31, 2016

Copy link to clipboard

Copied

Hello,

I was trying to find if there is a way to display in structured framemaker/exported pdf a custom text instead of the content inside an element or a group of elements.

For example, lets say I have defined  the following elements (which correspond to the following xml tags):

<material>

     <material_code>F14</material_code>

     <material_name>Methanol</material_name>

     <supplier_cage_code>08FU8</supplier_cage_code>

     <supplier_name>Hawker Beechcraft</supplier_name>

</material>



By default this displays as: F14Methanol08FU8Hawker Beechcraft


I would like to know if there is a way to define that instead of the whole content inside the <material></material> element Framemaker would display a custom message, like: Methanol (F14)

I have been searching for hours, but I don't know what to search exactly. Can anyone point me in the right direction?


   

TOPICS
Structured

Views

212

Likes

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
Mar 31, 2016 0
Explorer ,
Mar 31, 2016

Copy link to clipboard

Copied

What you're asking to do is effectively what a conref does in DITA.  FrameMaker implements conrefs as text insets -- whatever your XML is, it actually fetches the referenced XML (using DITA id syntax) and replaces your element with that fetched content - as an inset in FrameMaker.  I don't know if you can make a read/write rule to map a given element/attr val to a specific text inset.  That might be more than r/w rules can do.

I also use conrefs in a "magic" way -- I use a "magic" prefix in the reference that says...  "Instead of fetching a referenced xml snippet, execute a named javascript function".  I do this when I transform my XML to HTML.  Now...  I'm considering the same thing for my Maker files, where I run an ExtendScript over my structured document, and for each "magic" conref I execute the specified ExtendScript function to modify that particular element. 

You could do something similar in your XML -- modify the DTD (or however you declare it) to include a magic attribute that indicates a function call.  Then implement an ExtendScript post-processor for Maker that scans the document for these attributes and does the deed.

Hope this helps...         cud

Likes

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
Reply
Loading...
Mar 31, 2016 1
Adobe Community Professional ,
Mar 31, 2016

Copy link to clipboard

Copied

You might have more luck over in the Structured FM forum than here in unstructured land ;>)

Likes

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
Reply
Loading...
Mar 31, 2016 0
Mentor ,
Mar 31, 2016

Copy link to clipboard

Copied

mihail-cosminm61564092,


You will certainly need to customize the product and/or process, as Chris (cud) is suggesting. There is no simple way to change the arrangement of data in the general interface. Regarding customization, there are many ways to approach this, none of them necessarily easy, but possibilities do exist. Things that come to mind are:


- ExtendScript or FDK processing that builds a new document, based on a prescribed logic like the one you presented.

- If your source resides in XML, an XSLT stylesheet applied upon import might be able to do it. This might be the least costly approach if it is feasible. XSLT could accomplish the example you presented.

- Use a plugin such as FrameSLT to rearrange data within the FM interface (disclaimer, this is my plugin, FrameSLT - West Street Consulting).

Just some ideas. It is certainly no surprise that you can't find anything readily with a basic search, because operations like this are always very specific in nature, tailored to a specific need.

Russ

Likes

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
Reply
Loading...
Mar 31, 2016 1