Skip to content

Commit

Permalink
Merge pull request #727 from ekimbernow/feature/DITA-2.0/object-examp…
Browse files Browse the repository at this point in the history
…le-iframe

2.0 Task: <object> example for iframe
  • Loading branch information
keberlein authored Jul 26, 2022
2 parents 79d50f4 + d89886b commit edacd53
Showing 1 changed file with 38 additions and 15 deletions.
53 changes: 38 additions & 15 deletions specification/langRef/base/object.dita
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
<section id="attributes">
<title>Attributes</title>
<p>The following attributes are available on this element: <ph
conkeyref="reuse-attributes/ref-universalatts"/> and the attributes defined
below.</p>
conkeyref="reuse-attributes/ref-universalatts"/> and the attributes defined below.</p>
<dl>
<dlentry id="data">
<dt id="attr-data"><xmlatt>data</xmlatt></dt>
Expand Down Expand Up @@ -96,20 +95,44 @@
<p>This section contains examples of how the
<xmlelement>object</xmlelement> element can be used.</p>
<fig>
<title>Referencing a PDF</title>
<p>The following code sample shows how an
<xmlelement>object</xmlelement> element can be used to render a
PDF as an inline object:</p>
<codeblock>
&lt;object type="application/pdf"
data="resources/pdf/terms.pdf"
width="300"
height="200"
id="terms-and-conditions">
&lt;desc&gt;Terms and conditions for using the site.&lt;/desc&gt;
&lt;fallback>PDF cannot be displayed; please download the terms and
conditions from &lt;xref keyref="site-terms"/>.&lt;/fallback>
<title>Referencing a web page for display in an HTML iframe</title>
<p>The following code sample shows how an <xmlelement>object</xmlelement> element can be
used to render a web page in an iframe:</p>
<codeblock>&lt;object type="text/html"
data="https://www.openstreetmap.org/export/embed.html?bbox=-0.004017949104309083%2C51.47612752641776
%2C0.00030577182769775396
%2C51.478569861898606
&amp;layer=mapnik"
width="800"
height="600"
id="map-uk-greenwich"
outputclass="iframe">
&lt;desc&gt;Greenwich, England&lt;/desc&gt;
&lt;fallback>&lt;xref format="html" scope="external"
href="https://www.openstreetmap.org/export/embed.html?bbox=-0.004017949104309083%2C51.47612752641776
%2C0.00030577182769775396
%2C51.478569861898606
&amp;layer=mapnik"
/>&lt;/fallback>
&lt;/object&gt;</codeblock>
<p>
<draft-comment author="eliot.kimber">The URL as shown works in my working example with the
line breaks before the %2C escaped
characters.<codeblock>&lt;!DOCTYPE html>
&lt;html>
&lt;head>
&lt;title>Test of Iframe&lt;/title>
&lt;/head>
&lt;body>
&lt;p>Iframe:&lt;/p>
&lt;iframe src="https://www.openstreetmap.org/export/embed.html?bbox=-0.004017949104309083%2C51.47612752641776
%2C0.00030577182769775396
%2C51.478569861898606
&amp;layer=mapnik"
>Street map&lt;/iframe>
&lt;/body>
&lt;/html></codeblock></draft-comment>
</p>
</fig>
<fig id="fig_o2l_bfb_4k">
<title>Object with reference to video using key reference on the
Expand Down

0 comments on commit edacd53

Please sign in to comment.