diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-17 20:07:05 +0000 |
---|---|---|
committer | <> | 2015-07-07 10:18:30 +0000 |
commit | 802da9dd5d4bc18f46a916eedc0c5c1980a15e59 (patch) | |
tree | f78a8637465b7a4c9624fef03d27eb7aeaa779d4 /slides/schema/relaxng/programming.rng | |
parent | 18f63104106b81bf37ca1af774d7be38051e5444 (diff) | |
download | docbook-xsl-802da9dd5d4bc18f46a916eedc0c5c1980a15e59.tar.gz |
Imported from /home/lorry/working-area/delta_docbook-xsl/docbook-xsl-1.78.1.tar.bz2.HEADdocbook-xsl-1.78.1master
Diffstat (limited to 'slides/schema/relaxng/programming.rng')
-rw-r--r-- | slides/schema/relaxng/programming.rng | 1116 |
1 files changed, 1116 insertions, 0 deletions
diff --git a/slides/schema/relaxng/programming.rng b/slides/schema/relaxng/programming.rng new file mode 100644 index 0000000..6a14e9d --- /dev/null +++ b/slides/schema/relaxng/programming.rng @@ -0,0 +1,1116 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + This file is part of DocBook V5.0 + + Copyright 1992-2008 HaL Computer Systems, Inc., + O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software + Corporation, Norman Walsh, Sun Microsystems, Inc., and the + Organization for the Advancement of Structured Information + Standards (OASIS). + + Release: $Id: pool.rnc 7466 2007-09-27 14:03:55Z nwalsh $ + + Permission to use, copy, modify and distribute the DocBook schema + and its accompanying documentation for any purpose and without fee + is hereby granted in perpetuity, provided that the above copyright + notice and this paragraph appear in all copies. The copyright + holders make no representation about the suitability of the schema + for any purpose. It is provided "as is" without expressed or implied + warranty. + + If you modify the DocBook schema in any way, label your schema as a + variant of DocBook. See the reference documentation + (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook) + for more information. + + Please direct all questions, bug reports, or suggestions for changes + to the docbook@lists.oasis-open.org mailing list. For more + information, see http://www.oasis-open.org/docbook/. + + ====================================================================== +--> +<grammar ns="http://docbook.org/ns/docbook" xmlns:db="http://docbook.org/ns/docbook" xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:ctrl="http://nwalsh.com/xmlns/schema-control/" xmlns="http://relaxng.org/ns/structure/1.0"> + <start combine="choice"> + <choice> + <ref name="db.synopsis.blocks"/> + <ref name="db.funcsynopsisinfo"/> + <ref name="db.classsynopsisinfo"/> + </choice> + </start> + <define name="db.domain.inlines" combine="choice"> + <ref name="db.programming.inlines"/> + </define> + <define name="db.nopara.blocks" combine="choice"> + <ref name="db.synopsis.blocks"/> + </define> + <define name="db.cover.contentmodel" combine="choice"> + <ref name="db.synopsis.blocks"/> + </define> + <define name="db.verbatim.blocks" combine="choice"> + <choice> + <ref name="db.programlisting"/> + <ref name="db.synopsis"/> + </choice> + </define> + <define name="db.programming.inlines"> + <choice> + <ref name="db.function"/> + <ref name="db.parameter"/> + <ref name="db.varname"/> + <ref name="db.returnvalue"/> + <ref name="db.type"/> + <ref name="db.classname"/> + <ref name="db.exceptionname"/> + <ref name="db.interfacename"/> + <ref name="db.methodname"/> + <ref name="db.modifier"/> + <ref name="db.initializer"/> + <ref name="db.oo.inlines"/> + </choice> + </define> + <define name="db.oo.inlines"> + <choice> + <ref name="db.ooclass"/> + <ref name="db.ooexception"/> + <ref name="db.oointerface"/> + </choice> + </define> + <define name="db.synopsis.blocks"> + <choice> + <ref name="db.funcsynopsis"/> + <ref name="db.classsynopsis"/> + <ref name="db.methodsynopsis"/> + <ref name="db.constructorsynopsis"/> + <ref name="db.destructorsynopsis"/> + <ref name="db.fieldsynopsis"/> + </choice> + </define> + <!-- ====================================================================== --> + <div> + <db:refname>synopsis</db:refname> + <db:refpurpose>A general-purpose element for representing the syntax of commands or functions</db:refpurpose> + <define name="db.synopsis.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.synopsis.label.attribute"> + <ref name="db.label.attribute"/> + </define> + <define name="db.synopsis.attlist"> + <interleave> + <optional> + <ref name="db.synopsis.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <ref name="db.verbatim.attributes"/> + <optional> + <ref name="db.synopsis.label.attribute"/> + </optional> + </interleave> + </define> + <define name="db.synopsis"> + <element name="synopsis"> + <ref name="db.synopsis.attlist"/> + <ref name="db.verbatim.contentmodel"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>funcsynopsis</db:refname> + <db:refpurpose>The syntax summary for a function definition</db:refpurpose> + <define name="db.funcsynopsis.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.funcsynopsis.attlist"> + <interleave> + <optional> + <ref name="db.funcsynopsis.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <optional> + <ref name="db.language.attribute"/> + </optional> + </interleave> + </define> + <define name="db.funcsynopsis.info"> + <ref name="db._info.title.forbidden"/> + </define> + <define name="db.funcsynopsis"> + <element name="funcsynopsis"> + <ref name="db.funcsynopsis.attlist"/> + <ref name="db.funcsynopsis.info"/> + <oneOrMore> + <choice> + <ref name="db.funcsynopsisinfo"/> + <ref name="db.funcprototype"/> + </choice> + </oneOrMore> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>funcsynopsisinfo</db:refname> + <db:refpurpose>Information supplementing the funcdefs of a funcsynopsis</db:refpurpose> + <define name="db.funcsynopsisinfo.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.funcsynopsisinfo.attlist"> + <interleave> + <optional> + <ref name="db.funcsynopsisinfo.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <ref name="db.verbatim.attributes"/> + </interleave> + </define> + <define name="db.funcsynopsisinfo"> + <element name="funcsynopsisinfo"> + <ref name="db.funcsynopsisinfo.attlist"/> + <ref name="db.verbatim.contentmodel"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>funcprototype</db:refname> + <db:refpurpose>The prototype of a function</db:refpurpose> + <define name="db.funcprototype.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.funcprototype.attlist"> + <interleave> + <optional> + <ref name="db.funcprototype.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.funcprototype"> + <element name="funcprototype"> + <ref name="db.funcprototype.attlist"/> + <zeroOrMore> + <ref name="db.modifier"/> + </zeroOrMore> + <ref name="db.funcdef"/> + <choice> + <ref name="db.void"/> + <ref name="db.varargs"/> + <group> + <oneOrMore> + <choice> + <ref name="db.paramdef"/> + <ref name="db.group.paramdef"/> + </choice> + </oneOrMore> + <optional> + <ref name="db.varargs"/> + </optional> + </group> + </choice> + <zeroOrMore> + <ref name="db.modifier"/> + </zeroOrMore> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>funcdef</db:refname> + <db:refpurpose>A function (subroutine) name and its return type</db:refpurpose> + <define name="db.funcdef.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.funcdef.attlist"> + <interleave> + <optional> + <ref name="db.funcdef.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.funcdef"> + <element name="funcdef"> + <ref name="db.funcdef.attlist"/> + <zeroOrMore> + <choice> + <ref name="db._text"/> + <ref name="db.type"/> + <ref name="db.function"/> + </choice> + </zeroOrMore> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>function</db:refname> + <db:refpurpose>The name of a function or subroutine, as in a programming language</db:refpurpose> + <define name="db.function.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.function.attlist"> + <interleave> + <optional> + <ref name="db.function.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.function"> + <element name="function"> + <ref name="db.function.attlist"/> + <ref name="db._text"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>void</db:refname> + <db:refpurpose>An empty element in a function synopsis indicating that the function in question takes no arguments</db:refpurpose> + <define name="db.void.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.void.attlist"> + <interleave> + <optional> + <ref name="db.void.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.void"> + <element name="void"> + <ref name="db.void.attlist"/> + <empty/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>varargs</db:refname> + <db:refpurpose>An empty element in a function synopsis indicating a variable number of arguments</db:refpurpose> + <define name="db.varargs.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.varargs.attlist"> + <interleave> + <optional> + <ref name="db.varargs.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.varargs"> + <element name="varargs"> + <ref name="db.varargs.attlist"/> + <empty/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>group</db:refname> + <db:refpurpose>A group of parameters</db:refpurpose> + <define name="db.group.paramdef.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.group.paramdef.choice.attribute"> + <ref name="db.choice.opt.attribute"/> + </define> + <define name="db.group.paramdef.attlist"> + <interleave> + <optional> + <ref name="db.group.paramdef.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <optional> + <ref name="db.group.paramdef.choice.attribute"/> + </optional> + </interleave> + </define> + <define name="db.group.paramdef"> + <element name="group"> + <ref name="db.group.paramdef.attlist"/> + <oneOrMore> + <choice> + <ref name="db.paramdef"/> + <ref name="db.group.paramdef"/> + </choice> + </oneOrMore> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>paramdef</db:refname> + <db:refpurpose>Information about a function parameter in a programming language</db:refpurpose> + <define name="db.paramdef.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.paramdef.choice.enumeration"> + <choice> + <value>opt</value> + <a:documentation>Formatted to indicate that it is optional.</a:documentation> + <value>req</value> + <a:documentation>Formatted to indicate that it is required.</a:documentation> + </choice> + </define> + <define name="db.paramdef.choice.attribute"> + <attribute name="choice" a:defaultValue="opt"> + <db:refpurpose>Indicates optionality.</db:refpurpose> + <ref name="db.paramdef.choice.enumeration"/> + </attribute> + </define> + <define name="db.paramdef.attlist"> + <interleave> + <optional> + <ref name="db.paramdef.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <optional> + <ref name="db.paramdef.choice.attribute"/> + </optional> + </interleave> + </define> + <define name="db.paramdef"> + <element name="paramdef"> + <ref name="db.paramdef.attlist"/> + <zeroOrMore> + <choice> + <ref name="db._text"/> + <ref name="db.initializer"/> + <ref name="db.type"/> + <ref name="db.parameter"/> + <ref name="db.funcparams"/> + </choice> + </zeroOrMore> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>funcparams</db:refname> + <db:refpurpose>Parameters for a function referenced through a function pointer in a synopsis</db:refpurpose> + <define name="db.funcparams.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.funcparams.attlist"> + <interleave> + <optional> + <ref name="db.funcparams.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.funcparams"> + <element name="funcparams"> + <ref name="db.funcparams.attlist"/> + <ref name="db._text"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>classsynopsis</db:refname> + <db:refpurpose>The syntax summary for a class definition</db:refpurpose> + <define name="db.classsynopsis.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.classsynopsis.class.enumeration"> + <choice> + <value>class</value> + <a:documentation>This is the synopsis of a class</a:documentation> + <value>interface</value> + <a:documentation>This is the synopsis of an interface</a:documentation> + </choice> + </define> + <define name="db.classsynopsis.class.attribute"> + <attribute name="class"> + <db:refpurpose>Specifies the nature of the synopsis</db:refpurpose> + <ref name="db.classsynopsis.class.enumeration"/> + </attribute> + </define> + <define name="db.classsynopsis.attlist"> + <interleave> + <optional> + <ref name="db.classsynopsis.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <optional> + <ref name="db.language.attribute"/> + </optional> + <optional> + <ref name="db.classsynopsis.class.attribute"/> + </optional> + </interleave> + </define> + <define name="db.classsynopsis"> + <element name="classsynopsis"> + <ref name="db.classsynopsis.attlist"/> + <oneOrMore> + <ref name="db.oo.inlines"/> + </oneOrMore> + <zeroOrMore> + <choice> + <ref name="db.classsynopsisinfo"/> + <ref name="db.methodsynopsis"/> + <ref name="db.constructorsynopsis"/> + <ref name="db.destructorsynopsis"/> + <ref name="db.fieldsynopsis"/> + </choice> + </zeroOrMore> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>classsynopsisinfo</db:refname> + <db:refpurpose>Information supplementing the contents of a classsynopsis</db:refpurpose> + <define name="db.classsynopsisinfo.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.classsynopsisinfo.attlist"> + <interleave> + <optional> + <ref name="db.classsynopsisinfo.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <ref name="db.verbatim.attributes"/> + </interleave> + </define> + <define name="db.classsynopsisinfo"> + <element name="classsynopsisinfo"> + <ref name="db.classsynopsisinfo.attlist"/> + <ref name="db.verbatim.contentmodel"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>ooclass</db:refname> + <db:refpurpose>A class in an object-oriented programming language</db:refpurpose> + <define name="db.ooclass.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.ooclass.attlist"> + <interleave> + <optional> + <ref name="db.ooclass.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.ooclass"> + <element name="ooclass"> + <ref name="db.ooclass.attlist"/> + <zeroOrMore> + <choice> + <ref name="db.package"/> + <ref name="db.modifier"/> + </choice> + </zeroOrMore> + <ref name="db.classname"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>oointerface</db:refname> + <db:refpurpose>An interface in an object-oriented programming language</db:refpurpose> + <define name="db.oointerface.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.oointerface.attlist"> + <interleave> + <optional> + <ref name="db.oointerface.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.oointerface"> + <element name="oointerface"> + <ref name="db.oointerface.attlist"/> + <zeroOrMore> + <choice> + <ref name="db.package"/> + <ref name="db.modifier"/> + </choice> + </zeroOrMore> + <ref name="db.interfacename"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>ooexception</db:refname> + <db:refpurpose>An exception in an object-oriented programming language</db:refpurpose> + <define name="db.ooexception.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.ooexception.attlist"> + <interleave> + <optional> + <ref name="db.ooexception.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.ooexception"> + <element name="ooexception"> + <ref name="db.ooexception.attlist"/> + <zeroOrMore> + <choice> + <ref name="db.package"/> + <ref name="db.modifier"/> + </choice> + </zeroOrMore> + <ref name="db.exceptionname"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <define name="db.modifier.xml.space.attribute"> + <attribute name="xml:space"> + <db:refpurpose>Can be used to indicate that whitespace in the modifier should be preserved (for multi-line annotations, for example).</db:refpurpose> + <value>preserve</value> + <a:documentation>Extra whitespace and line breaks must be preserved.</a:documentation> + <!-- + Ideally the definition of xml:space used on modifier would be + different from the definition used on the verbatim elements. The + verbatim elements forbid the use of xml:space="default" which + wouldn't be a problem on modifier. But doing that causes the + generated XSD schemas to be broken so I'm just reusing the existing + definition for now. It won't be backwards incompatible to fix this + problem in the future. + | ## Extra whitespace and line breaks are not preserved. + "default" + --> + </attribute> + </define> + <div> + <db:refname>modifier</db:refname> + <db:refpurpose>Modifiers in a synopsis</db:refpurpose> + <define name="db.modifier.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.modifier.attlist"> + <interleave> + <optional> + <ref name="db.modifier.xml.space.attribute"/> + </optional> + <optional> + <ref name="db.modifier.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.modifier"> + <element name="modifier"> + <ref name="db.modifier.attlist"/> + <ref name="db._text"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>interfacename</db:refname> + <db:refpurpose>The name of an interface</db:refpurpose> + <define name="db.interfacename.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.interfacename.attlist"> + <interleave> + <optional> + <ref name="db.interfacename.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.interfacename"> + <element name="interfacename"> + <ref name="db.interfacename.attlist"/> + <ref name="db._text"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>exceptionname</db:refname> + <db:refpurpose>The name of an exception</db:refpurpose> + <define name="db.exceptionname.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.exceptionname.attlist"> + <interleave> + <optional> + <ref name="db.exceptionname.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.exceptionname"> + <element name="exceptionname"> + <ref name="db.exceptionname.attlist"/> + <ref name="db._text"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>fieldsynopsis</db:refname> + <db:refpurpose>The name of a field in a class definition</db:refpurpose> + <define name="db.fieldsynopsis.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.fieldsynopsis.attlist"> + <interleave> + <optional> + <ref name="db.fieldsynopsis.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <optional> + <ref name="db.language.attribute"/> + </optional> + </interleave> + </define> + <define name="db.fieldsynopsis"> + <element name="fieldsynopsis"> + <ref name="db.fieldsynopsis.attlist"/> + <zeroOrMore> + <ref name="db.modifier"/> + </zeroOrMore> + <optional> + <ref name="db.type"/> + </optional> + <ref name="db.varname"/> + <optional> + <ref name="db.initializer"/> + </optional> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>initializer</db:refname> + <db:refpurpose>The initializer for a fieldsynopsis</db:refpurpose> + <define name="db.initializer.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.initializer.attlist"> + <interleave> + <optional> + <ref name="db.initializer.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.initializer.inlines"> + <ref name="db._text"/> + </define> + <define name="db.initializer"> + <element name="initializer"> + <ref name="db.initializer.attlist"/> + <zeroOrMore> + <ref name="db.initializer.inlines"/> + </zeroOrMore> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>constructorsynopsis</db:refname> + <db:refpurpose>A syntax summary for a constructor</db:refpurpose> + <define name="db.constructorsynopsis.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.constructorsynopsis.attlist"> + <interleave> + <optional> + <ref name="db.constructorsynopsis.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <optional> + <ref name="db.language.attribute"/> + </optional> + </interleave> + </define> + <define name="db.constructorsynopsis"> + <element name="constructorsynopsis"> + <ref name="db.constructorsynopsis.attlist"/> + <zeroOrMore> + <ref name="db.modifier"/> + </zeroOrMore> + <optional> + <ref name="db.methodname"/> + </optional> + <choice> + <oneOrMore> + <choice> + <ref name="db.methodparam"/> + <ref name="db.group.methodparam"/> + </choice> + </oneOrMore> + <optional> + <ref name="db.void"/> + </optional> + </choice> + <zeroOrMore> + <ref name="db.exceptionname"/> + </zeroOrMore> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>destructorsynopsis</db:refname> + <db:refpurpose>A syntax summary for a destructor</db:refpurpose> + <define name="db.destructorsynopsis.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.destructorsynopsis.attlist"> + <interleave> + <optional> + <ref name="db.destructorsynopsis.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <optional> + <ref name="db.language.attribute"/> + </optional> + </interleave> + </define> + <define name="db.destructorsynopsis"> + <element name="destructorsynopsis"> + <ref name="db.destructorsynopsis.attlist"/> + <zeroOrMore> + <ref name="db.modifier"/> + </zeroOrMore> + <optional> + <ref name="db.methodname"/> + </optional> + <choice> + <oneOrMore> + <choice> + <ref name="db.methodparam"/> + <ref name="db.group.methodparam"/> + </choice> + </oneOrMore> + <optional> + <ref name="db.void"/> + </optional> + </choice> + <zeroOrMore> + <ref name="db.exceptionname"/> + </zeroOrMore> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>methodsynopsis</db:refname> + <db:refpurpose>A syntax summary for a method</db:refpurpose> + <define name="db.methodsynopsis.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.methodsynopsis.attlist"> + <interleave> + <optional> + <ref name="db.methodsynopsis.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <optional> + <ref name="db.language.attribute"/> + </optional> + </interleave> + </define> + <define name="db.methodsynopsis"> + <element name="methodsynopsis"> + <ref name="db.methodsynopsis.attlist"/> + <zeroOrMore> + <ref name="db.modifier"/> + </zeroOrMore> + <optional> + <choice> + <ref name="db.type"/> + <ref name="db.void"/> + </choice> + </optional> + <ref name="db.methodname"/> + <choice> + <oneOrMore> + <choice> + <ref name="db.methodparam"/> + <ref name="db.group.methodparam"/> + </choice> + </oneOrMore> + <ref name="db.void"/> + </choice> + <zeroOrMore> + <ref name="db.exceptionname"/> + </zeroOrMore> + <zeroOrMore> + <ref name="db.modifier"/> + </zeroOrMore> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>methodname</db:refname> + <db:refpurpose>The name of a method</db:refpurpose> + <define name="db.methodname.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.methodname.attlist"> + <interleave> + <optional> + <ref name="db.methodname.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.methodname"> + <element name="methodname"> + <ref name="db.methodname.attlist"/> + <ref name="db._text"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>methodparam</db:refname> + <db:refpurpose>Parameters to a method</db:refpurpose> + <define name="db.methodparam.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.methodparam.rep.attribute"> + <ref name="db.rep.attribute"/> + </define> + <define name="db.methodparam.choice.attribute"> + <ref name="db.choice.req.attribute"/> + </define> + <define name="db.methodparam.attlist"> + <interleave> + <optional> + <ref name="db.methodparam.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <optional> + <ref name="db.methodparam.rep.attribute"/> + </optional> + <optional> + <ref name="db.methodparam.choice.attribute"/> + </optional> + </interleave> + </define> + <define name="db.methodparam"> + <element name="methodparam"> + <ref name="db.methodparam.attlist"/> + <zeroOrMore> + <ref name="db.modifier"/> + </zeroOrMore> + <optional> + <ref name="db.type"/> + </optional> + <choice> + <group> + <zeroOrMore> + <ref name="db.modifier"/> + </zeroOrMore> + <ref name="db.parameter"/> + <optional> + <ref name="db.initializer"/> + </optional> + </group> + <ref name="db.funcparams"/> + </choice> + <zeroOrMore> + <ref name="db.modifier"/> + </zeroOrMore> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>group</db:refname> + <db:refpurpose>A group of method parameters</db:refpurpose> + <define name="db.group.methodparam.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.group.methodparam.choice.attribute"> + <ref name="db.choice.opt.attribute"/> + </define> + <define name="db.group.methodparam.attlist"> + <interleave> + <optional> + <ref name="db.group.methodparam.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <optional> + <ref name="db.group.methodparam.choice.attribute"/> + </optional> + </interleave> + </define> + <define name="db.group.methodparam"> + <element name="group"> + <ref name="db.group.methodparam.attlist"/> + <oneOrMore> + <choice> + <ref name="db.methodparam"/> + <ref name="db.group.methodparam"/> + </choice> + </oneOrMore> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>varname</db:refname> + <db:refpurpose>The name of a variable</db:refpurpose> + <define name="db.varname.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.varname.attlist"> + <interleave> + <optional> + <ref name="db.varname.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.varname"> + <element name="varname"> + <ref name="db.varname.attlist"/> + <ref name="db._text"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>returnvalue</db:refname> + <db:refpurpose>The value returned by a function</db:refpurpose> + <define name="db.returnvalue.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.returnvalue.attlist"> + <interleave> + <optional> + <ref name="db.returnvalue.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.returnvalue"> + <element name="returnvalue"> + <ref name="db.returnvalue.attlist"/> + <ref name="db._text"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>type</db:refname> + <db:refpurpose>The classification of a value</db:refpurpose> + <define name="db.type.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.type.attlist"> + <interleave> + <optional> + <ref name="db.type.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.type"> + <element name="type"> + <ref name="db.type.attlist"/> + <ref name="db._text"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>classname</db:refname> + <db:refpurpose>The name of a class, in the object-oriented programming sense</db:refpurpose> + <define name="db.classname.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.classname.attlist"> + <interleave> + <optional> + <ref name="db.classname.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + </interleave> + </define> + <define name="db.classname"> + <element name="classname"> + <ref name="db.classname.attlist"/> + <ref name="db._text"/> + </element> + </define> + </div> + <!-- ====================================================================== --> + <div> + <db:refname>programlisting</db:refname> + <db:refpurpose>A literal listing of all or part of a program</db:refpurpose> + <define name="db.programlisting.role.attribute"> + <attribute name="role"/> + </define> + <define name="db.programlisting.width.attribute"> + <ref name="db.width.characters.attribute"/> + </define> + <define name="db.programlisting.attlist"> + <interleave> + <optional> + <ref name="db.programlisting.role.attribute"/> + </optional> + <ref name="db.common.attributes"/> + <ref name="db.common.linking.attributes"/> + <ref name="db.verbatim.attributes"/> + <optional> + <ref name="db.programlisting.width.attribute"/> + </optional> + </interleave> + </define> + <define name="db.programlisting"> + <element name="programlisting"> + <ref name="db.programlisting.attlist"/> + <ref name="db.verbatim.contentmodel"/> + </element> + </define> + </div> +</grammar> |