Allow profiling attributes to pass through to HTML.

Arghyle
Posts: 5
Joined: Mon Mar 31, 2014 1:19 am

Allow profiling attributes to pass through to HTML.

Post by Arghyle » Mon Mar 31, 2014 1:37 am

Hi there - I have what is hopefully a quick question.

Using XML Editor 15.2, DITA-OT w/ WebHelp plugin.

I need to allow the profiling attributes on various content to pass through all the way to final resulting HTML. I plan on (for now at least) simply modifying the existing XSL to pass the values through. I've been digging though the stylesheets for a while now, but can't pin down where I'd need to make the necessary change to inject those attributes into the output. Since there are a ton of XSLs, with a lot of lines of code, I'm hoping someone can help me determine exactly which one(s) I'd need to modify.

Thanks!

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Allow profiling attributes to pass through to HTML.

Post by sorin_ristache » Mon Mar 31, 2014 12:05 pm

Hi,

The DITA processing model only applies the profiling attributes in the transformation for filtering the topic content and these attributes do not show up in the final HTML output because they have no use in the HTML output. Keeping them in the temporary transformed files up to the final HTML files would require to modify this model. Can you give more details about the final intended use of the profiling attributes that would be passed up to the HTML files? Maybe the same thing can be done with some outputclass attributes?


Regards,
Sorin

Arghyle
Posts: 5
Joined: Mon Mar 31, 2014 1:19 am

Re: Allow profiling attributes to pass through to HTML.

Post by Arghyle » Mon Mar 31, 2014 6:24 pm

Hey Sorin - thanks for the reply.

Without going into too much detail, we have implemented an STS solution. WebHelp will be available via links in our applications, but we're talking about WebHelp for an entire line of products. One of the business requirements is that we don't show the help to individuals who do not have the proper roles for specific lines-of-business.

So, we're hosting WebHelp and need to be able to hide/show specific topics/content based on what rights the logged-in user has available. Right now, I'd like to key off of the 'product' attribute (at least as a starting point) to be able to achieve that.

Thanks!

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Allow profiling attributes to pass through to HTML.

Post by sorin_ristache » Tue Apr 01, 2014 11:55 am

It is not possible to keep in the HTML output both the entire content and the profiling attribute. Either you don't apply filtering based on the profiling attribute and you get the entire content in the HTML output pages, or you apply filtering and you get only the content for one value of the profiling attribute.

I suggest creating one Webhelp output set for each value of the profiling attribute (or each combination of values of profiling attributes, if you need to use more than one profiling attribute), hosting all Webhelp sets on the server and redirecting each user to the appropriate Webhelp set for his/her credentials. I understand that each user has to login to the server before he can view the Webhelp pages.


Regards,
Sorin

Arghyle
Posts: 5
Joined: Mon Mar 31, 2014 1:19 am

Re: Allow profiling attributes to pass through to HTML.

Post by Arghyle » Tue Apr 01, 2014 8:34 pm

Hey again Sorin -

I know very little about Oxygen's transformation process. But it sounds like you're saying that it is possible to include the profiling attributes if I don't apply filtering?

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Allow profiling attributes to pass through to HTML.

Post by sorin_ristache » Wed Apr 02, 2014 9:20 am

Hi,

Sorry, it is not possible to include the profiling attributes in the output XHTML pages (or in the PDF output, in case of the DITA PDF transformation, or in the Windows Help output, in case of the DITA Windows Help transformation etc.). If you don't apply the profiling you just get the entire (unfiltered) content in the output.

The profiling attributes make sense only in the DITA XML source files and they provide filtering instructions to the DITA processor. It is a DITA issue, not an Oxygen transformation one.


Regards,
Sorin

dagoss
Posts: 24
Joined: Fri Apr 05, 2013 11:01 pm

Re: Allow profiling attributes to pass through to HTML.

Post by dagoss » Thu Mar 05, 2015 11:00 pm

I know this question is a year old, but I do have a question about this.

According to the DITA 1.2 standard, a user should be able to use the action="passthrough" attribute in a ditaval file to filter the content in *and* keep the attribute value. For example:

Code: Select all


<val>
<prop action="passthrough" att="audience" val="management"/>
</val>
The way I'm reading the standard, I would expect this to end up as a CSS class in the output. So given:

Code: Select all


<note audience="management">Hello, World</note>
I would expect to get something like this in the xhtml output:

Code: Select all


<div class="note management">
<p>Hello, World</p>
</div>
So this sounds like a feature the DITA-OT and Oxygen should support. Am I miss-understanding the standard (or the TC's question)?

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Allow profiling attributes to pass through to HTML.

Post by sorin_ristache » Fri Mar 06, 2015 11:26 am

dagoss wrote:According to the DITA 1.2 standard, a user should be able to use the action="passthrough" attribute in a ditaval file to filter the content in *and* keep the attribute value.
dagoss wrote:So this sounds like a feature the DITA-OT and Oxygen should support. Am I miss-understanding the standard (or the TC's question)?
That is true about the DITA spec, however Oxygen includes an implementation of that spec (the DITA-OT toolkit) that does not implement yet (even in its 2.0 incarnation) that particular bit of the DITA spec. So neither 1.8.x versions nor 2.0.x versions of the DITA-OT toolkit implement the passthrough value for the action attribute. This value is simply ignored by DITA-OT processing at this time.

Some work was started in this direction last year in the DITA-OT project but nothing usable is available yet.
Regards,
Sorin

<oXygen/> XML Editor Support

dagoss
Posts: 24
Joined: Fri Apr 05, 2013 11:01 pm

Re: Allow profiling attributes to pass through to HTML.

Post by dagoss » Mon Mar 09, 2015 3:01 pm

Thanks Sorin. I figured that was the case.

Looking at that issue though, this actually was implemented (to an extent...) in the DITA-OT2.0. I just tried this out, and the html5 transformation will indeed pass the attribute through (to data-audience="[val]").

I think the current webhelp is based on the xhtml plugin, so I would imagine it would take a bit of work to get it integrated into a newer OT and pointing towards the html5 instead.

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Allow profiling attributes to pass through to HTML.

Post by sorin_ristache » Mon Mar 09, 2015 5:02 pm

dagoss wrote:Looking at that issue though, this actually was implemented (to an extent...) in the DITA-OT2.0. I just tried this out, and the html5 transformation will indeed pass the attribute through (to data-audience="[val]").

I think the current webhelp is based on the xhtml plugin, so I would imagine it would take a bit of work to get it integrated into a newer OT and pointing towards the html5 instead.
That is correct. We are working on this integration, we will probably have the WebHelp transformation working with DITA-OT 2.0 in the next version of Oxygen, which we will release in this first half of 2015.
Regards,
Sorin

<oXygen/> XML Editor Support

Radu
Posts: 7593
Joined: Fri Jul 09, 2004 5:18 pm

Re: Allow profiling attributes to pass through to HTML.

Post by Radu » Tue May 19, 2015 10:29 am

Hi,

Just to update this thread, Oxygen 17 still comes with DITA OT 1.8 but it has support for publishing with DITA OT 2.0 which can be downloaded separately.
Also the Oxygen WebHelp plugin can be installed in DITA Open Toolkit 2.0 and when publishing to WebHelp using DITA OT 2.0 that passthrough setting in the DITAVAL should pass profiling attributes (as data- HTML attributes) and their values to the output HTML files.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

ldube
Posts: 6
Joined: Tue Aug 03, 2021 7:46 pm

Re: Allow profiling attributes to pass through to HTML.

Post by ldube » Wed Aug 04, 2021 8:08 pm

Is this included in version oxygenxml 21.1 ?

Radu
Posts: 7593
Joined: Fri Jul 09, 2004 5:18 pm

Re: Allow profiling attributes to pass through to HTML.

Post by Radu » Thu Aug 05, 2021 7:44 am

Hi,

It should but you can test this on your side. I will assume you are using for publishing the DITA Open Toolkit bundled with Oxygen.
And this should work for WebHelp and HTML5 output, not for XHTML output.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

ldube
Posts: 6
Joined: Tue Aug 03, 2021 7:46 pm

Re: Allow profiling attributes to pass through to HTML.

Post by ldube » Thu Aug 05, 2021 5:01 pm

Yep it works, at the time of my last post, I was using CHM format which it doesn't work into. Not an issue for us though.

Post Reply