Crossreferencing snippets - Content traceability

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
Koba
Jr. Propeller Head
Posts: 2
Joined: Tue Jan 31, 2023 7:25 am
Location: France

Crossreferencing snippets - Content traceability

Post by Koba »

Hello,

For traceability purposes I want to output a list showing where the snippets are used in my main output (a pdf user guide).
Not in which topic they are used (I know about the "View links" option), but in which sections and pages of my user guide.

This is why I am thinking about having crossrefs, with a style that embeds the nearest heading and page number.
But crossreferencing a snippet is not possible via the "Insert Cross-Reference" pop-up and inserting a manual crossref does not allow to display any info.
Same for crossref to a bookmark inside a snippet, the crossref has to be inserted manually.
Having a bookmark above the snippets could work but it would be an additional step after the insertion of the snippet and therefore a step prone to errors and omissions.
I also thought about an auto-index, using the text of my snippets as index entries. This would work but that would also be very manual and would require a lot of effort to maintain.


Do you see a clean way to crossreference snippets ? The alternative methods I've tried all have their own drawbacks.
Have someone encountered this kind of problematic?

Thank you :D
robdocsmith
Sr. Propeller Head
Posts: 247
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Crossreferencing snippets - Content traceability

Post by robdocsmith »

Just wondering if you could do it with a List-of proxy?

If each snippet was identified in a particular paragraph or SPAN class that had no style modifications to it, you could then add a Proxy that looked for the particular SPAN class. But you'd need to add an identifying style each time you added a snippet.
Create a style like

Code: Select all

span.snippets {
}
Search in code for '<MadCap:snippetBlock' and replace with '<span class="snippets"><MadCap:snippetBlock'
Search in code for '.flsnp" />' and replace with '.flsnp" /></span>'
Then insert a List of proxy on a page and select the SPAN element and snippets class.
Any future snippet adds would have to have the same class applied to it.
doloremipsum
Sr. Propeller Head
Posts: 290
Joined: Mon Aug 26, 2019 2:11 pm

Re: Crossreferencing snippets - Content traceability

Post by doloremipsum »

@Rob I don't think it's a good idea to wrap snippetBlock in a span - then you're trying to nest a block element inside an inline element and things get weird.

Could you use a div.snippet for your snippetBlocks and span.snippet for snippetTexts?
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
robdocsmith
Sr. Propeller Head
Posts: 247
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Crossreferencing snippets - Content traceability

Post by robdocsmith »

Ha too true. In my hasty example I'd grabbed code for a block not an inline snippet. Yes, if going this route, you'd have to use a div for a block and a span for an inline snippet. In which case you can just use the .snippets {} item in your style sheet and it would work to identify both types of snippet.
Koba
Jr. Propeller Head
Posts: 2
Joined: Tue Jan 31, 2023 7:25 am
Location: France

Re: Crossreferencing snippets - Content traceability

Post by Koba »

Thank you for answering me !

I wasn't aware of the existence of the proxy feature in madcap, so I've been reading and testing it out to understand how it works.
In my case the snippets are inserted as snippet blocks, I've created a specific div style to insert my snippets in because standard divs are already used in our Flare project.
The listOf proxy seems to work fine (on a small scale test for now) and that a huge step, thank you so much !!!

Now I'm trying to play with listOf proxy and <p> styles so that is better meets my needs.
I would like to display not only the page number but also the nearest header, or maybe having all the headers in the list along with the snippets ?
I'm thinking putting my headers in divs also, because I can't find a style parameter that allows something like that.

It's my first time posting on this forum and seing answers to my question made me so happy, thank you so much !!
Post Reply