Use of <foreign> for embedding HTML content into topics
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 22
- Joined: Wed May 29, 2019 5:43 pm
Use of <foreign> for embedding HTML content into topics
Hi!
I'm having trouble using the procedure described here:
https://www.oxygenxml.com/doc/versions/ ... -html.html
I'm trying to include a small chunk of HTML into my topic content the way below (the following list is included inside the body of the topic):
And it breaks the topic rendering in Webhelp responsive (everything else is transformed properly except the page corresponding to this topic). Am I missing something (obviously I do!!)? Any help is welcome!
Best regards
David
I'm having trouble using the procedure described here:
https://www.oxygenxml.com/doc/versions/ ... -html.html
I'm trying to include a small chunk of HTML into my topic content the way below (the following list is included inside the body of the topic):
Code: Select all
<ol outputclass="ol_refdocs" id="TAB_subsea_reference_books_refs">
<li id="REF_DOC_document_10" outputclass="ref_doc_list">
<table frame="none" rowsep="0" colsep="1">
<tgroup cols="4">
<colspec colname="c1" colnum="1" colwidth="1*"/>
<colspec colname="c2" colnum="2" colwidth="1*"/>
<colspec colname="c3" colnum="3" colwidth="1*"/>
<colspec colname="c4" colnum="4" colwidth="4*"/>
<tbody>
<row>
<entry colsep="0">Document 10</entry>
<entry colsep="0">02</entry>
<entry colsep="0">
<foreign outputclass="html-embed"><![CDATA[<span class="span_test">test<span>]]></foreign>
</entry>
<entry colsep="0">Titre document 10</entry>
</row>
</tbody>
</tgroup>
</table>
</li>
</ol>
Best regards
David
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Use of <foreign> for embedding HTML content into topics
Hi David,
What specifically breaks in the topic rendering? Maybe you should open the equivalent generated HTML topic in Oxygen and see if there is anything fishy in there in the way in which the span inside the CDATA was preserved.
Regards,
Radu
What specifically breaks in the topic rendering? Maybe you should open the equivalent generated HTML topic in Oxygen and see if there is anything fishy in there in the way in which the span inside the CDATA was preserved.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 22
- Joined: Wed May 29, 2019 5:43 pm
Re: Use of <foreign> for embedding HTML content into topics
Hi Radu!
In fact the HTML page corresponding to that topic is not rendered AT ALL... I tried with a very simple DITA Map containing only this topic.
If I replace the <foreign> ...</foreign> content by something else, like "test", it works perfectly, and I have no error message whatsoever!
Here is the complete topic content.
Any idea what can happen here?
Regards
David
In fact the HTML page corresponding to that topic is not rendered AT ALL... I tried with a very simple DITA Map containing only this topic.
If I replace the <foreign> ...</foreign> content by something else, like "test", it works perfectly, and I have no error message whatsoever!
Here is the complete topic content.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="doclist">
<title>Document List</title>
<topic id="doclist_ref_books">
<title>Subsea reference books</title>
<body>
<p>The following documents are the Reference Books.</p>
<ol outputclass="ol_refdocs" id="TAB_subsea_reference_books_refs">
<li id="REF_DOC_document_10" outputclass="ref_doc_list">
<table frame="none" rowsep="0" colsep="1">
<tgroup cols="4">
<colspec colname="c1" colnum="1" colwidth="1*"/>
<colspec colname="c2" colnum="2" colwidth="1*"/>
<colspec colname="c3" colnum="3" colwidth="1*"/>
<colspec colname="c4" colnum="4" colwidth="4*"/>
<tbody>
<row>
<entry colsep="0">Document 10</entry>
<entry colsep="0">02</entry>
<entry colsep="0">
<foreign outputclass="html-embed"><![CDATA[<span class="span_test">test<span>]]></foreign>
</entry>
<entry colsep="0">Titre document 10</entry>
</row>
</tbody>
</tgroup>
</table>
</li>
</ol>
</body>
</topic>
<topic id="doclist_codes_standards">
<title>Codes and Standards</title>
<body>
<ol outputclass="ol_refdocs" id="TAB_subsea_reference_books_refs">
<li id="REF_DOC_document_1" outputclass="ref_doc_list">
<table frame="none" rowsep="0" colsep="1">
<tgroup cols="4">
<colspec colname="c1" colnum="1" colwidth="1*"/>
<colspec colname="c2" colnum="2" colwidth="1*"/>
<colspec colname="c3" colnum="3" colwidth="1*"/>
<colspec colname="c4" colnum="4" colwidth="4*"/>
<tbody>
<row>
<entry colsep="0">Document 1</entry>
<entry colsep="0">02</entry>
<entry colsep="0">
<foreign outputclass="html-embed"><![CDATA[<span class="span_test">test<span>]]></foreign>
</entry>
<entry colsep="0">Titre document 4</entry>
</row>
</tbody>
</tgroup>
</table>
</li>
<li id="REF_DOC_document_2" outputclass="ref_doc_list">
<table frame="none" rowsep="0" colsep="1">
<tgroup cols="4">
<colspec colname="c1" colnum="1" colwidth="1*"/>
<colspec colname="c2" colnum="2" colwidth="1*"/>
<colspec colname="c3" colnum="3" colwidth="1*"/>
<colspec colname="c4" colnum="4" colwidth="4*"/>
<tbody>
<row>
<entry colsep="0">Document 2</entry>
<entry colsep="0">02</entry>
<entry colsep="0">
<foreign outputclass="html-embed"><![CDATA[<span class="span_test">test<span>]]></foreign>
</entry>
<entry colsep="0">Titre document 2</entry>
</row>
</tbody>
</tgroup>
</table>
</li>
<li id="REF_DOC_document_3" outputclass="ref_doc_list">
<table frame="none" rowsep="0" colsep="1">
<tgroup cols="4">
<colspec colname="c1" colnum="1" colwidth="1*"/>
<colspec colname="c2" colnum="2" colwidth="1*"/>
<colspec colname="c3" colnum="3" colwidth="1*"/>
<colspec colname="c4" colnum="4" colwidth="4*"/>
<tbody>
<row>
<entry colsep="0">Document 3</entry>
<entry colsep="0">02</entry>
<entry colsep="0">
<foreign outputclass="html-embed"><![CDATA[<span class="span_test">test<span>]]></foreign>
</entry>
<entry colsep="0">Titre document 2</entry>
</row>
</tbody>
</tgroup>
</table>
</li>
</ol>
</body>
</topic>
</topic>
Regards
David
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Use of <foreign> for embedding HTML content into topics
Hi David,
Probably this occurs because instead of using "</span>" to end the tag you used "<span>".
So the XML should have looked like this:
Regards,
Radu
Probably this occurs because instead of using "</span>" to end the tag you used "<span>".
So the XML should have looked like this:
Code: Select all
<foreign outputclass="html-embed"><![CDATA[<span class="span_test">test</span>]]></foreign>
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Use of <foreign> for embedding HTML content into topics
Hi David,
I also missed it a couple of times
But once you said the HTML was not produced at all, it meant that somehow the fragment was not a well formed XHTML content so I took another close look at it.
Regards,
Radu
I also missed it a couple of times

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