Pouziti upravene RelaxNG v XMLmindu

Jan Tošovský j.tosovsky na tiscali.cz
Středa Březen 26 19:43:32 CET 2008


> Žádné schéma nevidím

Bylo to v prilozenem zipu. Takze to davam primo do tela prispevku:

docbook.rnc:
================== zacatek ==================
default namespace db = "http://docbook.org/ns/docbook"

include "docbook_orig.rnc" inherit = db {

  # ================
  # remove elements
  # ================
  
  db.abbrev = notAllowed
  db.abstract = notAllowed
  db.accel = notAllowed
  db.acknowledgements = notAllowed
  db.acronym = notAllowed
# db.address = notAllowed
# db.affiliation = notAllowed
  db.alt = notAllowed
  db.anchor = notAllowed
  db.annotation = notAllowed
  db.answer = notAllowed
# db.appendix = notAllowed
  db.application = notAllowed
  db.arc = notAllowed
  db.area.inareaset  = notAllowed
  db.area = notAllowed
  db.areaset = notAllowed
  db.areaspec = notAllowed
  db.arg = notAllowed
# db.article = notAllowed
  db.artpagenums = notAllowed
  db.attribution = notAllowed
  db.audiodata = notAllowed
  db.audioobject = notAllowed
# db.author = notAllowed
# db.authorgroup = notAllowed
  db.authorinitials = notAllowed
  db.bibliocoverage = notAllowed
  db.bibliodiv = notAllowed
  db.biblioentry = notAllowed
  db.bibliography = notAllowed
  db.biblioid = notAllowed
  db.bibliolist = notAllowed
  db.bibliomisc = notAllowed
  db.bibliomixed = notAllowed
  db.bibliomset = notAllowed
  db.biblioref = notAllowed
  db.bibliorelation = notAllowed
  db.biblioset = notAllowed
  db.bibliosource = notAllowed
  db.blockquote = notAllowed
# db.book = notAllowed
  db.bridgehead = notAllowed
  db.callout = notAllowed
  db.calloutlist = notAllowed
# db.caption = notAllowed
  db.html.caption = notAllowed
  db.caution = notAllowed
# db.chapter = notAllowed
  db.citation = notAllowed
  db.citebiblioid = notAllowed
  db.citerefentry = notAllowed
  db.citetitle = notAllowed
  db.city = notAllowed
  db.classname = notAllowed
  db.classsynopsis = notAllowed
  db.classsynopsisinfo = notAllowed
  db.cmdsynopsis = notAllowed
  db.co = notAllowed
  db.code = notAllowed
# db.col = notAllowed
# db.colgroup = notAllowed
# db.collab = notAllowed
  db.colophon = notAllowed
# db.colspec = notAllowed
  db.command = notAllowed
  db.computeroutput = notAllowed
  db.confdates = notAllowed
  db.confgroup = notAllowed
  db.confnum = notAllowed
  db.confsponsor = notAllowed
  db.conftitle = notAllowed
  db.constant = notAllowed
  db.constraint = notAllowed
  db.constraintdef = notAllowed
  db.constructorsynopsis = notAllowed
  db.contractnum = notAllowed
  db.contractsponsor = notAllowed
  db.contrib = notAllowed
# db.copyright = notAllowed
  db.coref = notAllowed
  db.country = notAllowed
  db.cover = notAllowed
  db.database = notAllowed
  db.date = notAllowed
  db.dedication = notAllowed
  db.destructorsynopsis = notAllowed
# db.edition = notAllowed
# db.editor = notAllowed
# db.email = notAllowed
  db._emphasis = notAllowed
# db.emphasis = notAllowed
# db.entry = notAllowed
  db.entrytbl = notAllowed
  db.envar = notAllowed
  db.epigraph = notAllowed
  db.equation = notAllowed
  db.errorcode = notAllowed
  db.errorname = notAllowed
  db.errortext = notAllowed
  db.errortype = notAllowed
# db.example = notAllowed
  db.exceptionname = notAllowed
  db.extendedlink = notAllowed
  db.fax = notAllowed
  db.fieldsynopsis = notAllowed
# db.figure = notAllowed
  db.filename = notAllowed
# db.firstname = notAllowed
  db.firstterm = notAllowed
  db.footnote = notAllowed
  db.footnoteref = notAllowed
  db.foreignphrase = notAllowed
# db.formalpara = notAllowed
  db.funcdef = notAllowed
  db.funcparams = notAllowed
  db.funcprototype = notAllowed
  db.funcsynopsis = notAllowed
  db.funcsynopsisinfo = notAllowed
  db.function = notAllowed
# db.glossary = notAllowed
# db.glossdef = notAllowed
# db.glossdiv = notAllowed
# db.glossentry = notAllowed
# db.glosslist = notAllowed
  db.glosssee = notAllowed
  db.glossseealso = notAllowed
# db.glossterm = notAllowed
  db.group = notAllowed
  db.guibutton = notAllowed
  db.guiicon = notAllowed
# db.guilabel = notAllowed
  db.guimenu = notAllowed
  db.guimenuitem = notAllowed
  db.guisubmenu = notAllowed
  db.hardware = notAllowed
# db.holder = notAllowed
  db.honorific = notAllowed
# db.html:button = notAllowed
# db.html:fieldset = notAllowed
# db.html:form = notAllowed
# db.html:input = notAllowed
# db.html:label = notAllowed
# db.html:legend = notAllowed
# db.html:option = notAllowed
# db.html:select = notAllowed
# db.html:textarea = notAllowed
  db.imagedata.mathml = notAllowed
  db.imagedata.svg = notAllowed
# db.imagedata = notAllowed
# db.imageobject = notAllowed
  db.imageobjectco = notAllowed
  db.important = notAllowed
# db.index = notAllowed
  db.indexdiv = notAllowed
  db.indexentry = notAllowed
  db.indexterm.endofrange = notAllowed
# db.indexterm.singular = notAllowed
  db.indexterm.startofrange = notAllowed
# db.info = notAllowed
  db.titleforbidden.info = notAllowed
  db.titleonly.info = notAllowed
  db.titleonlyreq.info = notAllowed
# db.titlereq.info = notAllowed
  db.informalequation = notAllowed
# db.informalexample = notAllowed
# db.informalfigure = notAllowed
# db.cals.informaltable = notAllowed
  db.html.informaltable = notAllowed
  db.initializer = notAllowed
  db.inlineequation = notAllowed
# db.inlinemediaobject = notAllowed
  db.interfacename = notAllowed
  db.issuenum = notAllowed
# db.itemizedlist = notAllowed
  db.itermset = notAllowed
# db.jobtitle = notAllowed
  db.keycap = notAllowed
  db.keycode = notAllowed
  db.keycombo = notAllowed
  db.keysym = notAllowed
  db.keyword = notAllowed
  db.keywordset = notAllowed
  db.label = notAllowed
# db.legalnotice = notAllowed
  db.lhs = notAllowed
  db.lineage = notAllowed
  db.lineannotation = notAllowed
# db.link = notAllowed
# db.listitem = notAllowed
# db.literal = notAllowed
  db.literallayout = notAllowed
  db.locator = notAllowed
  db.manvolnum = notAllowed
  db.markup = notAllowed
  db.mathphrase = notAllowed
# db.mediaobject = notAllowed
# db.member = notAllowed
  db.menuchoice = notAllowed
  db.methodname = notAllowed
  db.methodparam = notAllowed
  db.methodsynopsis = notAllowed
  db.modifier = notAllowed
  db.mousebutton = notAllowed
  db.msg = notAllowed
  db.msgaud = notAllowed
  db.msgentry = notAllowed
  db.msgexplan = notAllowed
  db.msginfo = notAllowed
  db.msglevel = notAllowed
  db.msgmain = notAllowed
  db.msgorig = notAllowed
  db.msgrel = notAllowed
  db.msgset = notAllowed
  db.msgsub = notAllowed
  db.msgtext = notAllowed
  db.nonterminal = notAllowed
# db.note = notAllowed
  db.olink = notAllowed
  db.ooclass = notAllowed
  db.ooexception = notAllowed
  db.oointerface = notAllowed
  db.option = notAllowed
  db.optional = notAllowed
# db.orderedlist = notAllowed
  db.org = notAllowed
  db.orgdiv = notAllowed
# db.orgname = notAllowed
# db.otheraddr = notAllowed
  db.othercredit = notAllowed
  db.othername = notAllowed
  db.package = notAllowed
  db.pagenums = notAllowed
# db.para = notAllowed
  db.paramdef = notAllowed
  db.parameter = notAllowed
  db.part = notAllowed
  db.partintro = notAllowed
  db.person = notAllowed
  db.personblurb = notAllowed
# db.personname = notAllowed
  db.phone = notAllowed
  db._phrase = notAllowed
# db.phrase = notAllowed
  db.pob = notAllowed
  db.postcode = notAllowed
  db.preface = notAllowed
# db.primary = notAllowed
  db.primaryie = notAllowed
  db.printhistory = notAllowed
  db.procedure = notAllowed
  db.production = notAllowed
  db.productionrecap = notAllowed
  db.productionset = notAllowed
  db.productname = notAllowed
# db.productnumber = notAllowed
# db.programlisting = notAllowed
  db.programlistingco = notAllowed
  db.prompt = notAllowed
  db.property = notAllowed
  db.pubdate = notAllowed
  db.publisher = notAllowed
  db.publishername = notAllowed
  db.qandadiv = notAllowed
  db.qandaentry = notAllowed
  db.qandaset = notAllowed
  db.question = notAllowed
  db.quote = notAllowed
  db.refclass = notAllowed
  db.refdescriptor = notAllowed
  db.refentry = notAllowed
  db.refentrytitle = notAllowed
  db.reference = notAllowed
  db.refmeta = notAllowed
  db.refmiscinfo = notAllowed
  db.refname = notAllowed
  db.refnamediv = notAllowed
  db.refpurpose = notAllowed
  db.refsect1 = notAllowed
  db.refsect2 = notAllowed
  db.refsect3 = notAllowed
  db.refsection = notAllowed
  db.refsynopsisdiv = notAllowed
# db.releaseinfo = notAllowed
  db.remark = notAllowed
  db.replaceable = notAllowed
  db.returnvalue = notAllowed
  db.revdescription = notAllowed
  db.revhistory = notAllowed
  db.revision = notAllowed
  db.revnumber = notAllowed
  db.revremark = notAllowed
  db.rhs = notAllowed
  db.entrytbl.row = notAllowed
# db.row = notAllowed
  db.sbr = notAllowed
  db.screen = notAllowed
  db.screenco = notAllowed
  db.screenshot = notAllowed
# db.secondary = notAllowed
  db.secondaryie = notAllowed
  db.sect1 = notAllowed
  db.sect2 = notAllowed
  db.sect3 = notAllowed
  db.sect4 = notAllowed
  db.sect5 = notAllowed
# db.section = notAllowed
# db.see = notAllowed
# db.seealso = notAllowed
  db.seealsoie = notAllowed
  db.seeie = notAllowed
  db.seg = notAllowed
  db.seglistitem = notAllowed
  db.segmentedlist = notAllowed
  db.segtitle = notAllowed
  db.seriesvolnums = notAllowed
  db.set = notAllowed
  db.setindex = notAllowed
  db.shortaffil = notAllowed
  db.shortcut = notAllowed
# db.sidebar = notAllowed
  db.simpara = notAllowed
# db.simplelist = notAllowed
  db.simplemsgentry = notAllowed
# db.simplesect = notAllowed
  db.spanspec = notAllowed
  db.state = notAllowed
  db.step = notAllowed
  db.stepalternatives = notAllowed
  db.street = notAllowed
  db.subject = notAllowed
  db.subjectset = notAllowed
  db.subjectterm = notAllowed
# db.subscript = notAllowed
  db.substeps = notAllowed
# db.subtitle = notAllowed
# db.superscript = notAllowed
# db.surname = notAllowed
  db.symbol = notAllowed
  db.synopfragment = notAllowed
  db.synopfragmentref = notAllowed
  db.synopsis = notAllowed
  db.systemitem = notAllowed
# db.cals.table = notAllowed
  db.html.table = notAllowed
  db.tag = notAllowed
  db.task = notAllowed
  db.taskprerequisites = notAllowed
  db.taskrelated = notAllowed
  db.tasksummary = notAllowed
  db.cals.entrytbl.tbody = notAllowed
# db.cals.tbody = notAllowed
  db.html.tbody = notAllowed
# db.td = notAllowed
  db.term = notAllowed
  db.termdef = notAllowed
# db.tertiary = notAllowed
  db.tertiaryie = notAllowed
  db.textdata = notAllowed
  db.textobject = notAllowed
# db.cals.tfoot = notAllowed
  db.html.tfoot = notAllowed
# db.tgroup = notAllowed
# db.th = notAllowed
  db.cals.entrytbl.thead = notAllowed
# db.cals.thead = notAllowed
  db.html.thead = notAllowed
  db.tip = notAllowed
# db.title = notAllowed
# db.titleabbrev = notAllowed
# db.toc = notAllowed
  db.tocdiv = notAllowed
  db.tocentry = notAllowed
  db.token = notAllowed
# db.tr = notAllowed
  db.trademark = notAllowed
  db.type = notAllowed
  db.uri = notAllowed
  db.userinput = notAllowed
  db.varargs = notAllowed
# db.variablelist = notAllowed
# db.varlistentry = notAllowed
  db.varname = notAllowed
  db.videodata = notAllowed
  db.videoobject = notAllowed
  db.void = notAllowed
  db.volumenum = notAllowed
# db.warning = notAllowed
  db.wordasword = notAllowed
# db.xref = notAllowed
# db.year = notAllowed
  
  # ==================
  # reduce attributes
  # ==================

  db.effectivity.attributes = empty
  db.effectivity.attributes &= 
# db.arch.attribute?
# & db.audience.attribute?
    db.condition.attribute?
# & db.conformance.attribute?
  & db.os.attribute?
  & db.revision.attribute?
# & db.security.attribute?
# & db.userlevel.attribute?
  & db.vendor.attribute?
# & db.wordsize.attribute?

  db.common.base.attributes = empty
  db.common.base.attributes &= 
  db.version.attribute?
  & db.xml.lang.attribute?
# & db.xml.base.attribute?
# & db.remap.attribute?
# & db.xreflabel.attribute?
  & db.revisionflag.attribute?
# & db.dir.attribute?
  & db.effectivity.attributes

  db.common.attributes = empty
  db.common.attributes &=
  db.xml.id.attribute?
  & db.common.base.attributes
# & db.annotations.attribute?

  db.href.attributes = empty
  db.href.attributes &=
  db.xlink.href.attribute
# & db.xlink.type.attribute?
  & db.xlink.role.attribute?
# & db.xlink.arcrole.attribute?
  & db.xlink.title.attribute?
# & db.xlink.show.attribute?
# & db.xlink.actuate.attribute?
  
}

============ konec ============

simpleRNG:
============= zacatek =============
<book xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
   <info>
      <title>Test</title>
   </info>
   <chapter>
      <title>Chapter</title>
         <variablelist>
            <varlistentry>
               <term>Term</term>
               <listitem>
                  <para>Listitem</para>
               </listitem>
            </varlistentry>
         </variablelist>
   </chapter>
</book>
============ konec ============




Další informace o konferenci Docbook