Conditional processing of topic in map with specialised props attribute

Post here questions and problems related to editing and publishing DITA content.
John_Tait
Posts: 22
Joined: Tue Jan 22, 2013 11:55 am

Conditional processing of topic in map with specialised props attribute

Post by John_Tait »

Hi

I've been able to apply specialised conditional processing to elements (e.g. <p> elements) within a topic.

When I apply the conditional processing attribute to a topicref (to knock out the whole topic), I get an error.

Here's my map

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map chunk="by-document to-content">
<title>Manual built out of Means of Compliance modules</title>
<topicref href="plant.ditamap" format="ditamap">
<topicref href="MoC2dita.dita"/>
<topicref href="MoC3dita.dita"/>
</map>
I want to amend

Code: Select all


 <topicref href="MoC2dita.dita"/>
to

Code: Select all


<topicref href="MoC2dita.dita" route="sussex"/>
but when I do, I get the message "E [Xerces] Attribute "route" must be declared for element type "topicref". "

From the error, it looks like I've forgotton to include the subject scheme map that contains the controlled values, but in fact the "plant.ditamap" is a topic map that contains the subject scheme map that contains these.

I've remembered to open the top map in the Maps Manager as well.

Oxygen seems happy to accept the specialised conditional values in the topics, but not on the topicref elements.

I've tried using an intermediary mini map between this map and the topic, and applying the profiling attribute to that, but it still isn't accepted.

Maybe the Open Toolkit doesn't yet support this?

Thanks

John
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Conditional processing of topic in map with specialised props attribute

Post by Radu »

Hi John,

The @route attribute is not defined in the regular DITA DTDs.
So what you probably did was to define a DITA topic specialization in which you added the attribute as a specialization of the @props.
So probably each of your DITA topics point to the specialization DTDs (which define this extra attribute) instead of the regular DTDs.
You need to define such a DTD specialization also for the DITA Map DTDs and have DITA Maps reference those DTDs instead.

Because defining the constraints in the Subject Scheme is not enough, the Subject Scheme Map does not contribute to the validation of the DITA Map but to the processing stage.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
John_Tait
Posts: 22
Joined: Tue Jan 22, 2013 11:55 am

Re: Conditional processing of topic in map with specialised props attribute

Post by John_Tait »

Thanks for your quick and helpful reply.

John
John_Tait
Posts: 22
Joined: Tue Jan 22, 2013 11:55 am

Re: Conditional processing of topic in map with specialised props attribute

Post by John_Tait »

Just tried it, by copying across my small customisations from the topic.dtd file into the map.dtd file.

Works perfectly - thanks!

John
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Conditional processing of topic in map with specialised props attribute

Post by Radu »

Hi John,

Glad it works.
Usually a DTD specialization is not done by modifying directly the base DTDs.
A specialization defines a new public ID which is referenced by all maps and this public ID is mapped in the DITA OT catalogs to the DITA DTDs.
As an example of a simple specialization which can be integrated as a DITA Open Toolkit plugin you can look at our MathML specialization (which allows editing MathML equations in DITA composite topics):
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\mathml

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply