<?xml version="1.0" encoding="UTF-8"?>
<!--
File: sidl.dtd
Package: sidl XML
Release: $Name: $
Revision: @(#) $Id: node222.html 4460 2005-03-23 19:12:04Z epperly $
Description: DTD for the sidl XML database representation
Copyright (c) 2000-2003, The Regents of the University of Calfornia.
Produced at the Lawrence Livermore National Laboratory.
Written by the Components Team <components@llnl.gov>
UCRL-CODE-2002-054
All rights reserved.
This file is part of Babel. For more information, see
http://www.llnl.gov/CASC/components/. Please read the COPYRIGHT file
for Our Notice and the LICENSE file for the GNU Lesser General Public
License.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License (as published by
the Free Software Foundation) version 2.1 dated February 1999.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
conditions of the GNU Lesser General Public License for more details.
You should have recieved a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
This file describes the DTD for a sidl symbol represented in XML format.
The root element is <Symbol>.
PUBLIC ID "-//CCA//sidl Symbol DTD v1.1//EN"
-->
<!--
Symbol Element
Symbol is the root element for all sidl XML schema. The Symbol contains a
SymbolName (fully qualified symbol name and version), Metadata, Comment,
and one of Class, Enumeration, Interface, or Package.
-->
<!ENTITY % symbols "Class | Enumeration | Interface | Package">
<!ELEMENT Symbol (SymbolName, Metadata, Comment, (%symbols;))>
<!--
SymbolName Element
A SymbolName represents a fully qualified symbol name along with its
version. It is of the form:
<SymbolName name="sidl.SomeName" version="1.3.4"/>
-->
<!ELEMENT SymbolName EMPTY>
<!ATTLIST SymbolName name CDATA #REQUIRED
version CDATA #REQUIRED>
<!--
Metadata Element
The Metadata element contains any useful descriptive data about the symbol.
The time and date of creation is required, but all other information is
optional. The date and time must follow the ISO-8601 standard. The
entries in the metadata element are (key,value) pairs.
-->
<!ELEMENT Metadata (MetadataEntry)*>
<!ATTLIST Metadata date CDATA #REQUIRED>
<!ELEMENT MetadataEntry EMPTY>
<!ATTLIST MetadataEntry key CDATA #REQUIRED
value CDATA #REQUIRED>
<!--
Comment Element
Comment elements support a very simple HTML description using the
html-lite.dtd HTML subset. See html-lite.dtd for more details.
-->
<!ENTITY % html-lite PUBLIC "-//CCA//sidl HTML DTD v1.0//EN" "html-lite.dtd">
%html-lite;
<!ELEMENT Comment %html-block;>
<!--
Package Element
The Package element contains the symbols that exist within a package.
In the PackageSymbol element, note that the name is relative to the
package (thus, sidl.Class is represented by Class within package sidl).
A true final attribute indicates that this package is not reentrant. It
defaults to true to handle old XML files. In previous versions, all
packages were non-reentrant.
-->
<!ELEMENT Package (PackageSymbol)*>
<!ATTLIST Package final (false | true) "true">
<!--
If the version attribute isn't provided, the symbol has the same version
as the containing package. This is to provide backward compatibility with
previous released versions of the DTD. Someday the version may become
REQUIRED, so always include it.
-->
<!ELEMENT PackageSymbol EMPTY>
<!ATTLIST PackageSymbol name CDATA #REQUIRED
type (class | enum| interface | package) #REQUIRED
version CDATA #IMPLIED>
<!--
Enumeration Element
The Enumeration element consists of a collection of Enumerator elements
that describe a relative symbol name, its integer value, and whether the
value was assigned by the parser or in the sidl input file.
-->
<!ELEMENT Enumeration (Enumerator)+>
<!ELEMENT Enumerator (Comment)?>
<!ATTLIST Enumerator name CDATA #REQUIRED
value CDATA #REQUIRED
fromuser (false | true) #REQUIRED>
<!--
Class Element
The Class element consists of a class extended by this class, a block
of interfaces implemented by this class, and a block of methods declared
or defined by this class. The methods block does not include methods
declared or defined by parents. The elements AllParentInterfaces and
AllParentClasses include all parents of this class.
-->
<!ELEMENT Class (Extends, ImplementsBlock,
AllParentClasses, AllParentInterfaces,
MethodsBlock)>
<!ATTLIST Class abstract (false | true) #REQUIRED>
<!ELEMENT Extends (SymbolName)?>
<!ELEMENT ImplementsBlock (SymbolName)*>
<!--
Interface Element
The Interface element constsis of a block of interfaces that this
interface extends (element ExtendsBlock) and a block of methods
declared by this interface (element MethodsBlock). The methods block
element contains only those method declared or re-declared by this
interface and does not include all those methods defined by the
parent interfaces. The AllParentInterfaces element block includes
all parent interfaces that this interface extends.
-->
<!ELEMENT Interface (ExtendsBlock, AllParentInterfaces, MethodsBlock)>
<!ELEMENT ExtendsBlock (SymbolName)*>
<!--
AllParentClasses and AllParentInterfaces Elements
These elements define a collection of zero or more SymbolName elements
that are the parent classes and parent interfaces of a class or interface.
-->
<!ELEMENT AllParentClasses (SymbolName)*>
<!ELEMENT AllParentInterfaces (SymbolName)*>
<!--
MethodsBlock Element
The MethodsBlock element defines a collection of zero or more methods
that belong to a sidl interface or class.
-->
<!ELEMENT MethodsBlock (Method)*>
<!--
Method Element
The Method element defines a single method in a class or interface.
The method is defined by a return type (the Type element), a return
mode (the copy attribute of Method), a method name, an argument list,
a throws clause, definition mode modifiers, and communication mode
modifiers.
-->
<!ELEMENT Method (Comment, Type, ArgumentList, ThrowsList)>
<!ATTLIST Method shortname CDATA #REQUIRED
extension CDATA #REQUIRED
copy (false | true) #REQUIRED
definition (normal | abstract | final | static) #REQUIRED
communication (normal | local | oneway) #REQUIRED>
<!ELEMENT ArgumentList (Argument)*>
<!ELEMENT ThrowsList (SymbolName)*>
<!--
Argument Element
The sidl Argument element defines a sidl argument, which consists
of a copy modifier, a parameter passing mode (in, inout, or out),
a parameter type, and a formal parameter name.
-->
<!ELEMENT Argument (Type)>
<!ATTLIST Argument copy (false | true) #REQUIRED
mode (in | inout | out) #REQUIRED
name CDATA #REQUIRED>
<!--
Type Element
The Type element describes a sidl type, which may be a built-in type
such as boolean or int, an array, or a user-defined symbol. If the
type description is a primitive type, then no sub-elements are allowed.
If the type is a symbol, then the single sub-element must be a symbol
name. If the type is an array, then the single sub-element must be
an array element
-->
<!ELEMENT Type (SymbolName | Array)?>
<!ATTLIST Type type (void | boolean | char | dcomplex | double |
fcomplex | float | integer | long |
opaque | string | symbol | array ) #REQUIRED>
<!ELEMENT Index EMPTY>
<!ATTLIST Index name CDATA #REQUIRED>
<!ELEMENT Array (Type?,Index?)>
<!ATTLIST Array order (unspecified | column-major | row-major) #REQUIRED
dim CDATA "0" >
Babel assumes that comments will conform to the HTML-lite comment format. So, Babel relies on comment.dtd to validate whether SIDL documentation comments follow the HTML-lite comment format, which is described in html-lite.dtd. The most current versions of all of these DTDs can also be found in the source distribution in the babel/compiler/gov/llnl/babel/dtds directory.
NOTE: Any XML interface description that complies with the SIDL DTD can be used as input to Babel.