PageSeeder fragments can be classified in different ways. This article explains what these are and when to use them.
There are four kinds of fragments in PSML, which are very different by nature because their content are fundamentally incompatible with each other. This is why they are expressed using different elements:
<fragment>
– can contain any PSML block and inline elements except properties.<xref-fragment>
– can only contain a sequence of block xrefs.<properties-fragment>
– can only contain properties.<media-fragment>
– is a container for non-PSML content (plain text, mathml, etc...).They are processed differently in PageSeeder: different editors, representation and transformations in the output.
It is a fixed set defined by PSML and cannot be changed.
The equivalent in biological classification would be “kingdom” (e.g. plants, animals, fungi, bacteria).
Fragment types are used to define a set of semantics and structural constraints on a fragment using templates or Schematron rules. They are both specific, intrinsic to the fragment and immutable. In other words, create the fragment typed (or untyped) and never change type. Fragments of different types can, however, share similar semantics or structures with other fragments, but they are expected to have their own internal structures.
They are defined by developers or designers of the system. PageSeeder doesn’t have default types—all default fragments are untyped. Adding or removing types generally requires additional testing or to be prompted by new requirements as they tend to have functional implications.
If you find that you need to change the type of a fragment, then it probably shouldn’t be a type in the first place. This is why the fragment types can only be changed by developers in the developer editor, because even though they are not fundamentally incompatible, changing the type could introduce incompatibilities and shouldn’t be a benign change.
If you find that you need to combine fragment types, it would also be a good indicator that it shouldn’t be a type either.
If you find that you use types without any associated templates, consider whether a type is necessary.
The equivalent in biological classification would be “species” (e.g. giraffe, jaguar, meerkat, etc...).
Fragment labels define additive characteristics for a fragment and might be shared by fragments of different types or kinds. You can combine labels and use the same set or subset of labels with different fragment types or kind. The list of labels for a fragment can be changed, so you can safely change the labels on a fragment.
Available labels can be defined by end users and developers. Because they are highly specific to an app, they are completely opaque to PageSeeder. It is up to the developer to define what they mean in the system: they could be used for sorting, organizing, formatting, etc...
So if you want to turn a list of labels into a list of classes for formatting that is perfectly fine—though you need to change the XSLT for that.
In biology, they would be like the characteristics of an individual (e.g. size, hair color, etc...).
The PageSeeder user manual
© Allette Systems (Australia)