Subject scheme map rejects all the values set for attribute ...

Post here questions and problems related to editing and publishing DITA content.
contentquartz
Posts: 2
Joined: Fri Aug 31, 2018 8:08 pm

Subject scheme map rejects all the values set for attribute ...

Post by contentquartz »

I'm trying to use subject schemes to redefine / replace certain profile attributes, such as "audience" and "platform". I get the error message
The subject scheme map rejects all the values set for attribute "name".
Where should I look for the values that are being rejected? I receive the error no matter what I set for the "name" attribute of "attributedef".

Sample code:

Code: Select all

<subjectScheme>
<subjectHead>
<subjectHeadMeta>
<navtitle>sample</navtitle>
</subjectHeadMeta>
</subjectHead>
<hasInstance>
<subjectdef keys="audienceKey">
<subjectdef keys="confidential">
</subjectdef>
</subjectdef>
</hasInstance>
<enumerationdef>
<attributedef name="audience" />
<subjectdef keyref="audienceKey" />
</enumerationdef>
<topicref format="ditamap" scope="local" type="subjectScheme" />
</subjectScheme>
Trey Childs
Content Quartz, LLC
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: Subject scheme map rejects all the values set for attribute ...

Post by Radu »

Hi Trey,

Your subject scheme map looks OK, it has an extra:

Code: Select all

 <topicref format="ditamap" scope="local" type="subjectScheme" />
in it but it should not matter.
Here's what I tested, I created a Subject Scheme map looking like this:

Code: Select all

<!DOCTYPE subjectScheme PUBLIC "-//OASIS//DTD DITA Subject Scheme Map//EN" "subjectScheme.dtd"> 
<subjectScheme>
<subjectHead>
<subjectHeadMeta>
<navtitle>sample</navtitle>
</subjectHeadMeta>
</subjectHead>
<hasInstance>
<subjectdef keys="audienceKey">
<subjectdef keys="confidential">
</subjectdef>
</subjectdef>
</hasInstance>
<enumerationdef>
<attributedef name="audience" />
<subjectdef keyref="audienceKey" />
</enumerationdef>
</subjectScheme>
and then in the main DITA Map I referred to it like this:

Code: Select all

<topicref href="topics/sbjScheme.ditamap" format="ditamap" type="subjectScheme"/>
Then with the main DITA Map opened in the DITA Maps Manager, I opened a DITA topic and tried to edit the attribute "audience" on a <p> element. The "confidential" value was proposed for it. Choosing any other value resulted in a validation error reported.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
contentquartz
Posts: 2
Joined: Fri Aug 31, 2018 8:08 pm

Re: Subject scheme map rejects all the values set for attribute ...

Post by contentquartz »

It seems to be working for "audience" now, although I don't know why. When I use a different attribute, I seem to have the issue again. I will look into it more over the next few days and post any new info I find.

I wanted to comment on the code in your example. There are two differences. The first is the schema reference. I'm using the RelaxNG declaration, but I didn't post it in sample. It doesn't seem to matter in this case. The second comment is about the extra line:

Code: Select all

<topicref format="ditamap" scope="local" type="subjectScheme" />
The topicref should have been in the main map. I had it in both places; but you're right, it shouldn't matter that it appeared in the subject scheme map as well.
(https://www.oxygenxml.com/demo/DITA_Subject_Scheme.html 03:50 - 05:00)
Trey Childs
Content Quartz, LLC
Post Reply