Wrapping text in Tables
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 14
- Joined: Fri Nov 24, 2017 10:07 am
Wrapping text in Tables
Hi,
I have some text written in <codeph> tag which is not wrapping. I used the code provided in this URL. After that most components are wrapping in the table. However some instances of text in <codeph> is not wrapping.
https://groups.yahoo.com/neo/groups/dit ... pics/35559
How can we get the <codeph> text which is like a long string to wrap in table?
Best regards,
Sangeeta
I have some text written in <codeph> tag which is not wrapping. I used the code provided in this URL. After that most components are wrapping in the table. However some instances of text in <codeph> is not wrapping.
https://groups.yahoo.com/neo/groups/dit ... pics/35559
How can we get the <codeph> text which is like a long string to wrap in table?
Best regards,
Sangeeta
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Wrapping text in Tables
Hi Sangeeta,
Using Oxygen's "Insert From Character map" (from the main "Edit" menu) you can search for a character called "zero width space" and add it manually inside the codeph content. It will not show up but the PDF processor will be able to break the line there when producing the PDF.
Regards,
Radu
Using Oxygen's "Insert From Character map" (from the main "Edit" menu) you can search for a character called "zero width space" and add it manually inside the codeph content. It will not show up but the PDF processor will be able to break the line there when producing the PDF.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 14
- Joined: Fri Nov 24, 2017 10:07 am
Re: Wrapping text in Tables
Hi Radu,
Thank you for the solution, but we have many instances of codeph.
Right now I am creating a customized plugin for PDF. I am using DITA to Print book. Will it be possible to add it in the plugin?
Best regards,
Sangeeta
Thank you for the solution, but we have many instances of codeph.
Right now I am creating a customized plugin for PDF. I am using DITA to Print book. Will it be possible to add it in the plugin?
Best regards,
Sangeeta
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Wrapping text in Tables
Hi,
At some point on the DITA Users List Eliot Kimber proposed an XSLT solution to automatically add zero-width-space in certain text nodes:
https://groups.yahoo.com/neo/groups/dit ... pics/41964
Regards,
Radu
At some point on the DITA Users List Eliot Kimber proposed an XSLT solution to automatically add zero-width-space in certain text nodes:
https://groups.yahoo.com/neo/groups/dit ... pics/41964
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 14
- Joined: Fri Nov 24, 2017 10:07 am
Re: Wrapping text in Tables
Hi Radu,
So I add the text to tables.xsl? It is not working...Can you please suggest?
So I add the text to tables.xsl? It is not working...Can you please suggest?
Code: Select all
<xsl:template match=”text()[matches(., ‘^(\w+=,).+’)]”>
<xsl:sequence select=”string-join(split(., ‘,’), ‘,​’)”/>
</xsl:template>
<xsl:function name=”local:addBreakPointsToString” as=”xs:string”>
<xsl:param name=”text” as=”xs:string”/>
<xsl:variable name=”result” as=”xs:string”
select=”local:insertBreakPoints($text, ())”
/>
<xsl:sequence select=”$result”/>
</xsl:function>
<xsl:function name=”local:insertBreakPoints” as=”xs:string”>
<xsl:param name=”text” as=”xs:string?”/>
<xsl:param name=”resultString” as=”xs:string?”/>
<xsl:choose>
<xsl:when test=”not($text)”>
<xsl:sequence select=”$resultString”/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name=”pre” select=”substring($text, 1, 5)” as=”xs:string”/>
<xsl:variable name=”rest” select=”substring($text, 6)” as=”xs:string?”/>
<xsl:sequence select=”local:insertBreakPoints($rest, concat($resultString, ‘​’, $pre)”/>
</xsl:otherwise>
</xsl:choose>
</xsl:function>
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Wrapping text in Tables
Hi,
You need to start debugging your own XSLT code. There are "xsl:message"'s which can be added inside xsl:templates and which show up in the "DITA OT" console view.
You can also try to register on the Yahoo Groups DITA Users List and ask around.
Regards,
Radu
You need to start debugging your own XSLT code. There are "xsl:message"'s which can be added inside xsl:templates and which show up in the "DITA OT" console view.
You can also try to register on the Yahoo Groups DITA Users List and ask around.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “General XML Questions”
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