DocBook -> ePub with programlisting@width
DocBook -> ePub with programlisting@width
I have a set of valid DocBook 5 documents that use the programlisting element with the width attribute set. When I generate an ePub 2 document, it doesn't validate, because the transformation keeps that width attribute when transforming the programlisting element to a pre element, and the attribute width is not allowed on the HTML pre element.
I tried running the various DocBook HTML transformations on the same document and they all correctly deleted the width attribute in the transformation, so I'm not sure where the problem is. I have oXygen 15.2.
Any help would be welcome; I could delete the attribute from the source if I need to, but I'd rather get rid of it in the transformation step and keep the source the way it is.
thanks,
Lauren
I tried running the various DocBook HTML transformations on the same document and they all correctly deleted the width attribute in the transformation, so I'm not sure where the problem is. I have oXygen 15.2.
Any help would be welcome; I could delete the attribute from the source if I need to, but I'd rather get rid of it in the transformation step and keep the source the way it is.
thanks,
Lauren
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: DocBook -> ePub with programlisting@width
Post by sorin_ristache »
Hello,
The pre/@width attribute is also present in the output of both the DocBook HTML transformation and the DocBook XHTML one.
You need to modify an XSLT stylesheet for suppressing the width attribute in the output. Please comment out the code:
in the file [Oxygen-install-dir]\frameworks\docbook\xsl\xhtml\verbatim.xsl.
The alternative is removing the width attribute from the XML source file, which you already discovered.
Regards,
Sorin
The pre/@width attribute is also present in the output of both the DocBook HTML transformation and the DocBook XHTML one.
You need to modify an XSLT stylesheet for suppressing the width attribute in the output. Please comment out the code:
Code: Select all
<xsl:if test="@width != ''">
<xsl:attribute name="width">
<xsl:value-of select="@width"/>
</xsl:attribute>
</xsl:if>
The alternative is removing the width attribute from the XML source file, which you already discovered.
Regards,
Sorin
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