Responsive WebHelp - <properties> Table Outputs Incorrectly
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 3
- Joined: Thu Oct 18, 2018 11:41 pm
Responsive WebHelp - <properties> Table Outputs Incorrectly
Post by ohne_hosen »
I have several two-column <properties> tables set up like this:
However, when I output Responsive WebHelp, it seems to force the table to be three columns, with "Value" and "Description" heading the first and second columns, then in the rows below, the cell is empty and the content is in the second and third column (see image linked below). I should note that this is ASP output but I'm not sure that should make a difference.
Image link: https://imgur.com/a/ROVvteS
I have tried using the <prophead> element with <propvaluehd> and <propdeschd> elements at the head of the table, but I still get the bad table.
When I output CHM, I get a two-column table as intended, with the automatic "Value" and "Description" headers over the correct content.
I would rather not change all of these tables to CALS to get them to format correctly; is this a bug or am I doing something wrong?
Code: Select all
<properties>
<property>
<propvalue>Foo</propvalue>
<propdesc>Foo</propdesc>
</property>
<property>
<propvalue>Foo</propvalue>
<propdesc>Foo</propdesc>
</property>
</properties>
However, when I output Responsive WebHelp, it seems to force the table to be three columns, with "Value" and "Description" heading the first and second columns, then in the rows below, the cell is empty and the content is in the second and third column (see image linked below). I should note that this is ASP output but I'm not sure that should make a difference.
Image link: https://imgur.com/a/ROVvteS
I have tried using the <prophead> element with <propvaluehd> and <propdeschd> elements at the head of the table, but I still get the bad table.
When I output CHM, I get a two-column table as intended, with the automatic "Value" and "Description" headers over the correct content.
I would rather not change all of these tables to CALS to get them to format correctly; is this a bug or am I doing something wrong?
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Responsive WebHelp - <properties> Table Outputs Incorrectly
Hi,
I tested your samples and indeed there seems to be some inconsistency in the way in which the publishing engine treats properties tables, I added an issue for it:
https://github.com/dita-ot/dita-ot/issues/3113
Thing is that probably most people using properties tables use them with 3 columns "proptype", "propvalue" and "propdesc":
https://www.oxygenxml.com/dita/1.3/spec ... rties.html
but indeed the "proptype" looks like an optional table cell so when not specified the table should show only two columns instead of three.
If you do not want to use the "proptype" element in your properties tables, as workarounds you could either convert the properties tables to simple tables or I could try to look in the XSLTs which generate the properties table for the HTML output and give you a proposed fix.
Regards,
Radu
I tested your samples and indeed there seems to be some inconsistency in the way in which the publishing engine treats properties tables, I added an issue for it:
https://github.com/dita-ot/dita-ot/issues/3113
Thing is that probably most people using properties tables use them with 3 columns "proptype", "propvalue" and "propdesc":
https://www.oxygenxml.com/dita/1.3/spec ... rties.html
but indeed the "proptype" looks like an optional table cell so when not specified the table should show only two columns instead of three.
If you do not want to use the "proptype" element in your properties tables, as workarounds you could either convert the properties tables to simple tables or I could try to look in the XSLTs which generate the properties table for the HTML output and give you a proposed fix.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Thu Oct 18, 2018 11:41 pm
Re: Responsive WebHelp - <properties> Table Outputs Incorrectly
Post by ohne_hosen »
Hi Radu,
I have over 200 of these tables; if you have a proposed fix I would be grateful. Otherwise, converting them is probably the best option. I am using Oxygen 20.1 build 2018061313 with DITA-OT 2.x.
I have over 200 of these tables; if you have a proposed fix I would be grateful. Otherwise, converting them is probably the best option. I am using Oxygen 20.1 build 2018061313 with DITA-OT 2.x.
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Responsive WebHelp - <properties> Table Outputs Incorrectly
Hi,
In the XSLT stylesheet OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\plugins\org.dita.html5\xsl\properties.xsl there is an XSLT template:
on which you could comment out the xsl:otherwise:
and in the XSLT template OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\plugins\org.dita.html5\xsl\reference.xsl comment out the XSLT template:
This should be done by implementing a DITA OT plugin as opposed to modifying directly the XSLT stylesheets.
Or you could convert all the property tables to simple tables using a custom XML refactoring action based on XSLT and applying it on all your files:
https://www.oxygenxml.com/doc/versions/ ... tions.html
Regards,
Radu
In the XSLT stylesheet OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\plugins\org.dita.html5\xsl\properties.xsl there is an XSLT template:
Code: Select all
<xsl:template match="*[contains(@class, ' reference/property ')]">
Code: Select all
<xsl:otherwise>
<xsl:apply-templates select="$empty-property/*[contains(@class, $class)]">
<xsl:with-param name="ctx" select="$property" as="element()" tunnel="yes"/>
</xsl:apply-templates>
</xsl:otherwise>
Code: Select all
<xsl:template match="*[contains(@class,' reference/properties ')]" mode="dita2html:get-max-entry-count" as="xs:integer">
<xsl:sequence select="3"/>
</xsl:template>
Or you could convert all the property tables to simple tables using a custom XML refactoring action based on XSLT and applying it on all your files:
https://www.oxygenxml.com/doc/versions/ ... tions.html
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