Part of the WebMEM® Protocol
Fragment Class: DataFragment
Location: /protocol/fragments/data/
Status: Current Draft
Last Updated: 2026-08-24
Overview
A DataFragment is a WebMEM fragment class for publishing structured factual data associated with a defined entity or context.
DataFragments represent facts obtained directly from an identified source rather than values calculated, aggregated, or summarized by the publisher. They preserve the relationship between the published facts, the entity or context to which those facts apply, and the source from which the facts originated.
A DataFragment may contain one or more Machine Fact Objects. Each Machine Fact Object represents an individual factual assertion within the fragment.
This establishes an important distinction:
- DataFragment — the bounded knowledge object that establishes the semantic purpose, entity or contextual scope, and source context for a set of factual data.
- Machine Fact Object — an individual factual assertion contained within the DataFragment.
Unlike a DerivedStatsFragment, which represents calculated, aggregated, or summarized knowledge, a DataFragment represents source-observed facts.
Semantic Purpose
The semantic purpose of a DataFragment is to state:
These are factual values published about this entity or context, obtained from this identified source.
A DataFragment provides the boundary within which those facts can share common context such as:
- entity identity;
- geographic or other contextual scope;
- source dataset;
- effective or applicable time period;
- provenance;
- and other metadata required to interpret the facts correctly.
Shared context may be declared once at the fragment level rather than unnecessarily repeated on every Machine Fact Object.
DataFragment Within an SDT
A DataFragment exists as one modular knowledge object within a Semantic Data Template (SDT).
The relationship is:
Web Resource → SDT → DataFragment → Machine Fact Objects
An SDT may contain multiple DataFragments when the resource contains factual knowledge with different entities, contexts, source boundaries, or semantic purposes.
A DataFragment should therefore represent a coherent set of source-observed facts rather than becoming a container for every factual value associated with the page.
DataFragment Requirements
A conforming DataFragment should establish enough information for its contents to be interpreted within the SDT.
| Element | Purpose |
|---|---|
| Fragment Class | Identifies the knowledge object as a DataFragment. |
| Fragment ID | Provides a stable identifier for the fragment within the published knowledge structure. |
| Entity or Context | Identifies the entity, record, location, collection, or other scope to which the facts apply. |
| Machine Fact Object(s) | Contains one or more factual assertions represented within the fragment. |
| Source | Identifies the source from which the factual information originated. |
| Provenance | Connects the fragment or its facts to source and lineage information sufficient to establish evidentiary origin. |
Additional information may be included when required by the domain, source, entity model, relationship model, or applicable conformance profile.
Source-Observed Facts
The defining characteristic of a DataFragment is that its factual values are obtained from an identified source without the publisher calculating a new factual value from them.
Examples include:
- a premium published in an authoritative plan dataset;
- an enrollment count reported in a source record;
- a geographic identifier supplied by a geographic dataset;
- a product attribute obtained from an authoritative catalog;
- a date, status, category, or identifier contained in a source record;
- or another factual value directly represented by the underlying source.
Formatting a source value for publication does not necessarily make the value derived. A value becomes derived when the publisher creates a new factual assertion through calculation, aggregation, comparison, summarization, or another transformation of underlying source facts.
Derived knowledge belongs in a DerivedStatsFragment when the resulting values form a coherent derived knowledge object.
Machine Fact Objects
Individual facts within a DataFragment are represented as Machine Fact Objects.
A Machine Fact Object may identify:
- a field identifier;
- a defined term;
- a description;
- a value;
- a datatype;
- a unit of measurement;
- a source reference;
- whether the value is observed or derived;
- a confidence designation where applicable;
- a provenance reference;
- and other information necessary to interpret or resolve the fact.
A DataFragment establishes the common semantic and contextual boundary for those facts.
Read the Machine Fact Objects specification →
Provenance
Source lineage is fundamental to a DataFragment because the fragment represents facts obtained from an identified source.
Provenance may be established at the fragment level when the facts share a common source, or individual Machine Fact Objects may reference different provenance objects when necessary.
Provenance information may include:
- a stable source or provenance identifier;
- the source title;
- a description of the source;
- the source creator or publisher;
- the canonical source location;
- an archive or source-file location;
- license or usage information;
- publication or effective dates;
- retrieval or import dates;
- source version information;
- source format;
- checksum or integrity information;
- and other lineage information required by the application.
The detailed structure and requirements for source lineage are defined by the WebMEM Provenance specification rather than by the DataFragment class itself.
Read the Provenance specification →
Entity and Context Scope
A DataFragment must be interpretable within a defined entity or contextual scope.
That scope may represent:
- a specific entity;
- a product or plan;
- a geographic area;
- a dataset record;
- a collection;
- a time period;
- or another explicitly defined context.
When multiple Machine Fact Objects apply to the same entity or context, the scope may be established once by the DataFragment and inherited by the facts it contains.
This avoids unnecessary duplication while preserving the meaning of each fact.
Example DataFragment
The following example shows a DataFragment represented using the current WebMEM HTML serialization.
<template
data-webmem-fragment
data-fragment-class="DataFragment"
data-fragment-id="plan-H5521-290-0-primary-care">
<section
data-entity-type="MedicarePlan"
data-entity-id="H5521-290-0">
<div data-field="in_primary">
<span data-role="defined-term">
Primary Care Visit
</span>
<p data-role="description">
Out-of-pocket cost for a primary care visit.
</p>
<data
data-role="value"
value="0"
data-type="number"
data-unit="USD">$0</data>
<meta
data-role="derived"
content="false">
<meta
data-role="confidence"
content="high">
<meta
data-role="provenance-ref"
content="#provenance-cms-pbp">
</div>
</section>
</template>
The fragment establishes that:
- the knowledge object is a
DataFragment; - the fragment has its own stable identity;
- the factual knowledge applies to Medicare plan
H5521-290-0; - the Machine Fact Object represents the primary care visit cost;
- the factual value is
0USD; - the value is source-observed rather than derived;
- and provenance information supporting the fact can be resolved through its provenance reference.
Multiple Facts Within a DataFragment
A DataFragment is not limited to a single Machine Fact Object.
When multiple source-observed facts share the same entity, source, and semantic context, they may be grouped within the same DataFragment.
<template
data-webmem-fragment
data-fragment-class="DataFragment"
data-fragment-id="plan-H5521-290-0-costs">
<section
data-entity-type="MedicarePlan"
data-entity-id="H5521-290-0"
data-provenance-ref="#provenance-cms-plan-data">
<div data-field="monthly_premium">
<span data-role="defined-term">Monthly Premium</span>
<data
data-role="value"
value="35.00"
data-type="number"
data-unit="USD">$35.00</data>
<meta data-role="derived" content="false">
</div>
<div data-field="drug_deductible">
<span data-role="defined-term">Drug Deductible</span>
<data
data-role="value"
value="250"
data-type="number"
data-unit="USD">$250</data>
<meta data-role="derived" content="false">
</div>
</section>
</template>
In this example, entity and provenance context are established once for the fragment and apply to both Machine Fact Objects.
DataFragment vs. DerivedStatsFragment
| DataFragment | DerivedStatsFragment |
|---|---|
| Represents source-observed facts. | Represents facts created through calculation, aggregation, summarization, or analysis. |
| Preserves values obtained from an identified source. | Preserves the relationship between derived values and the source facts or datasets from which they were produced. |
| Example: a plan’s published monthly premium. | Example: the average monthly premium across all plans in a county. |
| Example: an enrollment value reported by the source. | Example: the percentage of enrollment represented by a defined subset of plans. |
The distinction describes the origin of the published knowledge, not merely its datatype or presentation.
DataFragment and Resolution
A DataFragment may participate in machine resolution when its facts contain identifiers, entity references, canonical resources, or relationships to other WebMEM knowledge objects.
The DataFragment itself does not define the WebMEM Resolution Model. Instead, its facts and entity context may participate in resolution structures defined elsewhere in the SDT.
For example, a DataFragment may publish a contract identifier as a source-observed fact while an IndexFragment, identity structure, relationship, or resolver provides the path from that identifier to another canonical resource.
This preserves the semantic role of the DataFragment: publishing source-observed factual knowledge.
Conformance
A conforming DataFragment must:
- identify itself as a
DataFragment; - have an identifiable fragment scope;
- associate its facts with a defined entity or context;
- contain one or more factual values represented according to the WebMEM fact model;
- represent source-observed rather than publisher-derived factual knowledge;
- identify or reference the source and provenance supporting those facts;
- and conform to the applicable WebMEM serialization requirements.
Additional requirements may apply under domain-specific profiles or future protocol extensions.
Relationship to WebMEM 1.x
The DataFragment class originated in the WebMEM 1.x Semantic Data Template specification and remains a defined fragment class in the current WebMEM Protocol.
Earlier specifications described a DataFragment as the smallest atomic unit of structured memory and serialized the fragment using YAML-in-HTML.
The current protocol clarifies the architecture:
- DataFragment is the modular knowledge object.
- Machine Fact Object is the atomic factual unit within the fragment.
- HTML-in-HTML is the current web serialization.
The semantic purpose of DataFragment remains the publication of source-observed factual knowledge.