My RDF/XML states:

Chronic diseases

Chronic illnesses

but the taxonomy terms generated is

"Chronic illnesses (Chronic diseases)"

Shouldn't this be "Chronic diseases (Chronic illnesses)"?

Is this a bug? A poorly written RDF? Or I just don't know what I'm talking about?

thanks,

jyg

Comments

jyg’s picture

Ugh... my XML got interpreted :p So here are the pertinent lines from the RDF


  <prefLabel xmlns="http://www.w3.org/2004/02/skos/core#" xml:lang="en-us"oChronic diseases</prefLabel>
  <altLabel xmlns="http://www.w3.org/2004/02/skos/core#" xml:lang="en-us">Chronic illnesses</altLabel>

dman’s picture

Hm.

skos:altLabel is registered as a possibly synonym. skos:prefLabel is supposed to be used as the term name.
So our expectations are ok so far.

However, things get tricker (start making guesses) when xml:lang and synonyms are used. In those cases (based only on the examples I've encountered so far) the system gathers all the possible labels together in an array, then picks one from the preferred language off the top and displays the rest as a (list) after. Not optimal in all cases of course, but as I said, it's guesswork to get what is probably wanted without actually throwing away data.

Based on my expectations, I would NOT have expected this to be causing it to actually create terms with a NAME that was conflated with the synonym though. If the record has one name, that name should just get set. The guesswork described above should only happen if there are several synonyms but no prefname.

          /**
           * Need to do extra strangeness to support multiple values (synonyms)
           * x multiple languages!
           *
           * <skos:altLabel xml:lang="en">Emergency relief</skos:altLabel>
           * <skos:altLabel xml:lang="en">Emergency assistance in disasters</skos:altLabel>
           * <skos:altLabel xml:lang="en">Disaster assistance</skos:altLabel>
           * <skos:altLabel xml:lang="fr">Panic</skos:altLabel>
           *
           * becomes
           * $term->predicates['altLabel'] = array(
           *   'en' => 'Emergency relief',
           *   'en:1' => 'Emergency assistance in disasters',
           *   'en:2' => 'Disaster assistance',
           *   'fr' => 'Panic',
           * )
           *
           * The actual key is not expected to be re-used at the moment, it's
           * just informational. I haven't thought this through.
           *
           */

I can't see where this would be setting the wrong term->name. I can't right now see the code that would have created a string that looks like that.