Non-filtering and passing attribute values
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 118
- Joined: Mon Apr 19, 2010 5:33 pm
Non-filtering and passing attribute values
Hello,
I have a need to generate an HTML output that does not filter content during the transform and also passes all attribute values through to the resulting WebHelp. The first part is easy enough; just by not applying a profile during transformation. But is there any way to retain (pass through) all attribute values so that they are viewable in the HTML output?
ex. A concept topic with a para that contains a platform value of server should show an output of
Is this possible in oXygen?
I have a need to generate an HTML output that does not filter content during the transform and also passes all attribute values through to the resulting WebHelp. The first part is easy enough; just by not applying a profile during transformation. But is there any way to retain (pass through) all attribute values so that they are viewable in the HTML output?
ex. A concept topic with a para that contains a platform value of server should show an output of
Code: Select all
<p platform="server">
-
- Posts: 404
- Joined: Thu Aug 21, 2003 11:36 am
- Location: Craiova
- Contact:
Re: Non-filtering and passing attribute values
Post by radu_pisoi »
Hi,
Did you try to use the @action="passthrought" value in your DITAVAL?
In this case, the profiled DITA content will be included in output together with the profiling conditions. The profiling conditions can be found in the output in attributes with form data-profilingAttribute like in the following sample:
I think this feature is implemented in DITA-OT processor staring with version 2.x.
See more about values you can set in prop/@atction attribute in DITA specification https://www.oxygenxml.com/dita/1.3/spec ... -prop.html.
Did you try to use the @action="passthrought" value in your DITAVAL?
Code: Select all
<prop action="passthrough" att="platform"/>
Code: Select all
<p class="p" data-platform="server">Include the content in output, and preserve the attribute value as part of the ......</p>
See more about values you can set in prop/@atction attribute in DITA specification https://www.oxygenxml.com/dita/1.3/spec ... -prop.html.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 118
- Joined: Mon Apr 19, 2010 5:33 pm
Re: Non-filtering and passing attribute values
Perhaps I am missing something here. A little help please?
I now have the following para in a concept:
The ditaval contains:
The output P is:
And yes, the ditaval is being selected as the scenario filter. The nextgen value is not being passed through.
Any thoughts?
I now have the following para in a concept:
Code: Select all
<p id="v11776594" product="nextgen">NextGen Tools is a collection of applications and command line utilities supporting the authoring, testing, assembly, and generation of NextGen Content.</p>
Code: Select all
<val>
<prop action="passthrough" att="product" val="nextgen"/>
</val>
Code: Select all
<p class="p" id="AboutNextGenTools__v11776594">NextGen Tools is a collection of applications and command line utilities supporting the authoring, testing, assembly, and generation of NextGen Content.</p>
Any thoughts?
-
- Posts: 9440
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Non-filtering and passing attribute values
Hi,
DITA OT 2.x should have support for pass-through. If you generate output using our WebHelp transformation types, the corresponding profiling attributes should be passed to the HTML content.
If you publish using the "xhtml" transtype, it seems that the DITA OT developers took a decision not to pass to the HTML any "data-" attributes because they wanted the XHTML output to be valid XHTML transitional output which does not support "data-" attributes.
But if you publish using the DITA OT "html5" transtype, the profiling attribute should be passed as data- attributes to the HTML document.
Regards,
Radu
DITA OT 2.x should have support for pass-through. If you generate output using our WebHelp transformation types, the corresponding profiling attributes should be passed to the HTML content.
If you publish using the "xhtml" transtype, it seems that the DITA OT developers took a decision not to pass to the HTML any "data-" attributes because they wanted the XHTML output to be valid XHTML transitional output which does not support "data-" attributes.
But if you publish using the DITA OT "html5" transtype, the profiling attribute should be passed as data- attributes to the HTML document.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9440
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Non-filtering and passing attribute values
Hi,
First in the Oxygen Preferences->DITA page you need to make sure DITA OT 2.x is used.
Then open the DITA Map in the DITA Maps Manager, use the Configure Transformation Scenarios toolbar button, create a new scenario of type DITA OT and you will be able to choose among a number of transformation types and you can select HTML5.
Regards,
Radu
First in the Oxygen Preferences->DITA page you need to make sure DITA OT 2.x is used.
Then open the DITA Map in the DITA Maps Manager, use the Configure Transformation Scenarios toolbar button, create a new scenario of type DITA OT and you will be able to choose among a number of transformation types and you can select HTML5.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 118
- Joined: Mon Apr 19, 2010 5:33 pm
Re: Non-filtering and passing attribute values
thanks for getting me this far.
I think I'll need a little more guidance through this. Here is what I have:
Here is the testing ditamap:
Here is the ditaval:
I created a new DITA-OT Transformation and selected HTML5 as the type.
The dita.dir parameter is set to:. And Preferences > DITA > DITA Open Toolkit is set to Built-in DITA-OT 2.x.
Here is the resulting HTML:
So I am obviously missing something as I would expect to find some class or attribute with "product1" and "product2".
Please advise
I think I'll need a little more guidance through this. Here is what I have:
Here is the testing ditamap:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<title>Profiling Test</title>
<topicref href="Profile1.xml" product="product1"/>
<topicref href="Profile2.xml" product="product2"/>
</map>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<val>
<prop action="passthrough" att="product" val="product1"/>
<prop action="passthrough" att="product" val="product2"/>
</val>
The dita.dir parameter is set to:
Code: Select all
${configured.ditaot.dir}
Here is the resulting HTML:
Code: Select all
<!DOCTYPE html SYSTEM "about:legacy-compat">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="copyright" content="(C) Copyright 2017">
<meta name="DC.rights.owner" content="(C) Copyright 2017">
<meta name="DC.Type" content="map">
<meta name="DC.Format" content="XHTML">
<link rel="stylesheet" type="text/css" href="commonltr.css">
<title>Profiling Test</title>
</head>
<body>
<h1 class="title topictitle1">Profiling Test</h1>
<nav>
<ul class="map">
<li class="topicref">
<a href="Profile1.html">Product 1</a>
</li>
<li class="topicref">
<a href="Profile2.html">Product 2</a>
</li>
</ul>
</nav>
</body>
</html>
Please advise
-
- Posts: 9440
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Non-filtering and passing attribute values
Hi,
Originally I tested propagating the profiling attribute value at sub-topic level (set the @product on a <p> element and publish, look in the generated HTML topic).
Indeed, now I tested with setting the profiling attribute on the topicref and it does not work, it is not preserved in the generated index.html.
We do not develop the HTML 5 plugin so I added a DITA OT issue for this:
https://github.com/dita-ot/dita-ot/issues/2598
Regards,
Radu
Originally I tested propagating the profiling attribute value at sub-topic level (set the @product on a <p> element and publish, look in the generated HTML topic).
Indeed, now I tested with setting the profiling attribute on the topicref and it does not work, it is not preserved in the generated index.html.
We do not develop the HTML 5 plugin so I added a DITA OT issue for this:
https://github.com/dita-ot/dita-ot/issues/2598
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 56
- Joined: Wed Aug 08, 2018 10:23 pm
Re: Non-filtering and passing attribute values
It seems as if the issue with passthrough attributes on topicrefs was mostly fixed but it appears that it's not fixed in the case that the topicref is a child and the @chunk attribute of the parent is set to to-content. In that case, the attribute is not propagated through to the html.
-
- Posts: 9440
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Non-filtering and passing attribute values
Hi,
Maybe you can put together a small sample DITA project and add an issue for this on the DITA OT issues list:
https://github.com/dita-ot/dita-ot/issues
An alternative might be to maybe avoid chunking and create a DITA topic which has conrefs to all the other topics.
Regards,
Radu
Maybe you can put together a small sample DITA project and add an issue for this on the DITA OT issues list:
https://github.com/dita-ot/dita-ot/issues
An alternative might be to maybe avoid chunking and create a DITA topic which has conrefs to all the other topics.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service