oXygen doesn't allow <ph conkeyref...> inside <indexterm>

Posts: 4

oXygen doesn't allow <ph conkeyref...> inside <indexterm>

Fri Dec 07, 2012 3:21 am

oXygen 14.1

When I place a conkeyref inside an indexterm, oXygen says I can't do it, even the alert itself says I can.

Example: <indexterm><ph conkeyref="rvbdname/companyShort"/> resources<indexterm>knowledge base</indexterm></indexterm>

oXygen then throws me this message:

E [Xerces] Unexpected element "ph". The content of the parent element type must match "(data|data-about|foreign|unknown|keyword|apiname|option|parmname|cmdname|msgnum|varname|wintitle|term|abbreviated-form|indexterm|index-base|index-see|index-see-also|index-sort-as)".

As shown in bold, indexterm is clearly among the matching parent elements. I suspect this is a bug in oXygen because nowhere does the 1.2 spec indicate that a <ph> can be a child to an <indexterm>.

Please advise.
Posts: 5630

Re: oXygen doesn't allow <ph conkeyref...> inside <indexterm>

Fri Dec 07, 2012 9:48 am

Hi Andrew,

Yes, according to the specification, inside an <indexterm> you can place another <indexterm>.
But what you are probably doing is placing a <ph> which conkeyrefs an <indexterm> element.

The DITA 1.2 standard expects the XML content to be valid even with conrefs not expanded.


DITA differs from these mechanisms, however, in that conref validity does not apply simply to the current content at the time of replacement, but to the ranges of possible content given the constraints of both the referencing document type and the referenced document type.

So you cannot conref/conkeyref from any DITA element to any DITA element, you can conref/conkeyref from an XML element which is allowed in that context to another element which is either the same or a specialization of the referencing element. So you can conkeyref from <ph> to another <ph> or from <ph> to a <b> because <b> is a specialization of <ph> (see the @class attributes on each element).

In your case, if the ID companyShort is set on an indexterm, then you should reference it using another indexterm like

Code: Select all

<indexterm conkeyref="rvbdname/companyShort"/>

Radu Coravu
<oXygen/> XML Editor

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 3 guests