← Prev in month ← Prev in thread

topic content model

From
Robert Stayton
Date
2010-06-23T15:58:00+00:00
ID
Thread
topic content model
Hi,
I'm completing my action item to republish the content model for the new topic
element.  Here is a RNC customization layer that I completed, but I'm not sure it is
syntactically correct as my RNC is a bit rusty.  I think you get the idea, though.

default namespace = "http://docbook.org/ns/docbook"
namespace db = "http://docbook.org/ns/docbook"
namespace xlink = "http://www.w3.org/1999/xlink"
namespace s = "http://www.ascc.net/xml/schematron"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"

include "docbook.rnc" inherit = db {

start =
  (db.set

| db.book

| db.divisions

| db.components

| db.navigation.components

| db.section

| db.para)
  | (db.sect1 | db.sect2 | db.sect3 | db.sect4 | db.sect5)
  | (db.refentry | db.refsection)
  | (db.refsect1 | db.refsect2 | db.refsect3)
  | db.setindex
  | dbx.topic

db.toplevel.sections =
  ((db.section+, db.simplesect*) | db.simplesect+)
  | (db.sect1+, db.simplesect*)
  | db.refentry+
  | dbx.topic+

db.ubiq.inlines =

(db.inlinemediaobject

| db.remark

| db.superscript

| db.subscript

| db.link.inlines

| db.alt)

| db.annotation

| db.indexterm

| dbx.relatedlink
}

dbx.topic =

element topic {

dbx.topic.attlist,

dbx.topic.info,

db.recursive.blocks.or.sections,

db.navigation.components*

}

dbx.topic.type.attribute =
  attribute type { text }

dbx.topic.attlist = db.section.attlist  & dbx.topic.type.attribute?
dbx.topic.info = db._info.title.req

dbx.relatedlink =

element relatedlink {

dbx.relatedlink.attlist

}

dbx.relatedlink.type.attribute =

attribute type { text }

dbx.relatedlink.role.attribute =

attribute role { text }

dbx.relatedlink.attlist =

db.common.attributes

& dbx.relatedlink.role.attribute?

& dbx.relatedlink.type.attribute?

& db.href.attribute ?

& db.endterm.attribute?

& db.olink.targetptr.attribute?

& db.olink.targetdoc.attribute?

& db.xrefstyle.attribute?

Bob Stayton
Sagehill Enterprises
← Prev in month ← Prev in thread