Keyword vs data metadata in DITA?

General Tech Learning Aids/Tools 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Learning Aids/Tools related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

There are two "generic" types of metadata tags in DITA, the data element and the keyword element. Of course there's also the othermeta, but apparently that's supposed to be deprecated soon, and the name suggests its sort of a last resort anyhow.

So the keyword seems to closely resemble tags in web applications, i.e. what is commonly used for "folksonomies". But what is the exact difference between data and keyword, and when should you use which?

profilepic.png
manpreet 2 years ago

 

The  element is primarily for specialization so it's probably not wise to use it directly. The  element is better.

This:

    
        
            red
            green
            blue
        
    

will render to this in the DITA-OT XHTML transform:


   name="DC.subject" content="red, green, blue"/>
   name="keywords" content="red, green, blue"/>

If you want to add tags, I'd consider using subject scheme maps, which will allow you to include a list of controlled values.

If you specialize the @base or @props attribute, you can add metadata with much more control. Here, we have a @props attribute specialized to @era.

You can then add the @era attribute to an element in a topic, or to the  element in a map.

 keys="era_attributedef">
  
  Era of production by decade and producer


  keys="producer">
     
          keys="sixties">
              keys="verity_lambert"/>
              keys="john_wiles"/>
              keys="innes_lloyd"/>
              keys="peter_bryant"/>
              keys="derrick_sherwin"/>
         

          keys="seventies">
              keys="barry_letts"/>
              keys="philip_hinchcliff"/>
              keys="graham_williams"/>
         

          keys="eighties">
              keys="john_nathan-turner"/>
         
     
 

 


     name="era"/>
     keyref="era_attributedef"/>

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.