Get the 3 level hierarchy of the IPTC subject code
The IPTC subject code is a resource used by the converter. It is organized in a hierarchy of terms. However, you seem to only consider so far the first level of the hierarchy.
For example, for the document afp.com-20170417T125353Z-TX-PAR-EOL41.xml
, the value of the dc:subject
property is <http://cv.iptc.org/newscodes/subjectcode/03000000>
which is taken from the FormalName attribute of the <SubjectCode>/<Subject>
sub-elements. However, the property dc:subject
should be generated multiple times for each subject code. The rule of thumb will be:
-
<SubjectCode></Subject>
will provide a subject code of level 1 in the hierarchy -
<SubjectCode></SubjectMatter>
will provide a subject code of level 2 in the hierarchy -
<SubjectCode></SubjectDetail>
will provide a subject code of level 3 in the hierarchy