Subject scheme map: Inc;lude/exclude works, flag doesn't

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

Subject scheme map: Inc;lude/exclude works, flag doesn't

Post by John_Tait »

Hi

I'm using 14.1.

I can't explain the following behaviour. Is it a bug, or am I doing something wrong?

When I use a subject scheme map to exclude content, it works. When I use the same subject scheme map to flag content, it doesn't.

Here is 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>Test</title>
<topicref href="doctor_who_subject.ditamap" format="ditamap" type="subjectScheme"/>
<topicref href="serials_list.dita"/>
</map>
Here is (part of) the subject scheme map:

Code: Select all

    <subjectdef keys="era_attributedef">
<subjectdef keys="producer">
<subjectdef keys="sixties">
<subjectdef keys="verity_lambert"/>
<subjectdef keys="john_wiles"/>
<subjectdef keys="innes_lloyd"/>
<subjectdef keys="peter_bryant"/>
<subjectdef keys="derrick_sherwin"/>
</subjectdef>
<subjectdef keys="seventies">
<subjectdef keys="barry_letts"/>
<subjectdef keys="philip_hinchcliff"/>
<subjectdef keys="graham_williams"/>
</subjectdef>
<subjectdef keys="eighties">
<subjectdef keys="john_nathan-turner"/>
</subjectdef>
</subjectdef>
</subjectdef>

...

<enumerationdef>
<attributedef name="era"/>
<subjectdef keyref="era_attributedef"/>
</enumerationdef>

...
The attribute "era" is a specialised props attribute, but I can reproduce the behaviour with the "platform" atribute, so specialisation doesn't seem to affect it.

Here is part of the serials_list.dita topic:

Code: Select all

<topic id="first_serials">
<title>List of Doctor Who serials</title>
<body>
<section doctor="First_Doctor" story="classic" era="verity_lambert">
<title>An Unearthly Child</title>
<p>Kidnapped!</p>
</section>

...

<section doctor="Seventh_Doctor" story="classic" era="john_nathan-turner">
<title>Survival</title>
<p>Ironically titled.</p>
</section>

...

</body>
</topic>
If I use the following DITAVAL filter:

Code: Select all


<prop action="exclude" att="era"/>
<prop action="include" att="era" val="verity_lambert"/>
then only the section marked with era="verity_lambert" appears (as expected).

If I use:

Code: Select all


<prop action="exclude" att="era"/>
<prop action="include" att="era" val="sixties"/>
I get an identical rendering, because I have associated "verity_lambert" with "sixties" using the subject scheme map.

So far so good. In the full project, I have more "sixties" stories than "verity_lambert" stories, and it works as expected (i.e. sections tagged with the names of the other producers listed under "sixties" in the subject scheme map also appear).

Now if I use the following DITAVAL file:

Code: Select all

<prop action="flag" att="era" val="verity_lambert" color="red"/>
all the paragraphs in sections tagged "verity_lambert" appear in red, which is what I want.

However, if I use:

Code: Select all

<prop action="flag" att="era" val="sixties" color="red"/>
then nothing appears in red. I don't understand why!

If I take part of my original topic:

Code: Select all


<topic id="first_serials">
<title>List of Doctor Who serials</title>
<body>
<section doctor="First_Doctor" story="classic" era="verity_lambert">
<title>An Unearthly Child</title>
<p>Kidnapped!</p>
</section>
and amend it to this:

Code: Select all


<topic id="first_serials">
<title>List of Doctor Who serials</title>
<body>
<section doctor="First_Doctor" story="classic" era="sixties">
<title>An Unearthly Child</title>
<p>Kidnapped!</p>
</section>
then the filter:

Code: Select all

<prop action="flag" att="era" val="sixties" color="red"/>
will render the topic text in red.

I don't understand why the flag action differs from the include/exclude action.

Am I doing something wrong, or is it a bug/feature of the DITA-OT or oXygen?

Thanks

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

Re: Subject scheme map: Inc;lude/exclude works, flag doesn't

Post by Radu »

Hi John,

As a DITA Editor, what we do with Subject Scheme maps is to collect keys from it and propose them in the Attributes view when editing certain attributes.
When publishing Oxygen 14.1 just runs the DITA OT 1.6.1 ANT processing over the DITA Map.

So this looks like a bug in the DITA OT, actually two bugs:

1) XHTML publishing does not work (I tested with both DITA OT 1.6.1 and 1.7.1). This is because of the @chunk attribute you have set on the DITA Map.
I placed a bug and more details here:

https://github.com/dita-ot/dita-ot/issues/1442

2) PDF publishing does not work. I will try to add a bug for this too.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Subject scheme map: Inc;lude/exclude works, flag doesn't

Post by Radu »

I looked into the PDF publishing and the problem seems to be the same one. I added a comment on the same bug.

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

Re: Subject scheme map: Include/exclude works, flag doesn't

Post by John_Tait »

Ah, great, thank-you. I have removed the chunk attribute and it behaves as expected.

Thank-you for reporting the bug and many thanks for your quick and highly professional reply.

John
Post Reply