• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WebMEM™

The Protocol for Structuring, Delivering, and Conditioning Trust-Scored AI Memory on the Open Web

  • Primer
  • Memory-First
  • Protocols
    • SDT Specification
    • WebMEM SemanticMap
    • WebMEM MapPointer
    • Digest Endpoint Specification
    • ProvenanceMeta Specification
    • AI Retrieval Feedback Loop Specification
    • Semantic Feedback Interface (SFI) Specification
    • Glossary Term Protocol (GTP) Specification
    • Examples
  • RFC
  • Glossary
  • About
    • WebMEM License
    • Mission
    • Charter

Semantic Data Template (SDT) Fragment Class

Part of the WebMEM Protocol
Location: /specification/sdt/yaml-in-html/classes/
Last Updated: 2025-07-28


What is an SDT Fragment Class?

The Semantic Data Template (SDT) Fragment Class is a standardized container for embedding structured, machine-readable knowledge fragments directly within HTML using YAML.

Each fragment declares its semantic role using the data-sdt-class attribute (e.g., DataFragment, FAQFragment, MetaFragment) and is wrapped in a <template data-visibility-fragment> tag to ensure it is inert, parsable, and non-disruptive to the DOM.

SDT Fragment Classes serve as the atomic building blocks of Memory-First Publishing, enabling precise fact exposure, trust scoring, glossary alignment, and AI retrievability at the fragment level.

Designed for compatibility with the Semantic Digest Protocol (SDP) and Glossary Term Protocol (GTP), each class enforces a consistent structure and purpose — making it easy for AI agents, public indexers, and model context frameworks (like MCP) to parse, cite, and reflect on individual units of structured knowledge.


Components of the SDT HTML Container

1. <template> Element

  • Provides an inert container — content is not rendered in the DOM.
  • Ensures compatibility with HTML5 standards.
  • Allows AI crawlers, agents, and reflection engines to extract structured data.

2. data-visibility-fragment Attribute

  • Flags the template as an AI-readable memory fragment.
  • Required for inclusion in Memory-First Publishing and SDP indexing.

3. data-type="text/yaml"

  • Declares the embedded format as YAML.
  • Ensures any agent or processor knows what to parse.

4. data-sdt-class="..."

  • Declares the fragment class type (e.g., DataFragment, MetaFragment, FAQFragment).
  • Determines parsing logic, structure expectations, and schema validation rules.

Example: Minimal Valid Container

<template
  data-visibility-fragment
  data-type="text/yaml"
  data-sdt-class="DataFragment">
# YAML block here
</template>

Container Markup Specification

Key Requirements

  • <template> must include data-visibility-fragment
  • Must specify data-type="text/yaml" and data-sdt-class
  • YAML content must follow the expected structure for its declared class
  • data-entity is conditionally required depending on the fragment class

Reserved IDs

  • id="provenance-meta" → trust anchor (for provenance linkage)
  • id="fragment-*" → fragment identity anchor (used in digests, citations, or exports)

A. Optional / Reserved Container Attributes

Attribute Purpose Status
data-fragment-id Optional override for canonical ID ❓ Not yet standardized
data-fragment-scope Mirrors YAML, helpful at outer layer ✅ Standardizing
data-glossary-scope Crawlers use this to resolve term alignment before parsing ✅ Common in examples
data-entity Enables quick scoping, required on entity fragments ⚠️ Needs enforcement

B. Canonical Attribute Order

Attribute Required? Notes
data-visibility-fragment ✅ Always present
data-type="text/yaml" ✅ Required for MIME disambiguation
data-sdt-class ✅ Declares behavior and structure
data-entity ⚠️ Conditional Required for entity-scoped fragments
data-fragment-id ❌ Optional Helpful when faq_id or term_id differs from id
data-fragment-scope ✅ Declares memory domain or protocol function

C. Reserved IDs

ID Pattern Purpose
id="provenance-meta" Declares the trust anchor for provenance_ref linking
id="fragment-*" Canonical identity anchor for each SDT fragment

Best Practice: Never reuse fragment IDs across entities or digest scopes. Use unique fragment-* identifiers per memory unit.


Learn More

  • Fragment Relationships
  • ProvenanceMeta Structure
  • Schema Definitions
  • Field Modeling

Primary Sidebar

YAML-in-HTML SDT

  1. Semantic Data Templates (SDT) Specification
  2. YAML-in-HTML Embedding
  3. Anatomy of a Semantic DataFragment
  4. SDT Fragment Header Mapping
  5. Field Inheritance Across Fragments (inherits_from)
  6. Cross-Fragment Indexing (related_fragments)
  7. ProvenanceMeta Best Practices
  8. SDT YAML-in-HTML: HTML Container Attributes
  9. Semantic Data Atoms: Fields Block Specification
  10. Fragment Relationships and Referencing
  11. Semantic Data Template (SDT) Fragment Classes Overview
    1. DataFragment
    2. DerivedStatsFragment
    3. IndexFragment
    4. DefinedTermFragment
    5. FAQFragment
    6. MetaFragment
    7. ExplainerFragment
    8. DirectoryFragment
    9. EligibilityFragment
    10. ProcedureFragment
    11. GlossaryFragment
    12. PersonaFragment
    13. PolicyFragment
    14. RecommendationFragment
    15. IdentityFragment

Copyright © 2026 · David W Bynon · Log in