XooCode(){

DefinedTermSet

DefinedTermSet is a CreativeWork subtype for a controlled vocabulary or glossary: the ISO 639-2 language codes, an organisation's internal classification scheme, a domain glossary. It adds one direct property: hasDefinedTerm (the DefinedTerm members).

Its direct subtype is CategoryCodeSet, which is used when the members are CategoryCode entries (coded classifications with short textual codes).

The inverse relationship on a DefinedTerm is inDefinedTermSet; each term can link back to its parent set.

Full example of schema.org/DefinedTermSet json-ld markup

The markup is verified as valid with Rich Results Test from Google.

Highlight legend:Required by GoogleRecommendedOptional
schema.org/DefinedTermSet
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "DefinedTermSet",
  "name": "Xoo Code Severity Taxonomy",
  "description": "Controlled five-term vocabulary used by the XooStructured validator to classify audit findings by severity.",
  "url": "https://xoocode.com/taxonomies/severity",
  "hasDefinedTerm": [
    { "@type": "DefinedTerm", "name": "Critical", "description": "Prevents the resource from being indexed at all.", "termCode": "CRIT" },
    { "@type": "DefinedTerm", "name": "Error", "description": "Violates the schema.org or Google rich-result contract.", "termCode": "ERR" },
    { "@type": "DefinedTerm", "name": "Warning", "description": "Permitted but sub-optimal; may reduce rich-result eligibility.", "termCode": "WARN" },
    { "@type": "DefinedTerm", "name": "Info", "description": "Informational observation, no action required.", "termCode": "INFO" },
    { "@type": "DefinedTerm", "name": "Best practice", "description": "Recommended enhancement beyond the strict spec.", "termCode": "BEST" }
  ]
}
</script>

Minimal valid version

The smallest markup that still produces a valid DefinedTermSet entity. Use it as the floor. Reach for the advanced example above when you want search engines and AI agents to understand more about your content.

schema.org/DefinedTermSet (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "DefinedTermSet",
  "name": "Xoo Code Severity Taxonomy",
  "hasDefinedTerm": [
    { "@type": "DefinedTerm", "name": "Critical", "termCode": "CRIT" }
  ]
}
</script>

Google rich results this unlocks

Markup matching this example makes your page eligible for the following Google Search rich results. The primary target drives the required / recommended property classification in the advanced code block above.

  • No dedicated rich result (used by AI knowledge graphs and taxonomy-aware search)
    Google docs

Common DefinedTermSet mistakes

Mistakes that pass validation but silently fail to earn rich results or mislead consumers walking the graph. Avoid these and your markup will be ahead of most sites in the wild.

  1. 01

    DefinedTermSet with bare strings instead of DefinedTerm

    Wrong
    "hasDefinedTerm": ["Critical", "Error", "Warning"]
    Right
    "hasDefinedTerm": [{ "@type": "DefinedTerm", "name": "Critical", "termCode": "CRIT" }]

    hasDefinedTerm expects DefinedTerm objects. Bare strings lose the termCode, description, and identity that make the vocabulary addressable.

About the example data

The Xoo Code Severity Taxonomy: a 5-term controlled vocabulary for classifying structured-data audit findings.

Comments

Loading comments...

Leave a comment