DITA Resource Center

foreign

The <foreign> element allows the introduction of non-DITA content, for example, MathML, SVG, or Rich Text Format (RTF). The <foreign> element or a specialization may contain more than one type of non-DITA content or a mix of DITA and non-DITA content. Specialization of the <foreign> element generally is implemented as a domain, but architects looking for more control over the content may implement foreign vocabularies as structural specializations.

Processors should attempt to display <foreign> content unless otherwise instructed. If the processor cannot render the content, it may emit a warning.

The enabler of the foreign vocabulary must provide the processing and override the base processing for <foreign>.

  • If <foreign> contains more than one alternative content element, they should all be processed. In the case of <desc> they should be concatenated in a similar way to <section>, but with no title (analogous to <div> in HTML).
  • If alternate content is desired, specialize the <desc> element to contain it. This specialization of <desc> should be used within the element specialized from <foreign>. Such alternate content must of course be valid wherever the <foreign> specialization is valid.
  • If no <desc>, <object>, or <image> element is found within an instance of the <foreign> element, the base processing mayemit a warning about the absence of processable content.
  • The base processing for <object> may emit the content of <foreign> as a file at the location specified by the data attribute of the <object> element. The <object> element should have a data attribute or a <foreign> sub-element but not both. In the event that an <object> element contains both a data attribute and an <foreign> sub-element the processing system should ignore one of them.

Contains

note

These models represent only the default document types distributed by OASIS. Actual content models will differ with each new document type.
Doctype Content model
topic, map, concept, ditabase, glossary, glossentry, glossgroup, reference, task, bookmap, classifyMap, subjectScheme, machineryTask, learningAssessment, learningBookmap, learningContent, learningMap, learningOverview, learningPlan, learningSummary ANY

Contained by

Doctype Content model
topic (base) data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, searchtitle, abstract, body, bodydiv, section, sectiondiv, example, prolog, linktext, linkinfo, b, u, i, tt, sup, sub, coords, index-see, index-see-also, index-sort-as, typeofhazard, consequence
map (base), classifyMap, learningMap data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, topicmeta, linktext, searchtitle, index-see, index-see-also, index-sort-as, b, u, i, tt, sup, sub, coords, typeofhazard, consequence
topic (technical content) data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, searchtitle, abstract, body, bodydiv, section, sectiondiv, example, prolog, linktext, linkinfo, b, u, i, tt, sup, sub, coords, index-see, index-see-also, index-sort-as, typeofhazard, consequence, uicontrol, screen, codeph, codeblock, var, oper, delim, sep, pt, pd, fragref, repsep, msgph, msgblock, filepath, userinput, systemoutput
map (technical content) data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, topicmeta, linktext, searchtitle, index-see, index-see-also, index-sort-as, b, u, i, tt, sup, sub, coords, typeofhazard, consequence, uicontrol, screen, codeph, codeblock, var, oper, delim, sep, pt, pd, fragref, repsep, msgph, msgblock, filepath, userinput, systemoutput
concept data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, searchtitle, abstract, body, bodydiv, section, sectiondiv, example, prolog, linktext, linkinfo, conbody, b, u, i, tt, sup, sub, coords, index-see, index-see-also, index-sort-as, typeofhazard, consequence, uicontrol, screen, codeph, codeblock, var, oper, delim, sep, pt, pd, fragref, repsep, msgph, msgblock, filepath, userinput, systemoutput
ditabase data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, searchtitle, abstract, body, bodydiv, section, sectiondiv, example, prolog, linktext, linkinfo, conbody, prereq, context, steps-informal, stepsection, cmd, info, tutorialinfo, stepxmp, choice, choptionhd, chdeschd, choption, chdesc, stepresult, result, postreq, refbody, refbodydiv, refsyn, proptypehd, propvaluehd, propdeschd, proptype, propvalue, propdesc, glossterm, glossdef, glossProperty, glossUsage, glossScopeNote, b, u, i, tt, sup, sub, coords, index-see, index-see-also, index-sort-as, typeofhazard, consequence, uicontrol, screen, codeph, codeblock, var, oper, delim, sep, pt, pd, fragref, repsep, msgph, msgblock, filepath, userinput, systemoutput
glossary, glossentry, glossgroup data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, searchtitle, abstract, body, bodydiv, section, sectiondiv, example, prolog, linktext, linkinfo, conbody, glossterm, glossdef, glossProperty, glossUsage, glossScopeNote, b, u, i, tt, sup, sub, coords, index-see, index-see-also, index-sort-as, typeofhazard, consequence, uicontrol, screen, codeph, codeblock, var, oper, delim, sep, pt, pd, fragref, repsep, msgph, msgblock, filepath, userinput, systemoutput
reference data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, searchtitle, abstract, body, bodydiv, section, sectiondiv, example, prolog, linktext, linkinfo, refbody, refbodydiv, refsyn, proptypehd, propvaluehd, propdeschd, proptype, propvalue, propdesc, b, u, i, tt, sup, sub, coords, index-see, index-see-also, index-sort-as, typeofhazard, consequence, uicontrol, screen, codeph, codeblock, var, oper, delim, sep, pt, pd, fragref, repsep, msgph, msgblock, filepath, userinput, systemoutput
task (strict), task (general) data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, searchtitle, abstract, body, bodydiv, section, sectiondiv, example, prolog, linktext, linkinfo, prereq, context, steps-informal, stepsection, cmd, info, tutorialinfo, stepxmp, choice, choptionhd, chdeschd, choption, chdesc, stepresult, result, postreq, b, u, i, tt, sup, sub, coords, index-see, index-see-also, index-sort-as, typeofhazard, consequence, uicontrol, screen, codeph, codeblock, var, oper, delim, sep, pt, pd, fragref, repsep, msgph, msgblock, filepath, userinput, systemoutput
bookmap data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, topicmeta, linktext, searchtitle, person, organization, summary, printlocation, bookpartno, booknumber, index-see, index-see-also, index-sort-as, organizationname, otherinfo, addressdetails, locality, localityname, administrativearea, thoroughfare, emailaddress, url, b, u, i, tt, sup, sub, coords, typeofhazard, consequence, uicontrol, screen, codeph, codeblock, var, oper, delim, sep, pt, pd, fragref, repsep, msgph, msgblock, filepath, userinput, systemoutput
subjectScheme data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, topicmeta, linktext, searchtitle, b, u, i, tt, sup, sub, coords, typeofhazard, consequence
machineryTask data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, searchtitle, abstract, body, bodydiv, section, sectiondiv, example, prolog, linktext, linkinfo, prereq, context, steps-informal, stepsection, cmd, info, tutorialinfo, stepxmp, choice, choptionhd, chdeschd, choption, chdesc, stepresult, result, postreq, reqcond, reqcontp, personnel, perscat, perskill, esttime, supequi, supply, spare, safecond, typeofhazard, consequence, b, u, i, tt, sup, sub, coords, index-see, index-see-also, index-sort-as, uicontrol, screen
learningAssessment, learningOverview, learningSummary data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, searchtitle, abstract, body, bodydiv, section, sectiondiv, example, prolog, linktext, linkinfo, lcIntro, lcObjectivesStem, lcObjective, lcAudience, lcTime, lcPrereqs, lcSummary, lcNextSteps, lcReview, lcResources, lcChallenge, lcInstruction, b, u, i, tt, sup, sub, coords, index-see, index-see-also, index-sort-as, lcInteractionBase, lcQuestionBase, lcInstructornote, lcQuestion, lcOpenAnswer, lcFeedback, lcFeedbackCorrect, lcFeedbackIncorrect, lcAnswerContent, lcItem, lcMatchingItem, lcAreaCoords
learningBookmap data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, topicmeta, linktext, searchtitle, person, organization, summary, printlocation, bookpartno, booknumber, index-see, index-see-also, index-sort-as, organizationname, otherinfo, addressdetails, locality, localityname, administrativearea, thoroughfare, emailaddress, url, b, u, i, tt, sup, sub, coords, typeofhazard, consequence
learningContent data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, searchtitle, abstract, body, bodydiv, section, sectiondiv, example, prolog, linktext, linkinfo, lcIntro, lcObjectivesStem, lcObjective, lcAudience, lcTime, lcPrereqs, lcSummary, lcNextSteps, lcReview, lcResources, lcChallenge, lcInstruction, prereq, context, steps-informal, stepsection, cmd, info, tutorialinfo, stepxmp, choice, choptionhd, chdeschd, choption, chdesc, stepresult, result, postreq, conbody, refbody, refbodydiv, refsyn, proptypehd, propvaluehd, propdeschd, proptype, propvalue, propdesc, b, u, i, tt, sup, sub, coords, index-see, index-see-also, index-sort-as, lcInteractionBase, lcQuestionBase, lcInstructornote, lcQuestion, lcOpenAnswer, lcFeedback, lcFeedbackCorrect, lcFeedbackIncorrect, lcAnswerContent, lcItem, lcMatchingItem, lcAreaCoords
learningPlan data, title, navtitle, shortdesc, desc, p, note, lq, q, sli, li, itemgroup, dthd, ddhd, dt, dd, fig, figgroup, pre, lines, ph, alt, object, stentry, draft-comment, fn, indexterm, index-base, cite, xref, entry, author, source, publisher, copyrholder, category, metadata, prodname, brand, series, platform, prognum, featnum, component, searchtitle, abstract, body, bodydiv, section, sectiondiv, example, prolog, linktext, linkinfo, lcIntro, lcObjectivesStem, lcObjective, lcAudience, lcTime, lcPrereqs, lcSummary, lcNextSteps, lcReview, lcResources, lcChallenge, lcInstruction, lcClient, lcPlanTitle, lcCIN, lcModDate, lcDelivDate, lcPlanSubject, lcPlanDescrip, lcPlanPrereqs, lcGeneralDescription, lcGoals, lcNeeds, lcValues, lcOrgConstraints, lcEdLevel, lcAge, lcBackground, lcSkills, lcKnowledge, lcMotivation, lcSpecChars, lcWorkEnvDescription, lcPlanResources, lcProcesses, lcTaskItem, lcAttitude, lcPlanObjective, lcJtaItem, lcGapItemDelta, lcLearnStrat, lcAssessment, lcDelivery, lcLMS, lcNoLMS, lcHandouts, lcClassroom, lcOJT, lcConstraints, lcW3C, lcPlayers, lcGraphics, lcViewers, lcResolution, lcFileSizeLimitations, lcDownloadTime, lcSecurity, b, u, i, tt, sup, sub, coords, index-see, index-see-also, index-sort-as, lcInteractionBase, lcQuestionBase, lcInstructornote, lcQuestion, lcOpenAnswer, lcFeedback, lcFeedbackCorrect, lcFeedbackIncorrect, lcAnswerContent, lcItem, lcMatchingItem, lcAreaCoords

Inheritance

- topic/foreign

SVG Example within a <p> element

<p>... as in the formula 
  <svg>
    <svg:svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">

<ellipse cx="300" cy="150" rx="200" ry="80"
style="fill:rgb(200,100,50);
stroke:rgb(0,0,100);stroke-width:2"/>

    </svg:svg>    
  </svg>.
</p> 

MathML Example within an <object> element

<p>... as in the formula 
<object>
  <desc>4 + x</desc>
  <mathML>
    <mml:math display="block">
      <mml:mrow>
        <mml:mo>&sum;</mml:mo>
        <mml:mn>4</mml:mn>
        <mml:mo>+</mml:mo>
        <mml:mi>x</mml:mi>
      </mml:mrow>
    </mml:math>    
  </mathML>
 <object>.
</p> 

Attributes

Name Description Data Type Default Value Required?
univ-atts attribute group (includes select-atts, id-atts, and localization-atts groups) A set of related attributes, described in univ-atts attribute group
global-atts attribute group (xtrf, xtrc) A set of related attributes, described in global-atts attribute group
class, outputclass Common attributes described in Other common DITA attributes

Was this page helpful?