A Minimally-Complete ZedAI Profile

What exactly constitutes a minimally complete profile is an interesting question, and one we didn’t detail while developing the core profiles, because, well, we weren’t making any minimally complete profiles.

But if you’re planning to create a new profile, it’s a question you’re going to have to sit down and solve. I have to create a couple of new profiles now, so thought I’d write some thoughts on the subject.

When starting a new profile, you’re not going to get too far without the z3998-document.rng module, which defines the core structure for all compliant documents.

To round out your minimal profile, you now just need to include the following modules:

  • z3998-datatypes.rng — datatypes used to define elements and attributes
  • z3998-global-classes.rng — defines the default classes
  • z3998-core-attrib.rng — required attributes
  • z3998-meta.rng — needed to define require document metadata
  • z3998-section.rng — defines default member for the Section class
  • z3998-block.rng — defines default member for the Block class
  • z3998-span.rng — defines default member for the Phrase class
  • z3998-role-attrib.rng — for metadata inflection on elements
  • rdfa-attrib.rng — required RDFa attributes for metadata (plus you’ll need to define your default profile here by overriding rdfa.profile.attrib.content
  • z3998-headings.rng — required by the section module
  • z3998-linking.rng — needed ref attribute for linking
  • xlink.rng — supplements the required linking module

As we’re going for minimal compliance, you’re going to find a lot of empty default classes. At the outset, your schema driver file will need to override these definitions in order to be valid:

  • z3998.Global.extra.class
  • z3998.Section.extern.class
  • z3998.Block.variant.class
  • z3998.Block.extern.class
  • z3998.Phrase.variant.class
  • z3998.Phrase.extern.class
  • z3998.Text.core.class
  • z3998.Text.extern.class

In reality, as you fill in your profile with content, the need for these placeholder definitions will disappear and you’ll be able to remove the override classes.

Here’s the minimal driver file that meets all the above requirements. Of course, you’ll need to go to the ZedAI development site and get the latest Core Modules.