CORBA Developer's Guide With XML
CORBA Developer's Guide With XML
Introduction
Part IV—Appendixes
Appendix A—Terms and Definitions
Appendix B—XML Alphabetical Production
Rules List
Appendix C—XML Production Rules
Appendix D—Constraints
Well-Formedness Constraints
Validity Constraints
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
Table of Contents
-----------
Introduction
Web or Internet technologies, especially those that can be labeled
object-oriented, are in flux. This book associates two of these technologies:
Extensible Markup Language (XML) and Common Object Request Broker
Architecture (CORBA). This book makes brief references to Java, an
object-oriented, controlling programming language, as a kind of cement or
glue. This book also discusses Standard Generalized Markup Language
(SGML) because XML and Hypertext Markup Language (HTML) are both
children of this programming language.
While the first design goal of the XML Recommendation states “XML shall be
straightforwardly usable over the Internet”1 it can be demonstrated that XML
has broad application in such areas as e-commerce. With this in mind, this
book focuses on XML document type definitions (DTD) design using the
structures of CORBA so one might get a new perspective on programming in
an object-oriented environment. It is not a book that teaches XML, but rather
discusses design for experienced object-oriented developers. One needs to
comprehend how an analysis of an environment, CORBA, assists in design
and development of XML elements, attributes, and entities that reflect that
environment.
1Extensible Markup Language (XML) 1.0 W3C Recommendation
10-February-1998; URL is
http://www.w3.org/TR/1998/REC-xml-19980210.
Note: This book discusses design and development processes, not the actual
how-to-do-this. There are many vendors available to assist in unique local
CORBA integration issues.
For one to use the full power of XML, one must create one’s own XML
document type definition (DTD). One then takes a most critical step by
establishing a document’s grammar (the implicit rules) and its unique
meaningful markup. This follows to a certain degree precedence, designing
DTDs for XML dialects such as Chemical Markup Language (CML).
XML enables generic SGML to serve, receive, and process in the same way as
HTML does on the Web. This means XML can describe a document and can
establish hyperlinks as HTML. It is also a bit more. XML handles data in a
document. XML gives one the capability to manipulate (manage or handle)
data from a document into a database and vice versa.
XML also extends (1) HTML’s capabilities to handle document control, (2)
the function to publish information in a variety of media from the same source,
(3) the ability to establish complex documentation links, and (4) the design
technique for defining different document descriptions. These notions are
found in XML’s name, extensible.
CORBA is a standard for defining a network as object-oriented in comparison
to client/server. A basic premise of object-oriented (OO) theory is that a client
can access or can be accessed. The same holds true for a server. CORBA can
define these objects in two major areas: CORBAservices (see Chapter 8) and
CORBAfacilities (see Chapter 9).
Java is an object-oriented language designed to be:
• Reusable
• Portable
• Interoperable
Besides these three, there are seven other Java characteristics that are
important as a part of justification for moving to Java internetworking:
• Application adaptation is possible because of dynamic network
downloading.
• Application performance is increased.
• Design, development, testing, and implementation are simpler because
of component-level object programming.
• Development time is shorter because of code reuse.
• Memory management increases system robustness.
• Multithreading produces high performance in GUI functions.
• Security is improved because the Java run-time system checks for
viruses.
SGML became a global text-processing standard in 1986 through the
International Organization for Standardization (ISO).2 It became a standard
through the hard work of many, but in particular Charles F. Goldfarb. SGML
is the parent of XML. XML extends SGML’s document paradigm to the
hypertext environment of the Internet (see Chapters 1 and 2). The name of the
standard is “ISO 8879: 1986 Information processing—Text and Office
systems—Standard Generalized Markup Language (SGML).”
2The group in French is known as Organisation Internationale de
Normalisation. ISO is not the group’s acronym, but comes from the Greek
“isos” meaning “equal.”
Note: Before SGML there were Script and GML (Generalized Markup
Language). Charles F. Goldfarb, Ed Mosher, and Ray Lorie at IBM
developed the idea to enable document sharing among different IBM
systems. XML is like most Internet technologies in that its origin extends
back a number of decades.
Book’s Audience
This book is for system administrators, MIS managers, and network designers
and developers that want to or have been tasked to use the latest Web
technologies, in particular CORBA and XML, to enhance their system. Any
system enhancement involves ever-changing goals, issues, and techniques that
include:
• System architecture and configuration
• Operating systems
• Protocols
• Management tools
• Application software
• Graphical user interfaces (browsers)
• User activities, abilities, and needs
Because of the above situation, this book considers selected processes for
solving some of these issues. The methodologies given here enable you, the
system administrator, to evaluate effectively and efficiently how XML design
can be used in CORBA networking. Also, one must consider the relationships
among XML, SGML, HTML, and Java to achieve a more comprehensive
user-friendly environment.
This book is also for people who assist the system administrator either in
policy or design integration. This would include:
• Design and development team
• Product vendors
• Consultants
• Support technicians
• Documentation and training groups
• Users (internal, customers, or vendors)
This book is for anyone who has tried to read Extensible Markup Language
(XML) 1.0, W3C Recommendation (10 February 1998). The Recommendation
is the result of lengthy discussions by experts in publishing technology. The
experts were trying to resolve how to use the best design considerations of two
worlds, SGML and HTML. One of their goals was to write a concise statement
of the results of the discussions. The Recommendation is a set of 89
production rules with minimal commentary.
There are no alternatives given. There are no how-we-got-there statements.
Their concern was and is data and text structure, not appearance.
Finally, this book is for anyone who has tried to read the extensive CORBA
documentation available. When any new network architecture is developed,
one should expect technical clarifications. This book tries to give a twisted
view of reality for the developer who is challenged by the weight of
documentation. A “simple” view of CORBA is that it is “a set of interfaces”
and “its variables” are the keys to comprehension.
Key Issues
The first issue is that the XML Recommendation was only completed in
February 1998 after a 15-month effort. This area is dynamic to say the least.
There are already ideas on the table to extend XML with such things as
Extensible Stylesheet Language (XSL). There are also legacy hardware and
software issues. There are such things as lack of tools (parsers) and experience.
Because one knows or had experiences with SGML or HTML does not make
one an expert with XML. There are only 89 XML production rules, but this
book tries to demonstrate that there are many nuances to each rule. There are
least 500 permutations for all the rules.
Note: A goal of the W3C XML Activity was to have a concise document.
The document is approximately 30 pages. It has minimal commentary.
Focus Is
This book focuses on a process for designing XML document type definitions
(DTDs) in the context of the CORBA infrastructure. It is a design guide to
assist developers who need to work with CORBA by demonstrating the
importance of CORBA interface variables as viewed through an XML DTD
design process. Also the book is concerned with languages that can assist in
defining or modeling CORBA objects and can also assist in the design and
development of XML DTDs for CORBA.
This book uses different metaphors to try to highlight “sound bites” of
information on CORBA. Two metaphors used are “news headlines” and
“document.”
Focus Is-Not
This book is not a comprehensive answer to integrating XML into CORBA. It
is not a programming guide such as one for Java. It is not an XML markup
guide per se since the focus is only on the first and most critical step in XML
design—the development of XML DTDs. And finally, the book is not an
explanation of CORBA interworkings.
Each system administrator or developer must consider other factors such as
legacy hardware, legacy software, system configurations, and users. Also, skill
sets, project goals, and customer goals have to be considered.
Key Questions
Here are just a few of the questions that should have some resolution by the
last page of the book:
• What is an XML application? Is there more than one type?
• What is a CORBAservice?
• What is a CORBAfacility?
• How does XML relate to SGML?
• How does XML compare to HTML?
• How does one use Java in developing an XML application?
• What is a process for designing and developing an XML application?
Book Outline
Part I—XML: Why and What
Warning: One should always refer to the latest version of the Extensible
Markup Language Recommendation.3 The Recommendation, not this book,
should be the ultimate document on XML.
3The latest Recommendation version can be found starting with the URL
http://www.w3.org/TR.
Part IV—Appendixes
Appendix D—Constraints
This appendix summarizes the well-formedness and validity constraints from
XML Working Recommendation 1.0 (10 February 1998). These constraints
are required for designing a conforming XML processor. See also Appendix C.
Book Navigation
The book may be read from cover or cover or used as a reference book. The
table of contents or index may direct you to points of interest since you may
already have a specific solution.
Companion CD-ROM
The companion CD-ROM contains a multimedia presentation to explain the
essential concepts of the XML Specification, along with a trial version of
XML Authority from Extensibility, Inc. Please see the last page of the book
and the CD itself for more information.
Table of Contents
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
Table of Contents
-----------
The Companion CD
Through a special arrangement between Wordware Publishing and
Extensibility, a 10-use trial version of XML Authority v1.0 is included on the
companion CD-ROM. XML Authority is the most comprehensive tool
available for the creation, conversion, and management of schema for XML.
To get started, simply open the HTML file titled Welcome to Extensibility on
the CD. The CD also contains a helpful XML Authority Walkthrough designed
to make you familiar with the software in less than 15 minutes and a complete
XML glossary to help you become familiar with the language. For your
reference, XML Authority includes detailed documentation to help you
navigate through every feature of the software. For more information about
XML Authority, please see the previous page.
The companion CD also includes a computer-based training course called
Fundamentals of XML. It is based on the XML Recommendation 1.0 (10
February 1998). This requires a 640 x 480 high color (16-bit) monitor. To use
Fundamentals of XML, either copy Xmlfd.exe to your hard drive and run, or
double-click on Xmlfd.exe.
Table of Contents
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
Table of Contents
-----------
Acknowledgements
This is my fourth book with Wordware Publishing, Inc. I would again like to
thank the fine people who seek to make the writing process more fun and
easier than it should be. I would like to thank several people. Jim Hill,
publisher, had the fortitude to ask me to write another book on CORBA. Beth
Kohler and Kellie Key, editors, made the words that I set down clearer and
more readable. Denise McEvoy, interior designer, makes bland manuscripts
look professional. Alan McCuller, cover designer, showed once again his
magic in designing an eye-catching cover. And finally, Pamela Alba, executive
assistant, and her friendly smile that got me through the administrative hurdles.
I would like to thank especially all those people who contributed to the source
documentation on CORBA and XML.
Any omissions or technical misinterpretations are mine.
George M. Doss
Plano, TX
Dedication
This book is dedicated to all my teachers—good or bad, remembered or
forgotten, formal or informal. They all contributed to what I know today.
Table of Contents
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Part I
XML: Why and What
Included in This Part:
• Chapter 1—Foundational View
• Chapter 2—XML Design Policy
• Chapter 3—Developing an XML Document Type Definition (DTD)
• Chapter 4—Document Object Model Overview
• Chapter 5—DCAM, IDL, and UML Overviews
• Chapter 6—Web Interface Definition Language (WIDL)
Chapter 1
Foundational View
Included In This Chapter:
• Background Information
• XML Grammar Overview
• XML Benefits
• XML and SGML Comparison
• XML and HTML Comparison
• XML and Java Comparison
This chapter looks at Extensible Markup Language (XML) in descriptive, it-is-this, terms
rather than in prescriptive, how-to-use, terms. Chapter 2 discusses the theoretical
underpinnings, the production rules, based on XML Recommendation 1.0 (10 February
1998).
Note: As of the writing of this book, the Recommendation lacks final approval as a
Standard. The authors expect minimal changes to the Recommendation.
XML is a subset of SGML with the powers of HTML. With XML one can speak of a
Web-based document rather than of a Web-based page as with HTML.
This chapter looks at very briefly:
• XML’s background
• XML’s grammar
• XML’s benefits
• XML and SGML comparison
• XML and HTML comparison
• XML and Java comparison
Note: Later chapters discuss in detail many of the specialized uses of words in this chapter.
Also see Appendix A, Terms and Definitions.”
Background Information
XML’s actual history is very brief since the first working draft was published in November
1996. XML’s foundation comes from the Standard Generalized Markup Language (SGML)
that was published in 1986 as ISO 8879 (1986 Information processing— Text and Office
systems— Standard Generalized Markup Language (SGML)). The reality of SGML as a
standard for electronic documentation markup comes through the dedicated efforts of
Charles F. Goldfarb.
The W3C XML Activity, a working group of the World Wide Web Consortium (W3C),
developed XML. The editors were Tim Bray, Jean Paoli, and C.M. Sperberg-McQueen.
XML Recommendation 1.0 shows precisely how XML design eases implementation and
SGML and HTML interoperability. If one takes time to read the Recommendation, not an
easy task, look for all sentences that begin “For interoperability….” The Recommendation
(Specification) is a very short document and is very precise. One should read the
Recommendation in HTML format so one can follow the links.
Note: This book includes a computer-based training (CBT) course that summarizes the key
ideas of the Recommendation. The CBT’s structural design primarily uses the
Recommendation document structure including numbered sub-sections.
Symbol::= expression
The Recommendation uses 16 right-hand EBNF rules. One uses these rules as a basis for the
construction of production rules.
1. #xN
N is a hexadecimal integer.
Expression matches the character in ISO/IEC 10646 whose canonical (UCS-4) code
value, when interpreted as an unsigned binary number, has the value indicated.
For further details, see ISO/IEC 10646-1993 (E). Information technology— Universal
Multiple-Octet Coded Character Set (UCS)— Part I: Architecture and Basic
Multilingual Plane. [Geneva]: ISO, 1993 (plus amendments AM 1 through AM 7).
The Web site is either:
http://charts.unicode.org/ or ftp.unicode.org/Public/2.1-Update
Example:
White space (Production Rule 3) equals one of the following in the format of #xN:
#x20—space
#x9—horizontal tab
#xD—carriage return
#xA—line feed
2. [a-zA-Z],[#xN-#xN]
Matches any character within the defined range(s).
The IS0/IEC 10646 defines a character as a specified unit, such as a tab, Latin A, Latin
a, etc.
See also the Unicode Standard, located at http://charts.unicode.org.
Example:
Character range in Production Rule 2 is defined as:
This rule reads that character data can be any character string excluding (^) the
less-than symbol (<), the ampersand (&), and the ]]> string.
4. [^abc],[^#xN#xN#xN]
Matches any character not defined.
The IS0/IEC 10646 defines a character as a specified unit, such as a tab, Latin A, etc.
See also the Unicode Standard.
Example:
Character data (Production Rule 14) is defined as:
Note: The first (expression) is this rule. For ease of reading, here is the example
including spaces. SystemLiteral ::= (' " ' [^"] ' " ') | (" ' " [^'] " ' "). A string can be
delimited by a set of double quotation marks.
6. ‘string’
Matches a literal string within single quotes.
For a match, the compared strings must be identical within ISO/IEC 10646 code
definitions.
Example from Production Rule 11:
Note: The second (expression) is this rule. For ease of reading, here is the example
including spaces. SystemLiteral ::= (' " ' [^"] ' " ') | (" ' " [^'] " ' "). A string can be
delimited by a set of single quotation marks.
7. (expression)
A set of simple expressions treated as a unit within parentheses.
A (B) means A followed by the expression B. Production Rule 6 states:
This rule reads that Names has at least one Name followed by optional one or more
occurrences of Name.
8. A?
Matches A or nothing. Commonly used in production rules as S?. This means there
can be zero or one occurrence of white space. Using the break (br) tag from HTML,
one can have either <br/> or <br /> because this is an empty-element tag (Production
Rule 44 for EmptyElemTag).
9. A B
Matches A followed by B.
Production Rule 1 states:
This rule reads a document consisting of a prolog followed by an element and perhaps
followed by miscellaneous markup.
10. A | B
Matches A or B, but not both.
Production Rule 3 reads:
S ::= (#x20 | #x9 | #xD | #xA)+
This rules that a white space (S) can be in hexadecimal a space (#x20) or (|) a tab
(#x9) or (|) a carriage return (#xD) or (|) a line feed (#xA), and there must be an
occurrence (+) for a white space to exist.
11. A - B
Matches any string that matches A, but not B.
Production Rule 17 for a processing instruction target reads:
This rule reads that a name for a processing instruction name (PITarget) can be any
name except one beginning with XML, xml, or any other combination of these six
letters.
12. A+
There must be a match or matches of occurrence A.
Production Rule 3 reads:
This rules that a white space (S) can be in hexadecimal a space, a tab, a carriage
return, or a line feed, and there must be an occurrence (+) for a white space to exist.
13. A*
Expression may occur or have occurrences.
Production Rule 1 reads:
Example:
Note: The SGML Standard uses X and Y instead of A and B as given above.
Note: These words or concepts are discussed throughout the book. Also see Appendix A,
“Terms and Definitions.”
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
XML Benefits
XML is important for two types of applications: document or data exchange
and database connectivity. XML provides a richer set of elements and
publishing extensions than HTML. XML can handle application design for
processing data that is for a specific use, but has a process that is an open,
nonproprietary solution. The premise of this book is that a document should be
considered a data object and thus can be processed in a CORBA networking
environment as any object.
XML was designed to handle the foundational abilities of the object
technology, similar to Java. Java’s three key abilities are:
• Reusability
• Portability
• Interoperability
A key capability of XML is to handle interchange format transfer of data
between different databases and different operating systems.
Note: An SGML DTD contains the pointers to the files with the DTD rules
that govern the document’s markup.
There are a number of differences between XML and SGML. Here are ten
major differences:
• XML requires both a start-tag and an end-tag, but SGML does not.
• XML permits optional DTDs, but SGML does not.
• XML is more flexible than SGML in expressing an element’s rank in
nests.
• XML does not have declarations that are independent of the DTD and
contain instructions for the parser.
• XML does not have limitations on the quantity or capacity of
document objects as SGML does.
• XML comments require both <!-- and -->.
• XML permits flexibility with default settings, but SGML uses the
default of CURRENT.
• XML is not as rich in features as SGML.
• XML has speedier processing capabilities.
• XML was designed for general use; SGML’s complexity has resulted
in use by documentation experts.
Note: Many of the formatting controls (frames, tables, and new tags) were
developed for HTML because of demands by Web designers. These
designers never took the time to understand the basic concepts of HTML.
This appears also to be happening to XML. However, this trend may not be
blamed necessarily on designers.
Note: There are dangers in this activity. These dangers are discussed in
more detail in Chapter 10.
Note: These two methods are discussed in more detail in Chapter 10.
XSL is in the proposal stage with the World Wide Web Consortium. XSL uses
the underpinning concepts of Document Style Semantics and Specification
Language (DSSSL), an ISO standard. The basic goals of XSL are:
• To be used over the Internet
• To be readable by a human
• To be created easily
XSL uses a variant of JavaScript. The variant includes features for applying
style to Web documents. XSL focuses on document style applications. XSL
with XML has the ability to fetch data from a document and present the data
with a desired style.
The second method of using an XML parser and a Java compiler is first based
on the premise that applications with XML require an XML parser. The
second premise is that programmers use either a command-line interface or an
application programming interface (API) to include parsing. Third, XML
builds information interchange languages. And finally, the use of the notion of
an Object Model Interface is a keystone factor of this method.
Note: The goal of this technology is the integration of the Document Object
Model and the API. The Web site for the latest is: www.w3.org/DOM/.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Chapter 2
XML Design Policy
Included in This Chapter:
• Some Related Internet Sites
• Production Rules Overview
• Well-Formed Documents
• Valid Documents
• Document Structure
• Logical Structure
• Physical Structure
• XML Processor Guidelines
For purposes of discussion, a policy can consist of recommendations (may do
this), specifications or rules (shall do this), structure (parameters are this and
not that), and guidelines (steps to do this). The ultimate goal of an XML
design policy is for a developed XML document to have a conforming XML
processor return no error messages. Structure, not appearance, is the
underpinning concept for XML design. There are other “X languages” that
establish relationships, pointers, and presentation.
To achieve an error-free goal, one needs to be knowledgeable of the XML
production rules, the processor constraints and guidelines, and the logical and
physical structures of XML documents. The underpinnings of these items are
ten design goals for XML. The key goals for XML are to be usable over the
Internet, to support a wide variety of applications, to be compatible with
SGML, and to have a minimal set of optional features. Other goals are that
XML design can be written easily, be prepared quickly, and be formal
(organized) and concise. XML documents should be human-legible and should
be easy to create. The tenth goal reflects the growth of storage capacity:
“Terseness in XML markup is of minimal importance.”1
1A goal of the W3C XML Activity was to write a concise document. The
XML Recommendation is a set of 89 conclusions, or production rules,
without alternatives and with minimal comments. Experts in the field of
publishing technology, such as SGML, established these rules after lengthy
discussions. One also needs a high level of knowledge of computer science
because of the technical jargon used, such as production, declaration, and
token.
There are 89 production rules. These rules have over 500 permutations. This
book’s focus is on some of the key permutations to show how XML can be
applicable to CORBA.
Note: This chapter relies heavily on the precise language of the XML
Recommendation 1.0 (10 February 1998). Other chapters explain these rules
in language that is appropriate to this book’s objectives.
This chapter closes with guidelines on how a processor should handle the
production rules. These rules state the implications of all of the production
rules. These guidelines can be considered a supplement of the well-formedness
and validity constraints.
Some Related Internet Sites
These sites are directly related to the Recommendation. Other sites are listed in
Appendix E.
www.w3.org/XML (for XML activity)
www.w3.org/TR (other recommendations)
www.w3.org/XML/xml-19980210-errata (for errors)
ftp://nic.ddn.mil/rfc/rfcNNNN.txt (NNNN is RFC number; see 1766 for
language ID tags)
charts.unicode.org/ (canonical code values)
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Well-Formed Documents
Five steps in achieving well-formedness for parsed entities:
1. All internal parameter entities are well-formed by definition.
2. The well-formed document entity matches the production document (Rule 1).
3. A well-formed internal general parsed entity’s replacement text matches the production
content (Rule 43).
4. A well-formed external general parsed entity matches the production extParsedEnt (Rule 78).
Rule 78:
Note: See Rules 15, 16, 39, 40, 42, 44, 66, and 68 for details.
Note: These constraints are listed in Appendix D and are more detailed with their associated production
rules.
Valid Documents
A valid XML document complies with the stated validity constraints. There are 21 validity constraints
in the Recommendation. If a validity constraint is not adhered to, the result is unpredictable. A
validating processor must report validity constraint failures.
Note: These constraints are listed in Appendix D and are more detailed with their associated production
rules.
Document Structure
An XML document basically consists of:
• A root document entity
Rule 1:
Comment ::= '<!- -' ((Char - '-') | ('-' (Char - '-')))* '- ->'
Example of a comment:
Logical Structure
The logical structure of an XML document is indicated by explicit markup known as elements
bounded by:
• Start-tags
• End-tags
• Empty-element tags
An element is the core component of the logical structure. The key characteristics of an element are:
• Has a type, identified by name (generic identifier (GI)).
• May have a set of attribute specifications, each with a unique name and value.
An element is defined by Rule 39:
Note: Rule 39 uses production Rules 40, 41, 43, and 44.
The start-tag appearing at the beginning of a non-empty element has two production rules:
Rule 40:
The end-tag, which echoes the start-tag, appearing at the end of a non-empty element has this
production rule:
Rule 42:
Note: Rules 14, 15, 16, 18, 39, and 67 and are used in this rule definition.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Rule for Empty Elements
The tag for an empty element is a special form used for an element without content. It serves the
same function as a start-tag followed by an end-tag. It must be used when an element is declared
EMPTY.
Rule 44:
The element structure for an XML document for validation purposes can be defined or
constrained (boundaries established) using element type (Rules 45 and 46) and attribute-list
declarations (Rules 52 and 53).
An element type declaration can also establish the constraints of an element’s children (Rule 47).
Note: At the user’s option, an XML processor can issue a warning when a declaration mentions
an element type that has no declaration.
<!ELEMENT br EMPTY>
<!ELEMENT container ANY>
<!ELEMENT p (#PCDATA|emph)* >
<!ELEMENT %name.para; %content.para; >
Element content is when an element type can contain only child elements, no character data,
optionally separated by white space (Rule 3).
The option requires a content model, a grammar that governs the allowed child element types
and the order of their appearance. The grammar is based on content particles (cps) (Rule 48).
Four element-content models are:
Rule 47:
Note: The content of an element matches a content model if it is possible to trace out a path
through the content model, obeying the sequence, choice, and repetition operators and matching
each element in the content against an element type in the content model.
For compatibility, it is an error if an element in the document matches more than one occurrence
of an element type in the content model.
Mixed content is when an element type may contain character data, optionally interspersed with
child elements. The types of child elements may be constrained, but not their order or their
number of occurrences. A mixed-content declaration requires that the name(s) give the types of
elements that may appear as children.
Rule 51:
<!ELEMENT p (#PCDATA|a|ul|b|i|em)*>
<!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* >
<!ELEMENT b (#PCDATA)>
An attribute (Rule 41) associates a name-value pair with an element (Rule 39). An attribute
specification appears only within a start-tag or an element tag.
An attribute-list declaration specifies the name, data type, and default value (if any) of each
attribute associated with a given element. An attribute-list declaration may:
• Define the set of attributes pertaining to a given element type.
• Establish type constraints for these attributes.
• Provide default values for attributes.
In an attribute-list declaration, the Name in the AttlistDecl Rule (52) is the type of element.
Name in the AttDef Rule (53) is the name of the attribute.
Rule 52:
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Rules for Attribute Types
Notes:
• Validity Constraint: ID means values of the type ID must match the Name production (Rule
5). ID values must uniquely identify the elements that bear them.
• Validity Constraint: One ID per Element Type means an element type must have only one
ID specified attribute.
• Validity Constraint: ID Attribute Default means an ID attribute must have a declared default
of #IMPLIED or #REQUIRED.
• Validity Constraint: IDREF means values of types IDREF and IDREFS MUST match
Name and Names production respectively (Rules 5 and 6). IDREF values must match the
value of some ID attribute.
• Validity Constraint: Entity Name means values of types ENTITY and ENTITIES must
match Name and Names production (Rules 5 and 6).
Each Name must match the name of an unparsed entity (Rule 66) declared in the DTD.
• Validity Constraint: Name Token means values of types NMTOKEN and NMTOKENS
must match Nmtoken and Nmtokens production (Rules 7 and 8).
There are two kinds of enumerated types. They have a variety of attributes as determined by the
declaration.
Rule 57:
Notes:
• A NOTATION attribute identifies a notation, declared in the DTD with associated system
and/or public identifiers, to be used in interpreting the element to which the attribute is
attached.
• A notation identifies by name the format of an unparsed entity.
• For interoperability, the same Nmtoken must occur only once in the enumerated types of an
element type.
• Validity Constraint: Notation Attribute means Values of this type must match one of the
notation names included in the declaration; all notation names in the declaration must be
declared.
• Validity Constraint: Enumeration means values of this type must match one of the Nmtoken
tokens in the declaration.
<!ATTLIST termdef
id ID #REQUIRED
name CDATA #IMPLIED>
<!ATTLIST list
type (bullets|ordered|glossary) "ordered">
<!ATTLIST form
method CDATA #FIXED "POST">
-
Notes:
• #REQUIRED means that the attribute must be provided.
• #IMPLIED mean no default value is provided.
• #FIXED means that the attribute must have a default value.
The processor must normalize an attribute value before it is checked for validity or passed to an
application. Normalization is as follows:
• A character reference is processed by appending it to the attribute value.
• An entity reference is processed by recursively processing the replacement text of the
entity.
• White space (Rule 3) is processed by appending a single #x20.
• Other characters are processed by appending them to the normalized value.
Notes:
• If the declared value is not CDATA, then the XML processor must further process the
normalized attribute value by discarding any leading and trailing space (#x20) characters, and
by replacing sequences of space (#x20) characters by a single space (#x20) character.
• A non-validating parser should treat all attributes for which no declaration has been read as
if declared CDATA.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Rules for Conditional Sections
Conditional sections (Rules 61-65) are portions of the DTD external subset that are included in or
excluded from the DTD’s logical structure based on the keyword that governs them.
Rule 61:
Notes:
• A conditional section may contain one or more complete declarations, comments, processing
instructions, or nested conditional sections, intermingled with white space.
• INCLUDE means the contents of the conditional section are part of the DTD.
Physical Structure
The physical structure of an XML document consists of entities. Entities are storage units that have
content. All are identified by name except the document entity and the external DTD subset. There is
only one document entity.
Entities are either parsed or unparsed. A parsed entity’s contents are referred to as its replacement text.
This text is an integral part of the document. A parsed entity is invoked by name using entity references.
An unparsed entity’s contents may or may not be text. The text may not be XML. An unparsed entity
does have an associated notation (Rule 82) identified by name. An unparsed entity is invoked by name
given in the value of ENTITY or ENTITIES attributes.
An entity can be general or a parameter. A general entity is for use within the document content. A
parameter entity is for use within the DTD. Because they occupy different namespaces, a general entity
and a parameter entity with the same name are distinctive.
A character reference refers to a specific character in the ISO/IEC 10646 character set. That is one not
directly accessible from available input devices.
Rule 66:
An entity reference refers to the content of a named entity. Parsed general entity references use as
delimiters the ampersand (&) and semicolon (;). Parameter-entity references use as delimiters the
percent sign (%) and semicolon (;). Entity reference is governed by Rules 67-69.
Rule 67:
An entity declaration is governed by five production rules (Rules 70-74). The Name in the rules
identifies the entity in an entity reference (Rule 68) or, in the case of an unparsed entity, in the value of
an ENTITY or ENTITIES attribute.
Rule 70:
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Rules for External Entity Declarations
An external entity is an entity that is not a part of the internal markup declarations. There is no entity
definition that is an EntityValue (Rule 9). There are two production rules (Rules 75-76). If the
NDATADecl (Rule 76) is present, a general unparsed entity exists; otherwise, it is a parsed entity.
Rule 75:
Notes:
• Validity Constraint: Notation Declared means the Name must match the declared name of
notation (Rule 82).
• The SystemLiteral is called the entity’s system identifier.
• The PubidLiteral is an external identifier, public.
<!ENTITY galley
SYSTEM "http://www.myplace.com/template/Galley.xml">
<!ENTITY galley
PUBLIC "-//Myplace//TEXT Standard galley template//EN"
"http://www.myplace.com/template/Galley.xml">
<!ENTITY galley
SYSTEM "../grafix/Galley.gif"
NDATA gif>
A parsed entity is invoked by name using an entity reference. It is an integral part of the document. Its
contents are referred to as replacement text.
A text declaration can only appear at the beginning of an external parsed entity. A text declaration
must be provided literally, not by reference to a parsed entity.
Rule 77:
Notations identify by name the format of unparsed entities, the format of elements that bear a notation
attribute, or the application to which a processing instruction is addressed.
Notation declarations provide a name for the notation for use in entity and attribute-list declarations
and in attribute specifications and an external identifier for the notation which may allow an XML
processor or its client application to locate a helper application capable of processing data in the given
notation.
Rule 82:
<?xml encoding='UTF-8'?>
<?xml encoding='ISO-10646-UCS-2'?>
<?xml encoding='ISO-8859-1'?>
<?xml encoding="EUC-JP"?>
Included Guidelines
Forbidden Guidelines
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Included in Literal Guidelines
Notify Guideline
Bypassed Guideline
Included as PE Guidelines
Miscellaneous Guidelines
The document entity serves as the root of the entity and a starting point for an
XML processor.
Conformance is concerned with whether a processor is validating or
non-validating.
A processor must report any well-formedness constraint violations whether
document entity or parsed entity.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Chapter 3
Developing an XML Document Type
Definition (DTD)
Included in This Chapter:
• DTD FAQ
• What is a DTD?
• Document Logical Structure
• Document Physical Structure
• Markup Declarations Overview
• Developing a Model DTD
• Developing a Document Type Declaration
• Role of the Processor
This chapter looks at the fundamental process for developing a document type
definition (DTD). The ideas given are extended in the chapters on developing
DTDs for CORBA.
This chapter concludes with a discussion on the key tool for developing a DTD
and XML documents, the parser (processor). In actuality there are three key
tools: parsers, editors (your choice of a text editor), and browsers. Check the
appropriate Web sites for the latest information on XML implementation by
browser vendors since this is, to say the least, a dynamic area. It is also
recommended to go beyond the parser discussion and do a search on “XML
parser.”
The following section has ten frequently asked questions about a DTD. The
answers to these questions are expanded upon in other sections of this chapter.
DTD FAQ
1. What is a document type definition?
An XML user can define the role of each element of text in a formal
model, known as a document type definition (DTD). This action enables
the user to declare where each component of document occurs in a valid
place within the interchanged data stream.
An XML DTD enables a computer, that is, a parser, to check, for
example, the logical structure of a document. A rule of a logical
document structure is that a second-level heading is not entered prior to
its associated first-level heading.
XML does not require the presence of a DTD. When a DTD is not used,
an XML system assigns a default definition for undeclared components
of the markup.
Note: A default definition may enable one to use HTML tags when
both the start-tags and end-tags are present.
2. What are some types of document types (text structures) that can be
defined by XML?
XML can describe any logical text structure: book, database, dictionary,
encyclopedia, form, letter, memo, or report. It extends the notion of
page. A spreadsheet can be a document type. Later in this chapter a
general model DTD for an e-mail document type is developed.
3. What are three key logical components of an XML document?
The three key logical components of an XML document are entity,
element, and attribute. Each entity can contain one or more logical
elements. Each of these elements can have certain attributes (properties)
that describe the way in which it is to be processed.
4. What is the importance of the concept of document to XML?
XML is based on the metaphor (an implicit designation) of a document
composed of a series of entities (containers). In programming parlance
the equivalent word would be object. Class is also an equivalent in some
cases.
5. What is the important difference between XML and SGML?
Simplistically, XML is an optimized markup language (subset) of
SGML for the Web. XML is data-centric rather than publishing-centric.
6. What is an important difference between XML markup and HTML
markup?
An XML document must clearly mark where the start and end of each of
the component parts occurs. The core rule in XML is start-tag, content,
and end-tag; or an empty-element tag.
7. How does XML differ from other markup languages?
XML differs from other markup languages in that it not only indicates
where a change of appearance occurs or where a new element starts, but
identifies clearly the boundaries of every part of a document. A
boundary can be a new chapter, a new paragraph (text), or a new
reference.
What is a DTD?
A document type definition (DTD) defines the role of each element of text in a
formal model. When a DTD is used, a parser can establish that each
component of the document occurs in a valid place within the interchanged
data stream.
An XML DTD enables a computer, that is, a parser, to check the logical
structure of a document. A rule of a logical structure is that a second-level
element is not entered prior to its associated first-level element.
XML does not require the presence of a DTD. When a DTD is not used, an
XML system may assign a default definition for undeclared components of the
markup.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Document Logical Structure
Logical structures for XML documents are covered in detail in Section 3 of the
Working Recommendation. A logical structure is a data boundary (element)
while a physical structure is a data container (entity). The logical structure of
an XML document consists of:
• Declarations
• Elements
• Comments
• Character references
The logical structure of an XML document is indicated by explicit markup
known as elements bounded by:
• Start-tags
• End-tags
• Empty-element tags
An important rule is that for every start-tag there must be an end-tag. XML is
rigid about this rule as compared to HTML which permits just a start-tag.
Elements
Attributes
An attribute (Rule 41) associates a name-value pair with an element (Rule 39).
An attribute specification appears only within a start-tag or an empty-element
tag. The basic syntax for an attribute list is <!ATTLIST …>.
An attribute-list declaration specifies the name, data type, and default value (if
any) of each attribute associated with a given element. An attribute-list
declaration may:
• Define the set of attributes pertaining to a given element type.
• Establish type constraints for these attributes.
• Provide default values for attributes.
Entities
There are three key entity notions: entity, entity declaration, and entity
reference. An entity is any data that can be treated as a unit. An entity
declaration is governed by Production Rules 70-74. An entity reference is
governed by Production Rule 67. It signifies that a copy of the entity is to be
included at this point.
Notations
Conditional Sections
Conditional sections are portions of the DTD external subset, which are
included in or excluded from the DTD’s logical structure based on the
keyword, which governs them. These sections are governed by Production
Rules 61-65.
Processing Instructions
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Developing an E-mail’s Logical Structure
The first step in designing a document type is to frame the structure for a logical and practical
example. In a database document type, one would only need to lay out one record structure unless
there are is variation. The following markup has the basic logical document structure (components) of
an e-mail document type.
Note: An e-mail document type is a variation of two other document types: a memo and a letter.
Note: The comments <!- - … - -> reflect design considerations. Also note the use of pairs of start-tags
and end-tags (logical elements).
One must create a document type definition (DTD) to define tag sets. The DTD formally identifies the
relationships among the various elements that form a document. For a simple email model the XML
DTD might be:
<!DOCTYPE email [
<!ELEMENT email (date, to, from, cc?, subject?, text+) >
<!ELEMENT date (#PCDATA) >
<!ELEMENT to (#PCDATA) >
<!ELEMENT from (#PCDATA) >
<!ELEMENT cc (#PCDATA) >
<!ELEMENT subject (#PCDATA) >
<!ELEMENT text (#PCDATA) >
]>
This model tells the parser that an email consists of a sequence of header elements: <date>, <to>,
<from>, and, optionally <cc> and <subject>. They are to be followed by the contents of the email.
There must be at least one paragraph present (indicated by the + after text). In this example, the email’s
element components have been defined containing parsed character data (#PCDATA), that is, data that
has been checked to ensure that it contains no unrecognized markup strings.
Where the position of an element in the model is variable, the element can be defined as part of a
repeatable choice of elements. For example, the model definition for the <text> element could be
modified to allow references to citations to books (in a Web environment read this as Uniform
Resource Locators (URLs)) or references to figures to be located anywhere in a paragraph. The
element could take this form with two added element attributes defined:
When there is the requirement for a placeholder, an element that does not require any content, then an
empty-element tag is used. No end-tag is required.
For example, <image/> is a type of empty element that acts as a placeholder for a figure’s illustration.
There can also be an optional <caption> element that identifies any text associated with the image. A
<figure> can be defined of consisting of these two elements: <image/> and <caption>.
The following element declarations extend the email model to include figures:
This provides a cross-reference among locations in a document. It ensures that a unique identifier is
assigned to an element such as each figure by adding an attribute-list declaration of the following form
to the DTD:
An example of standard text is boilerplate. For example, Caesar desired to give the appearance of
personalizing his email. A boilerplate paragraph could be included as a greeting to the senator’s
family, such as “I wish all is going well with your household.”
Commonly used text can be declared within the DTD as a text entity. A text entity definition could
take the form:
<!ENTITY mygreeting "I wish all is going well with your household." >
Once such a declaration is made in the DTD a user can use an entity reference of the form
&mygreeting; in place of the full greeting. Only the declaration in the DTD needs to be changed if
Caesar decides to pen a new greeting such as “I came, I saw, I conquered.”
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Incorporating Non-Standard Text Elements
Non-standard text is text that has characters that are not a part of the standard character set. For example,
Caesar wants to include a statement in Greek in his email. The important thing for Caesar to remember here is
that the reader has to have an output device (printer or scribe) that handles the character set.
Note: Greek glyphs (characters) are found in the Unicode Standard 2.1 U+0370 to U+03FF.
Text stored in another file can also be incorporated into the email using an entity reference. In this case the
entity declaration in the DTD identifies the location of the file containing the text to be referenced:
Non-standard characters such as umlaut, accents (acute, grave, and circumflex), and tilde can be declared to
show how the characters can be generated. A typical entry might read:
Handling Illustrations
XML has many techniques for handling non-standard document elements. Where the coding scheme of an
element of the file such as an illustration differs from that used for normal text, the contents of the element can
be treated as an entity with a special notation:
<!ENTITY figXIV SYSTEM "http://www.JGCaesar.gov/law/volIII/figures/figXIV"
NDATA gif >
One could also write this entity another way:
<!ATTLIST graphic
source %URL; #REQUIRED
type NOTATION (GIF|PNG|JPEG) "JPEG" >
To position the figure in the text, a user either enters an entity reference such as &figXIV; (&fig14;) or an
empty element such as:
When the text output is on a line-by-line basis, such as computer code, it can be flagged as a special type of
parsed character data by addition of a special reserved attribute, xml:space, to the element declaration:
A processing instruction (PI) allows a document to give instructions for one or more applications. A
processing instruction can identify the version of XML being used, the way in which it is encoded, and
whether it references other files or not:
Note: These constraints and rule extensions are discussed throughout this book where it is appropriate.
In doing one’s XML design of a document, one should verify that the markup adheres to the well-formedness
constraints. The consequence is fatal. Failure to comply with the validity constraints gives unpredictable
results. The results could be a sneeze or pneumonia.
There are many options as to the selection of parsers. For the many designers that may be working with
Internet Explorer 4.0 there are least two XML parsers by Microsoft:
• The C++ parser is non-validating. (This parser comes with IE 4.0.)
• The Java parser is for application developers.
Note: In Internet Explorer 5.0 there is the capability to use XML to write embedded “data islands” within HTML
pages.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Chapter 4
Document Object Model Overview
Included in This Chapter:
• DOM Defined
• DOM Specification Abstract
• DOM's Language Neutrality
• DOM Interface
• DOM and Style Sheets
• Entities
• DOM Interfaces
• DOM Terms and Definitions
• Specification References
• Sample DOM Scenario
This chapter looks at one of the newest of the Web document and
object-oriented technologies. It is defined in the Document Object Model
(DOM) Level 1 Specification, Version 1.0, W3C Recommendation, October 1,
1998. Only Section 1 of the Specification is discussed here because it is
concerned with XML. Section 2 of the Specification covers the specifics of the
HTML component of the DOM.
The URLs for this specification are:
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/DOM.ps
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/DOM.pdf
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/DOM.tgz
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/DOM.zip
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/DOM.txt
Note: See the end of the chapter for a very simple DOM scenario that
includes Java coding, an XML DTD, XML markup, and DOM output.
DOM Defined
The Document Object Model is a model by which a Web document that
contains objects, such as elements, can be manipulated. This means one is able
to add, change, or delete an element or its attribute in a valid document. There
are also the capabilities to get a list of all the elements (the tags rather than the
content), such as <para> in the document, and to find all the attributes of a
given element.
This means that Level 1 of the DOM allows manipulation of the content in that
document. It also allows navigation around an XML document. The goals of
Level 2 (publishing date 1999) are to allow manipulation of the Cascading
Style Sheets (CSS) attached to an XML document to have an event model and
to include enhanced query capabilities.
The Document Object Model is not an object model in the same manner as the
Component Object Model (COM). The DOM is a set of interfaces and objects
designed for managing XML documents. There is an object model because the
DOM identifies:
• Interfaces and objects that represent and manipulate a document.
• Interfaces and objects that have the semantics to handle both behavior
and attributes.
• Interface and object relationships and collaborations.
More precisely, the DOM is not:
• A binary specification
• A set of data structures
• A technique of persisting objects to XML
• A semantic set of definitions for XML
• A competitor to the Component Object Model (COM)
The DOM is a programming object model that comes from object-oriented
design. The Specification interfaces are defined as objects. This implicit data
model does not mean that this model has to be used for any interface
implementation.
The DOM may be implemented using language-independent systems such as
CORBA or COM. CORBA and COM specify interfaces and objects. The
DOM may also be implemented using language-specific bindings like the Java
or ECMAScript bindings (EMCA-262).
Note: See the latest DOM Specification on the Web for details on these
binding implementations.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
DOM and Style Sheets
A goal of the DOM Specification Level 2 is to specify a way to manipulate and change
Cascading Style Sheets (CSS). There should also be core functionality that may be applicable
to other style sheet languages. It is not a goal of Level 2 to specify a similar interface to
Extensible Stylesheet Language (XSL).
Entities
There are no objects representing entities in the fundamental DOM interfaces. Numeric
character references and predefined entities references in XML are replaced by the single
character that makes up the entity’s replacement. For example, in:
Note: The representations of both internal and external entities are defined within the
extended XML interfaces of the DOM.
DOM Interfaces
The DOM specifies interfaces that may be used to manage XML documents. These interfaces
are abstractions, similar to “abstract base classes” in C++. They specify how to access and
manipulate an application’s internal representation of a document. Any DOM application that
adheres to the specified interfaces can maintain documents in any convenient representation.
The DOM is designed to avoid implementation dependencies because an existing program
may use the DOM interfaces to access software written prior to the existence of the DOM
Specification.
The DOM presents documents as a hierarchy of nodal objects that also implement other, more
specialized interfaces. In Java these interfaces are classes. Some root nodes may have
children, while others do not. The node types are as follows:
• Document: Element (one permitted), ProcessingInstruction, Comment,
DocumentType
• DocumentFragment: Element, ProcessingInstruction, Comment, Text,
CDATASection, Entity Reference
• DocumentType: no children
• EntityReference: Element, ProcessingInstruction, Comment, Text, CDATASection,
EntityReference
• Element: Element, Text, Comment, ProcessingInstruction, CDATASection,
EntityReference
• Attr: Text, EntityReference
• ProcessingInstruction: no children
• Comment: no children
• Text: no children
• CDATASection: no children
• Entity: Element, ProcessingInstruction, Comment, Text, CDATASection,
EntityReference
• Notation: no children
The Node interface is the primary data type for the entire Document Object Model. It
represents a single node in the document tree.
Note: In Java, a Node interface is a Node base class. This class is a fundamental run-time data
container. It has a tree structure arrangement. This class includes class constants for:
• Document
• Element
• Attribute
• Text
• PI
• Comment
The Attr interface represents an attribute in an Element object. Typically the allowable values
for the attribute are defined in a document type definition (DTD).
The DOM views attributes as properties of elements rather than having a separate identity
from associated elements. This may make it more efficient to implement such features as
default attributes associated with all elements of a given type.
In XML, where the value of an attribute can contain entity references, the child nodes of the
Attr node provide a representation in which entity references are not expanded. These child
nodes may be either Text or EntityReference nodes. Because the attribute type may be
unknown, there are no tokenized attribute values.
Note: The Attribute class holds information about attribute occurrences that appear within an
XML document.
The CharacterData interface extends Node with a set of attributes and methods for accessing
character data in the DOM. No DOM objects correspond directly to CharacterData.
The Text interface represents the textual content (character data in XML) of an Element or
Attr. If there is no markup inside an element’s content, the text is contained in a single object
implementing the Text interface that is the only child of the element. If there is markup, it is
parsed into a list of elements and Text nodes that form the list of children of the element.
Note: In Java, the Text class holds data content read in a document instance. The data content
is contained in the Java class NodeList.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
CDATASection Interface Synopsis
CDATA sections are used to escape blocks of text containing characters that
would otherwise be regarded as markup. The only delimiter that is recognized
in a CDATA section is the “]]>” string that ends the CDATA section. CDATA
sections cannot be nested. The primary purpose is for including material, such
as XML fragments, without needing to escape all the delimiters.
Note: The Document interface is the Java class for the top-level (root) Node
of the in-memory, run-time representation of the XML document. It includes
the document type declaration associated with a root element of a document
instance.
<elementExample id="sample">
<subelementa/>
<subelementb><subsubelement/></subelementb>
</elementExample>
When represented using DOM, the top node is an Element node for
elementExample, which contains two child Element nodes, one for
subelementa without a child node and one for subelementb with a child node.
There are methods on the Element interface to retrieve either an Attr object by
name or an attribute value by name. In XML, where an attribute value may
contain entity references, an Attr object should be retrieved to examine the
possibly fairly complex sub-tree representing the attribute value.
Note: The Java Element class is the data container for the document’s
elements. The information includes such things as an element’s tag set name
and its attributes.
Cursor
A cursor is an object representation of a node. It may possess
information about context and the path traversed to reach the node.
Data model
A data model is a collection of descriptions of data structures and their
contained fields, together with the operations or functions that
manipulate them.
Descendant
A descendant node of any node A is any node below A in a tree model
of a document, where “below” means “away from the root.”
Element
Each document contains one or more elements, the boundaries of which
are either delimited by start-tags and end-tags or, for empty elements, by
an empty-element tag. Each element has a type, identified by name, and
may have a set of attributes. Each attribute has a name and a value.
Equivalence
Two nodes are equivalent if they have the same node type and node
name. Also, if the nodes contain data, that must be the same. If the
nodes have attributes, then a collection of attribute names must be the
same and the attributes corresponding by name must be equivalent as
nodes.
Inheritance
In object-oriented programming, the ability to create new classes (or
interfaces) that contain all the methods and properties of another class
(or interface), plus additional methods and properties.
Initial structure model
This model represents the document before it has been modified by
entity expansions, generated text, style-specified reordering, or the
execution of scripts. It is also known as the raw structure model or the
uncooked model.
Interface
An interface is a declaration of a set of methods with no information
given about their implementation. In object systems that support
interfaces and inheritance, interfaces can usually inherit from one
another.
Language binding
A programming language binding for an IDL specification is an
implementation of the interfaces in the specification for the given
language.
Method
A method is an operation or function that is associated with an object
and is allowed to manipulate the object’s data.
Model
A model is the actual data representation for the information at hand.
Object model
An object model is a collection of descriptions of classes or interfaces,
together with their member data, member functions, and class-static
operations.
Parent
A parent is an immediate ancestor node of a node.
Root node
The root node is the unique node that is not a child of any other node.
All other nodes are children or other descendants of the root node.
Sibling
Two nodes are siblings if they have the same parent node.
String comparison
When string matching is required, it is to occur as though the
comparison were between two sequences of code points from the
Unicode 2.0 Standard.
Tag valid document
A document is tag valid if all start-tags and end- tags are properly
balanced and nested.
Type valid document
A document is type valid if it conforms to an explicit DTD.
Uncooked model
See initial structure model.
Well-formed document
A document is well-formed if it is tag valid and entities are limited to
single elements (i.e., single sub-trees).
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Specification References
XML: W3C (World Wide Web Consortium) Extensible Markup Language (XML) 1.0.
http://www.w3.org/TR/REC-xml.
HTML 4.0: W3C (World Wide Web Consortium) HTML 4.0 Specification.
http://www.w3.org/TR/REC-html40.
Unicode: The Unicode Consortium. The Unicode Standard, Version 2.0. Reading, Mass.: Addison-Wesley
Developers Press, 1996.
CORBA: OMG (Object Management Group) The Common Object Request Broker: Architecture and
Specification. http://www.omg.org/corba/corbiiop.htm
This sample produces the DOM output sample, BksXML.dom, below. XML for Java includes a
com.ibm.xml.parser.Parser class that can simulate an XML parser that can parse an XML document and
generate a DOM node tree. Also Java has an interface hierarchy org.w3c.dom package. This sample uses
inputs BksXML.dtd and BksXML.xml.
import com.ibm.xml.parser.*;
import org.w3c.dom.*;
import java.io.*;
public class BksXML {
public static void main(String[] argv) {
try {
if (argv.length != 1) {
System.out.println("Usage: java BksXML " +
"<document>");
System.exit(0);
}
String fn = argv[0];
InputStream is = new FileInputStream(fn);
Element el = doc.getDocumentElement();
printElement(el);
System.out.println("End document");
} catch (Exception e) {
e.printStackTrace();
}
}
NodeIterator ni = el.getAttributes();
Node n = ni.toNextNode();
while (n != null) {
Attribute a = (Attribute) n;
System.out.println("Attribute: " + a.getName() + "=" +
' " ' + a.toString() + ' " ');
n = ni.toNextNode();
}
if (el.hasChildNodes()) {
ni = el.getChildNodes();
n = ni.toNextNode();
while (n != null) {
int nt = n.getNodeType();
if (nt == Node.Element) {
Element e = (Element) n;
System.out.println("End Element: " + e);
} else if (nt == Node.TEXT) {
TEXT t = (Text) n;
System.out.println("Text: " + ' " ' + t.getData() + ' " ');
}
n = ni.toNextNode();
}
}
This document type definition (DTD) defines the markup tag sets (elements) for the XML encoding below. It
is also one of the inputs for the Java application above. The other input is the XML encoding in the
following section.
This sample uses the above DTD. It is also the second input for the above Java application, BksXML.java,
the other input being BksXML.dtd. This sample only uses three books and only the first author listed when
there is more than one to keep the example simple. Each of these books has established a knowledge niche
different from this book and from each other.
<BksXML>
</BksXML>
]>
Start document
Start element: BksXML
Text: "
"
Start element: Title
Attribute: name="The XML Handbook"
End element: Title
Text: "
"
Start element: Title
Attribute: name="Presenting XML"
End element: Title
Text: "
"
Start element: Title
Attribute: name="Client/Server Data Access with Java and XML"
End element: Title
Text: "
"
Start element: Author
Attribute: Lname="Goldfarb"
Attribute: Fname="Charles"
End element: Author
Text:"
"
Start element: Author
Attribute: Lname="Light"
Attribute: Fname="Richard"
End element: Author
Text:"
"
Start element: Author
Attribute: Lname="Chang"
Attribute: Fname="Dan"
End element: Author
Text:"
"
Start element: Description
Attribute: pubr="Prentice Hall"
Attribute: pdate="1998"
End element: Description
Text:"
"
Start element: Description
Attribute: pubr="Sams Net"
Attribute: pgno="414"
End element: Description
Text:"
"
Start element: Description
Attribute: pubr="John Wiley"
Attribute: review="Covers the client/server paradigm."
End element: Description
Text:"
"
End element: BksXML
End document
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
There are many components of the DCAM effort beyond just the modeling
process itself. These components as a part of the Interoperability
Clearinghouse (IC) initiative include:
• Analysis Tools—Tools that provide support for a wide range of
“views” based on DCAM.
• Component Frameworks—A Web-based component-based
architecture modeling tool that allows an industry to combine
interoperable products into their domain unique architectures.
• Electronic Forum—A point for dynamic information sharing.
• Information Directory—A Web-based Distributed Component
Architecture Modeling (DCAM) tool that enables drill down analyses
from architectures to compliant product suites.
• Information Dissemination—Data collection and propagation of the
repository though network of IC Partners and Subscribers.
• Information Repository—A Configuration Management type
repository application as a back end to the Distributed Component
Architecture Modeler to document and communicate findings.
• Interoperability Product Profiles—Product profiles that ensure
consistent reporting formats.
• Solution Providers—A logical site for the sharing of information
among industries’ most critical technology resources: the systems
integrators and consultants.
• Standard Templates—Formats and processes for standardization,
conformance testing, and interoperability validation.
• Testing Coordination—Cooperative agreements with testing
organizations.
• User Coordination (government)—Cooperative agreements (CRADA)
with technology-driven agencies.
• User Coordination (industry)—Cooperative agreements with
technology-driven commercial industries: finance, insurance,
telecommunications, manufacturing, and health care.
• Vendor Coordination—Cooperative agreements with software
companies committed to the distributed computing and Internet product
markets.
DCAM’s evolution requires the inclusion of these features and functions
definitions in technology and commercial terms. Some of these features and
functions are:
• Allowable solution set definition
• Definition of selected interoperable product suites
• Implemented product suites
• Known third-party product partners.
• Lessons learned from test cases
• Product abstracts for current offerings
• Results of interoperability and conformance test
• Selected infrastructure products
• Selected interoperable product suite definitions
• Standards taxonomies
• Systems testing data
• Target technologies for business applications
• Test results of available test suites and tools
Note: Any network administrator or developer can use this list when
considering any major application design.
Note: Java IDL is an Object Request Broker (ORB) provided with JDK 1.2
and complies with the CORBA/IIOP Specification 2.0. The idltojava
compiler defines, implements, and accesses CORBA objects from the Java
programming language. See the appropriate JDK 1.2 documents for details.
IDL follows the lexical rules of C++. Its grammar is a subset of the proposed
ANSI C++ standard. See “The Common Object Request Broker: Architecture
and Specification,” version 2.2 or later, Chapter 3 for details on IDL at
www.omg.org/corba.
There is a key principle about IDL that one should be aware of—it is for
defining CORBA interfaces and is not for implementing applications. This
principle ensures language independence. A server could be written in Java
and the client could be written in C++. This adheres to a basic characteristic of
CORBA—portability, or the capability to run across a variety of platforms.
IDL definitions can be compared to Java definitions of interfaces or to C++
header files. This is an interface description, not an implementation.
How is language independence achieved? The concept of language mapping is
used. Language mapping is the process that specifies an IDL construct to
another language’s construct. The Object Management Group (OMG) has
developed a number of language maps for such languages as Java, C, C++, and
COBOL. This notion is important because in a given network there may be a
variety of legacy programming languages and operating systems. This also
gives one the freedom to choose the best language for any given application.
Since the focus of this book is to make a system administrator aware of issues
in the developmental process for an enterprise network using CORBA and not
specific solutions, this section is a process overview not an IDL definition
solution for a server interface. While the process may be simply stated, one
should be experienced in programming and network design.
The process given here is to assist the network administrator in giving
directions to the programmers on the team. The steps are few, but the design
requires thought. The steps are:
1. Define the IDL server interface.
2. Implement using either the delegation or inheritance approach.
3. Compile the code to generate client stubs and server skeletons.
4. Implement the IDL server interface.
5. Compile the server application.
6. Run the server application.
7. Repeat the above steps until step 6 is a success.
Four terms used in steps 2 and 3 need clarification. Delegation calls the
methods of the implementing class. Inheritance passes the methods of the
implementing class from the interface class. A client stub is a compiled piece
of code that makes the interface available to a client. A server skeleton is a
compiled piece of code that is the “skeleton” or “frame” used for building the
server implementation code on the interface.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
In a political metaphor, a new president of the United States inherits problems
from the prior president, and the new president then delegates his requirements
for solutions to his Cabinet. The problems are the president’s, while the
solutions are the Cabinet’s. A client stub is like the social body concerned with
the solution. A server skeleton is like the Cabinet Department that has to solve
the problem.
It was stated in the previous section that the book’s focus is to raise one’s
awareness to issues in the developmental process for an enterprise network and
not offer specific solutions. Local expectations, resources, skills, and the
legacy environment determine real solutions. This section is a process
overview, not an IDL definition solution for a client interface.
The steps given here as above are to assist the network administrator in giving
directions to the programmers on the team. The steps are few; the
implementation of the client interfaces should be simpler than the server
interfaces. The steps are:
1. Use the client stubs generated in the original compile.
2. Bind the client to a server object.
3. Use the server object interfaces.
UML Overview
Critical to modeling the infrastructure is the Unified Modeling Language
(UML). This tool assists in creating an object-oriented design. Rational
Software Corporation with a number of partners that include Hewlett-Packard,
IBM, Microsoft, and Oracle developed UML for this activity. See Rational
Software Corporation’s site (http://www.rational.com/uml/ index.jhtml) for
information.
UML seeks to use the best engineering practices for developing large and
complex system models. It can be used in both software and non-software
environments. This means you can model a client as software and as hardware.
It is used for specifying, visualizing, constructing, and documenting a system’s
infrastructure.
Throughout the design process you have to consider the components of your
enterprise network; all of these components make up the infrastructure. The
components come in two flavors—concrete and abstract. Knowing what the
components are and their places in the enterprise network is key to modeling,
determining what tools you need, establishing protocols that implement
integration, identifying interconnectivity issues, and establishing the roles of
the service and access servers.
Note: The word “component” is used throughout this chapter because most
computer literature uses this term based on the client/server paradigm;
however, in the context of CORBA and Java internetworking the word
“object” is more appropriate.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Chapter 6
Web Interface Definition Language
(WIDL)
Included in This Chapter:
• Overview of WIDL
• WIDL-SPEC DTD Overview
• WIDL MAPPING DTD Overview
• WIDL Implications for XML and CORBA
Web Interface Definition Language (WIDL) is an important new Web
technology for conceptual development of XML applications for CORBA.
This technology goes hand-in-hand with the Document Object Model (DOM)
and Distributed Component Architecture Modeling (DCAM) technologies.
This chapter is detailed since it is important to comprehend WIDL and other
IDLs as a foundational requirement for doing modeling with CORBA. The
knowledge of XML’s place is an integral component of this comprehension.
This chapter looks at the key notions about WIDL version 3.0:
• WIDL overview
• WIDL-SPEC DTD
• WIDL-MAPPING DTD
• WIDL implications for XML and CORBA
This chapter is based on information from
http://www.transactnet.com/products/toolkit/userguide/refman/widl/
overview.html
This URL has links to the WIDL Specifications, the WIDL Specification
DTD, the WIDL Mappings, and the WIDL Mapping DTD.
webMethods made a Submission Request to W3C on September 22, 1997
(http://www.w3c.org/Submission/1997/15/).
Caution: When quotation marks are used in this chapter, they are a part of
the expected markup. For example, the correct markup is “SUCCESS,” not
SUCCESS.
Overview of WIDL
WIDL is an application of XML. It is a metalanguage, a top-level conceptual
language that implements a service-based architecture over the
document-based resources of the World Wide Web. This Web technology uses
HTTP for communication among XML and HTML documents (XML to
XML, HTML to HTML, or XML to HTML) by interpreting them as
inter-application messages.
Note: XML and HTML are referenced together in this chapter because of
WIDL’s ability to handle XML to HTML communications.
WIDL-SPEC DTD
<!ELEMENT WIDL-SPEC (METHOD | RECORD)+>
<!ATTLIST WIDL-SPEC
NAME CDATA #REQUIRED
VERSION CDATA #FIXED "3.0"
COMMENT CDATA #IMPLIED>
METHOD Sub-Element
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
RECORD Sub-Element
VALUE Sub-Element
The VALUE empty-element type represents any record field that is not a
nested record. A value represents such things as numbers, text, XML, dates,
etc. Values are similar to primitive types in most programming languages.
Values also represent arrays of these primitive types. The attributes of the
VALUE element follow:
NAME This required attribute establishes a unique record name
within a given RECORD.
DIM This optional attribute defines a field’s dimensions.
• “1” indicates a single-dimensional array of strings.
• “2” indicates a two-dimensional array of strings.
• “0” (the default) indicates there is not an array, but a string.
TYPE This optional attribute identifies the lexical type of the field.
Lexical types include integers, floating-point numbers, and
strings.
Warning: WIDL Release 3.0 only supports strings. If the TYPE attribute is
used it must be “STRING”.
COMMENT This is optional descriptive information of this element.
RECORDREF Sub-Element
WIDL-MAPPING DTD
<!ELEMENT WIDL-MAPPING (SERVICE | INPUT-BINDING
| OUTPUT-BINDING)+>
<!ATTLIST WIDL-MAPPING
NAME CDATA #REQUIRED
VERSION CDATA #FIXED "3.0"
BASEURL CDATA #IMPLIED
DEFAULT-CONTENT (WOM | CONSTANT) "WOM"
COMMENT CDATA #IMPLIED>
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
WIDL-MAPPING Root Element
INPUT-BINDING Element
OUTPUT-BINDING Element
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
When a service’s OUTPUT attribute names a binding, each parameter binds
against the entire document. When the RECORD attribute of a BINDINGREF
element names a binding, each parameter binds against the portion of the
document that the BINDINGREF element identifies. By including
BINDINGREF parameters within output bindings, one may create structures
of nested records. Each record is the result of having applied any output
binding to any portion of the document. Also, a given binding might be
applied multiple times against multiple portions of the document.
An OUTPUT-BINDING consists of any number of REGION, CONDITION,
VALUE and BINDINGREF child elements. The VALUE and BINDINGREF
elements define the output binding’s parameters. The attributes of
OUTPUT-BINDING follow:
NAME This required attribute identifies the binding for reference by
SERVICE and BINDINGREF elements. No two bindings
may have the same name within a given WIDL-MAPPING.
INPUT-BINDING and OUTPUT-BINDING names belong to
the same namespace.
COMMENT This is optional descriptive information of this element.
CONDITION Sub-Element
Note: It is not necessary to use this attribute, since the WOM expression
found in REASONREF may perform the masking.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
REGION Sub-Element
Note: Regions are critical for poorly designed HTML documents where it is
otherwise impossible to differentiate between desired data elements and
elements that also match the search criteria.
Note: The origins of “foo” could be for food, for fool, or for file
object-oriented.
VALUE Sub-Element
In addition to the above attributes, input parameters must have the following
attribute, FORMNAME:
FORMNAME This required attribute specifies the variable name to be
submitted through the HTTP GET or POST method. The
calling program provides the value that is assigned to the
variable, unless the CONTENT attribute is set to
“CONSTANT”, in which case the element’s content is
submitted as the value.
The FORMNAME attribute allows one to assign meaningful
names to obscure form name variables. One may set
FORMNAME to the empty string (“”) to pass only the value
of the input variable and not also a variable name, as required
by some Web services.
USAGE This is an optional attribute. The DEFAULT usage of
variables is for specification of input and output parameters.
Parameters can pass HEADER information (for example,
USER-AGENT or REFERER) in an HTTP request.
One may also reference INTERNAL parameters from within
attributes and element content by using the syntax
“%<parameter>%”. This performs string substitution for
string parameters and parameter value assignment otherwise.
(The syntax may also be used for non-internal parameters.)
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
In addition to the common attributes, an output parameter may have the
following attribute, NULLOK:
NULLOK This optional attribute is either “TRUE” or “FALSE”. This is
the indicator that determines whether it is acceptable for the
parameter’s object reference to fail to bind. When false, if
object reference does not bind, the entire binding fails.
CONDITION elements may then be used to handle the failed
binding. By default, a failure to bind any parameter fails the
entire binding.
COMMENT This is optional descriptive information of this element.
BINDINGREF Sub-Element
In addition to the above attributes, input parameters must have the following
attribute, FORMNAME:
FORMNAME This required attribute specifies the variable name to be
submitted through the HTTP GET or POST method. The
calling program provides the value that is assigned to the
variable, unless the CONTENT attribute is set to
“CONSTANT”, in which case the element’s content is
submitted as the value.
The FORMNAME attribute allows one to assign meaningful
names to obscure form name variables. One may set
FORMNAME to the empty string (“”) to pass only the value
of the input variable and not also a variable name, as required
by some Web services.
USAGE This is an optional attribute. The DEFAULT usage of
variables is for specification of input and output parameters.
Parameters can pass HEADER information (for example,
USER-AGENT or REFERER) in an HTTP request.
One may also reference INTERNAL parameters from within
attributes and element content by using the syntax
“%<parameter>%”. This performs string substitution for
string parameters and parameter value assignment otherwise.
(The syntax may also be used for non-internal parameters.)
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
WIDL Implications for XML and CORBA
As is seen in other parts of this book the notion or functionality of an Interface
Definition Language (IDL) is not unique. In CORBA the IDL describes the
interfaces to CORBA objects in a distributed environment. WIDL from webMethods
describes Web resources so a user can automate all XML and HTML documents and
forms interactions. WIDL follows the trend to describe data within documents rather
than the documents themselves.
The WIDL specification provides an abstract description for an API to services,
while the WIDL mapping provides the interactions among XML and HTML
documents.
Note: A service is a function that resides behind a Web XML or HTML document
such as a Common Gateway Interface (CGI) script. An interface is a collection of
services.
WIDL describes the location of services at the highest Web level, URL. The input
parameters to be submitted to a service are described in the WIDL-MAPPING root
element and its SERVICE element with its METHOD attribute. The output
parameters to be returned for a service are described likewise.
<WIDL-SPEC NAME="com.wordware.books.catalog"
VERSION="3.0">
<METHOD NAME="getbook"
INPUT="BookList"
OUTPUT="BookCatalog" />
<RECORD NAME="Title">
<VALUE NAME="CORBA Developer's Guide with XML" />
</RECORD
<RECORD NAME="Author">
<RECORDREF NAME="LastName"
RECORD="Doss" />
<RECORDREF NAME="FirstName"
RECORD="George" />
</RECORD>
</WIDL-SPEC>
WIDL is parsed as an XML document. This process extracts relevant data about
services declared. To retrieve available services in a given WIDL file, this simple
object reference would be used:
widl.service[].name
Note: Similar object references would be used to retrieve a URL, a service method,
and input and output variables.
Condition Handling
Because there is no standard for handling errors for document formats, WIDL’s
CONDITION is very useful. CONDITION can handle object references that return
either meaningless data or null values. A simple CONDITION declaration is:
<CONDITION TYPE="FAILURE"
REFERENCE="doc.xml[0].value"
MATCH="*error condition*"
REASONTEXT="error condition" />
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Part II
CORBA: Why and What
Chapter 7
CORBA Headlines
Included in This Chapter:
• Headlines on CORBA Objects
• Headlines on the ORB
• Headlines on CORBA Domains
• Headlines on CORBAservices
• Headlines on Security Service
• Headlines on CORBAfacilities
• Basic Designed XML/CORBA DTD
The selection of “headlines” as a part of this chapter’s title is important to a
discussion of CORBA and XML. A headline in a newspaper is a method of
attracting one to read a story; if a good one, it should also be a theme or
viewpoint of the story. Consider what you think when you see these headlines:
• Octuplets born in Houston
• Storm causes 500 car accidents
Each of these headlines generates a different set of images and emotions. Are
the images and emotions correct? Until one knows that the octuplets are
human children and not elephants, one might have a different image than is
expected. Also, with accidents one might wonder if there were any deaths.
Where does this lead? It seems that we humans are always seeking
clarification. When one sees a statement such as “CORBA is a dynamic
paradigm that is going to shift a system administrator’s view of networking
significantly,” what images and emotions are generated? Perhaps chaotic
images and fearful emotions are generated.
If one considers when one first heard about the client/server paradigm, one
might also have the same type of images and emotions. But the key word is
image. Just as with the octuplets example, one must clarify CORBA or
client/server. It is a given here that one already has experience with the
client/server paradigm (a two-sided view point). Actually, we have many
two-sided paradigms, and the client/server is a key one for the computer
environment. Other associated computer paradigms include:
• Parent/child
• Input/output
• Data/information
• Hardware/software
What fundamentally makes the CORBA paradigm different from the
client/server paradigm? There are five basic concepts that make the difference;
all else is commentary:
• Common (There is “sameness.”)
• Object (There is something “perceptible.”)
• Request (There is the act “of asking.”)
• Broker (There is the “handler” of the asking.)
• Architecture (There is the “design and structure” for containing the
other four.)
XML has a user-defined architecture, the document type definition (DTD). A
DTD should be able to handle common objects and requests. In a client/server
XML DTD one might have an attribute list of “yes” and “no”; however, in a
CORBA XML DTD one might have an attribute list of “yes”, “no”, and
“maybe”. The absolute “either-or” dichotomy is less relevant in the CORBA
paradigm. An important concept of CORBA is that an object can be accessed
by another object and it can also access another object. In other words, a client
can be a server, and a server can be a client. An XML DTD can be designed to
permit one to define an object either way. Thus, the octuplets in the first
headline could be defined as a group, not as a number, in XML markup as:
<anmlgrp>octuplets</anmlgrp >
<hmngrp>octuplets</hmngrp >
<group>octuplets</group>
Note: A headline may only give a partial view of reality. It takes the
commentary or detailed text to clarify.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
What can one identify from these headlines about a CORBA object? A key
idea is that a CORBA object might be equated to an XML entity because it
contains data. (An XML entity is a container.) An object can be identified with
a number of attributes such as operational performance and distribution. The
places of a CORBA object in an XML DTD are discussed in Chapters 11-14.
Note: The design logic based on the above is that a CORBA object is a
container. CORBAservices and CORBAfacilities are CORBA objects; thus
they are containers. An XML entity is a container. The root entity or
top-level entity is the document entity. A document type is a root entity. A
CORBA service or CORBA facility could be equated to a document type.
Headlines on CORBAservices
CORBAservices are interfaces that have been standardized by the OMG for
use by developers. In theory, this means common usage across platforms and
products is possible. In practice, this simply shows to what degree developers
have implemented the CORBAservices. More details on CORBAservices are
discussed in Chapters 8, 12, and 13. Here are 20 headlines for
CORBAservices:
• CORBAservices are inherent to most objects.
• CORBAservices are service-defined interfaces.
• CORBAservices provide for the creation of objects.
• CORBAservices provide for access control of objects.
• CORBAservices address the functions of applications.
• CORBAservices are also referred to as Object Services.
• The Naming Service registers and locates objects by name.
• CORBAservices do not have standardized implementations.
• CORBAservices provide maintenance of object relationships.
• The Property Service enables objects to define sets of properties.
• CORBAservices are a growth area (at least 15 and counting).
• CORBAservices defines conventions for distributed applications.
• The Event Service manages which objects send or receive events.
• The Concurrency Control Service uses locks to manage concurrency.
• CORBAservices are defined through the Interface Definition
Language.
• The Persistent Object Service manages objects that persist over a time
period.
• The Licensing Service supports three policies: consumer, time, and
value mapping.
• The Life Cycle Service facilitates the creating, deleting, copying, and
moving of objects.
• The Object Trader Service locates objects in three ways: function,
location, and operation name.
• The Security Service handles the basic components of a security
policy such as identification and authentication.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
What can one learn from these headlines? CORBAservices can be generalized,
but the characteristics of a specific service may give more insight. Since this is
a very dynamic area, one should adhere to a key programming guideline—be
scalable. Implementation is left to the developer, usually read as vendor.
<DOCTYPE CORBA [
<!ELEMENT API (#PCDATA)>
<!ELEMENT ORB (#PCDATA)>
<!ELEMENT domain (#PCDATA)
<!ELEMENT service (#PCDATA)
<!ELEMENT facility (PCDATA)
]
What does this DTD for you? It gives the basic components or elements of
CORBA. Later chapters give the details so that each element of the DTD can
become a document type. One could also develop this DTD into a very
complex one using attributes with the elements and then making further
refinements. The key guideline here is that one can structure an XML DTD for
CORBA based on one’s skills or needs. There is no one way to do this; you
have to decide what the specific design goal is and structure the DTD
accordingly.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Chapter 8
Essentials of CORBAservices
Included in This Chapter
• CORBAservices Highlights
• Core Design Principles for CORBAservices
• Concurrency Control Service Essentials
• Event Service Essentials
• Externalization Service Essentials
• Licensing Service Essentials
• Life Cycle Service Essentials
• Naming Service Essentials
• Object Collections Service Essentials
• Object Trader Service Essentials
• Persistent Object Service Essentials
• Property Service Essentials
• Query Service Essentials
• Relationship Service Essentials
• Security Service Essentials
• Time Service Essentials
• Transaction Service Essentials
This chapter briefly looks at CORBAservices to establish descriptive
information for the development of a document type definition (DTD) using
CORBAservices as a document type labeled services (Chapter 12). The
information on the services is kept to essentials for DTD design purposes. A
Security Service DTD is developed in Chapter 13 with a document type
labeled security, and more details are given there.
CORBAservices Highlights
CORBAservices are interfaces that have been standardized by the OMG for
use by developers. The manner of implementation is not defined in the model,
but the types of interfaces are. Here are the services used to design the
CORBAservices DTD in Chapter 12 along with their primary purposes:
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
While CORBAServices do not depend upon specific software, some services
have dependencies on other services. Here is a list of the services and whether
there are dependencies or not:
Note: Perhaps a better name for the Concurrency Control Service is Lock
Management Service.
Note: The name of this service implies only half of its functions since it also
does internalization.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Object Trader Service Essentials
Object Trader Service provides a matchmaking service for objects. It allows an
object to publicize and bid for a job. This service is like the telephone Yellow
Pages in that it lets you search by category. The Object Trader Service queries
five types of offers:
• Potential
• Considered
• Matched
• Ordered
• Returned
Note: When Pope Gregory XIII proclaimed the Gregorian calendar to be the
calendar of the Church it was October 15, 1582 (Gregorian calendar), while
the prior day was October 4, 1582 (Julian calendar). The Gregorian calendar
did not become the dating standard in Europe until the time of the
Communist Revolution.
Time Service handles both objects and events. There are two core interfaces,
TimeService and TimeEventService.
Previous Table of Contents Next
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Transaction Service Essentials
Transaction Service enables an operation to be defined across multiple objects
as a single transaction in either a flat (required) or nested (optional) model. An
object is considered either transactional or recoverable. There are four key
transaction concepts:
Atomicity Changes are completely committed (done) or undone.
Consistency Changes are handled in the same method all the time.
Isolation Changes are handled independently of each other.
Durability Changes are persistent.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Chapter 9
Essentials of CORBAfacilities
Included in This Chapter
• User Interface Facility Essentials
• Information Management Facility Essentials
• System Management Facility Essentials
• Task Management Facility Essentials
• Vertical Facilities Essentials
• Essentials on CORBAservices Support
CORBAfacilities is the place in CORBA that is for the end user. This is the
place where an end user’s formatted document or spreadsheet is handled. This
is the area for application development for both horizontal and vertical
facilities. A horizontal facility is for the use of almost everyone, such as
compound document administration or network (system) administration. A
vertical facility is for a specialized market that has many different applications
but a common goal (environment), such as publishing or telecommunications.
Note: This is the place of speculation and thoughts on the field of dreams.
Using a well-worn cliché, this is an area of dynamic growth.
Note: There is more to the OMA than stated above; however, it does cover
the basics.
Horizontal common facilities have been broken down into four types. The
types are:
• User Interface (Chapter 2 of the CORBAfacilities Specification)
• Information Management (Chapter 3 of the CORBAfacilities
Specification)
• Systems Management (Chapter 4 of the CORBAfacilities
Specification)
• Task Management (Chapter 5 of the CORBAfacilities Specification)
Vertical market facilities have been broken down into specialized markets
(Chapter 6 of the CORBAfacilities Specification). The markets are:
• Imagery
• Information Superhighways
• Manufacturing
• Distributed Simulation
• Oil and Gas Industry
• Accounting
• Application Development
• Mapping
Finally, the place of two CORBAservices, Internationalization and Security,
have to be discussed. It is the goal of the OMG that these two CORBAservices
support all of the Common Facilities. The language and protection
requirements need to be considered for all users.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
A basic issue of retrieval is how to handle metadata. This facility should have
interfaces that handle the basic services of an information retrieval system:
• Initialization
• Search
• Retrieve
• Access control
• Termination
Information interchange facilities (Compound Interchange, Data Interchange,
and Information Exchange) should allow for exchange of information between
users and different software components. This requires conversions among
different models, media, and encodings. Basically, this facility handles data
interchange in compound documents.
The Compound Interchange Facility should be a framework for data object
storage and interchange. It should address data object:
• Binding
• Annotation
• Conversion
• Exchange
• Linking
• Reference storage
The Data Interchange Facility enables objects to be interoperable through data
exchanges. This facility allows different forms and kinds of data transfer such
as:
• Domain-specific object representations
• Formatted data
• Bulk data transfer
• Structured data
• Legacy data
The Information Exchange Facility should enable data exchanges among
applications over three layers of interchange. These layers from lowest to
highest are:
• Infrastructure
• Enabling technology
• Semantics
This facility needs to handle mediated information exchange. To achieve this
goal, four services have to be deployed:
• Content language
• Vocabulary
• Communication
• Interaction control
Interfaces for a Data Encoding and Representation Facility should support
practical interworking and information interchange. The transport modes
should include shared storage media, networking protocols, and direct
programming interfaces.
The interfaces should specify data types to be encoded and quality of service
requirements. There should be at least four interfaces to generalized services
for:
• Data compression
• Data decompression
• Representation to canonical conversion
• Canonical to representation conversion
The Time Operations Facility’s purpose is to have interfaces for the
manipulation of time and calendar data. There should be capabilities to have
services for:
• Time stamping
• Time duration
• Time range
• Time comparison
• Time instance manipulation
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
The Information Superhighways Facility could be called the Intranet/ Internet
Facility because of its associated protocols and conventions. The basic
infrastructure of this facility is:
• Commercial Operations Facility
• Advertisement
• Monitoring
• Costing
• Resource Discovery Facility
• Intermediaries Facility
• Broker
• Intelligent agent
• Mediator
• Trader
• Teleconferencing Facilities
• Collaboration
• Mentoring
• Experimentation Facility
• User Access Facility
• Interface level (novice or expert)
• User profile management
• Group association
The Manufacturing Facility represents integration of computational and
manufacturing resources. Three areas have been identified for development:
• Policy variable management (business rules)
• History management
• Access
• Control
• Product data service (STEP standards)
• Concurrent engineering support
• Information technological integration support
• Encapsulated object-oriented interface
• Fast execution of large models of fine-grained objects
The Distributed Simulation Facility should have facilities for simulations for
air traffic control, war gaming, and video games. This facility should have at
least these services:
• Simulation management
• Simulation configuring
• Component choosing
• Connection specifying
• Component allocating
• Component instantiating
• Component start ensuring
• Component status monitoring
• Component shut-down
• Simulation identifying
• Component state checking
• Time management
• Initial simulation time prior to start
• Basic component commands (start, pause, resume, and stop)
• Aircraft and vehicle state
• Entity maintenance and administration
• Database snapshots
• Callback establishments
• State information
• Flight data
• Allows components to subscribe or unsubscribe
• Publishes initial plans and changes to subscribers
• Adaptation
• Location of airways
• Fixes
• Airspace definitions
• Environment
• Weather
• Terrain
The Oil and Gas Industry Exploration and Production Facility is concerned
with process. The business processes involve a large quantity of data, complex
algorithms, and long-term data storage.
The Accounting Facility is concerned with the computer type as compared to
the manual type. The facility seeks to resolve the business reality that most
accounting software interfaces are custom-designed and proprietary. The
facility should involve:
• Money exchange
• Payroll
• Purchases
• Sales
• Online charges
The Application Development Facility covers the selection, development,
building, and evolution of enterprise information systems. The referenced
model is for describing the environments that support projects that engineer,
develop, and manage computer-based systems (object-oriented). Basic
expected interfaces are as follows:
• Technical engineering
• System
• Software
• Process
• Applications components for reuse
• Frameworks and patterns
• Domain-specific
• Technical management
• Change
• Reuse
• Project management
• Plan
• Estimate
• Risk analysis
• Tracking
• Support
• Text processing
• Numeric processing
• Figure processing
• Framework
• Object management
• Process management
• Communication
• Operating system
• User
• Policy enforcement
The Mapping Facility covers those services required for applications that
access and display geospatial data. A function not to be covered is analysis;
however, the two that are to be covered are:
• Access
• Display
Three basic requirements have been identified for this facility. They are as
follows:
• Database querying
• Access to modeling and analysis facilities
• Presentation production assistance
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Part III
XML Applications
Chapter 10
Design and Development Issues
Included in This Chapter:
• General Software Design and Development Principles
• Some CORBA Design Issues
• Some XML DTD Design Issues
• Some HTML Design Issues
• Some JAVA Design Issues
Whether one is deigning to use CORBA, XML, Java, or HTML, there are
some basic software design principles that should be adhered to at all times.
Here are ten design and development principles:
• Abstraction
• Flexibility
• Interoperability
• Modularity
• Reconfigurability
• Reusability
• Scalability
• Simplicity
• Stability
• Use good project management practices
Above the door or on the wall of any design group should be written, “Know
Thy Subject.” This means one does not sit down and start programming or
doing XML markup when one gets a project. This chapter discusses some
design issues for CORBA and some for XML.
Besides the preceding list of general principles, one needs to consider specific
issues. These issues come in two categories, single environment or multiple
environments. This chapter discusses both categories for CORBA, XML,
HTML, and Java.
In some cases, “it is” statements are given. One might immediately wonder
why that statement is an issue. The reply is that if you do not think about the
obvious, it can become an issue. For example, CORBA is fundamentally a set
of standard interfaces concerned with services of various aggregations: single
service, a group of services (facilities), and groups of services (domains). What
does this mean to you as a developer? No matter what programming or markup
language you use, your implementation involves interface design issues.
Abstraction
Flexibility
Flexibility does not mean instability. It means having system modules that can
handle change. For example, domain properties are probably unknown as of
the beginning of the development. One should design a module to handle these
properties as development progresses.
Interoperability
Reconfigurability
Reusability
Reusability means that the code or markup can be used for more than one
function or data type. A key principal object-oriented method for code
reusability is inheritance. CORBA supports inheritance at the interface level.
An important tool for assisting in the code reusability design is the Interface
Definition Language (IDL).
Scalability
Scalability, or extensibility, is the ability for the system to grow or adapt. This
principle is basic to software life cycle architecture. Scalability is not
functionality (number of features). It is the opportunity for increased
functionality. One needs to consider compatibility of code design and data
format.
Simplicity
Stability
What is given here is a nutshell, a very small one at that, on correct basic
project management guidelines. You may state a solution in a brief paragraph
when you do a very simple design program or you may need reams of paper
for a complex project. The guidelines given here are for an XML project. For
CORBA, guidelines 1-5 and 10 are pertinent.
Because XML permits you to define your own tag sets (start-tag and end-tags
as well as the content type that is delimited by these two tags) or an
empty-element tag, one needs to establish clearly one’s design goals. Also,
XML is used to handle both text and data transactions.
There is the tendency to define the quality control process, if at all, at the end
of a project definition. Testing criteria should be established up front because
these criteria are usually stated in the context of the known. You are seeking to
achieve success in an unknown environment.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Guideline 3: Define Skill Process
Only two dates are really important to a project. They are the start date and the
customer’s expected end date. The ultimate question is “Can the expected
goals be achieved realistically by the end date?” If not, negotiate a new end
date if possible. All other dates are just management milestones to achieve
success.
Not adhering to a validity constraint may or may not cause an error. However,
a valid XML document adheres to all these constraints. A validating XML
processor must report errors of validity constraints at the user’s option. User’s
option means you can enable or disable the reporting mechanism for these
constraints.
There is no one answer for every situation and every location. You do need to
consider your environment. You must factor in legacy. Legacy is any software
you have placed in production status or any hardware now active in the
system.
Note: This book is concerned with the CORBA model and architecture for
designing XML document type definitions that reflect the implications of
CORBA general design principles.
Your user role has an impact on your design. The magic word is
interoperability. In a distributed system you can have one or more of these
roles:
• User
• Administrator or maintainer
• Object developer
• ORB agent (one who implements)
Each of the roles requires a different level of comprehension and perspective
of CORBA. The user views CORBA in a transparent manner while the
developer must know all the nuts and bolts. A developer does not just know
some of the rules but all the rules, and adheres to them.
For CORBA designing one needs to comprehend the boundaries of domains,
services, facilities, and APIs. In comparison one needs to know the
implications of XML logical and physical structures and the resulting
elements, attributes, and entities.
If one uses Rational Software Corporation’s Unified Modeling Language
(UML) as a part of one’s design methodology, one must consider a key
element of UML, the class diagram. A class diagram describes classes and
their static relationships to other classes. From a class diagram, one might
select classes that might be used to declare XML elements and entities. Can a
relationship be considered an XML attribute?
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Perhaps a design principle can be established for relating IDL and XML. IDL is a definition
language that defines interfaces in CORBA. XML is a markup language that can declare the
structures of CORBA interfaces using the document metaphor.
Note: The word used with XML is “declare” rather than “define” since you have element, attribute,
and entity declarations.
Note: You can actually use a set of document type definitions. The XML dialect Chemical Markup
Language (CML) uses three. This book discusses four DTDs that might be considered integral to each
other.
In the section called “Use Good Project Management Practices” earlier in this chapter, the example
guidelines given are pertinent to XML. The ones that should be written and kept where you can see
them at all times are:
• Guideline 1: You define you own tag sets (start-tag and end-tag) or empty-element tag.
• Guideline 8: Adhere to well-formedness constraints. (Listed in Appendix D)
• Guideline 9: Adhere to validity constraints. (Listed in Appendix D)
Note: Well-formedness and validity processor constraints are discussed in the context of production
rules in Chapter 2. As a part of XML jargon, XML documents are well-formed and valid.
XML was not designed or developed to replace HTML. XML was designed to enhance a subset of
SGML to enable SGML legacy documents to be used on the Internet. XML uses the logical and
physical document metaphor. In an object-oriented environment, a document might be used as an
object or a class.
XML looks like and feels like HTML; however, it does not taste like it. XML has tag sets and they
must be used in pairs, no exception. XML is more concerned with structure than form. XML design
has to be based on a set of production rules (89) and a set of processor constraints (31) rather than
rules for tags as is in HTML.
The basic rule of system designing is the system requirements and capabilities. This activity should
lead to defining system objects. Why is this important? You could have a document type called
system (a document description) that has at least these three declared elements. This DTD could
initially begin as:
<!DOCTYPE system [
<!ELEMENT system (requirement, capability, object)+ >
<!ELEMENT requirement (#PCDATA) >
<!ELEMENT capability (#PCDATA) >
<!ELEMENT object (#PCDATA) >
]>
Note: There are a number of efforts going on to resolve differences between HTML and XML.
However, this discussion is limited primarily to designing XML document type definitions in the
context of CORBA.
Note: JDK 1.2 provides Java IDL as an Object Request Broker (ORB).
There are a number of efforts going on to resolve the integration of Java as an operating language
and XML as a markup language. However, this discussion is limited primarily to designing XML
document type definitions in the context of CORBA.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Chapter 11
Designing an XML DTD for CORBA
Domains
Included in This Chapter:
• Declaring the Document Type: Domains
• Before Declaring Any Element
• Declaring Element Type: Reference
• Declaring Element Type: Represent
• Declaring Element Type: Addressing
• Declaring Element Type: Connect
• Declaring Element Type: Security
• Declaring Element Type: Type
• Declaring Element Type: Transaction
• Possible XML Solution
This chapter considers the design issues for developing XML DTDs for
CORBA domains at a very high level. It is important to distinguish among
three major parts (CORBAservices, CORBAfacilities, and domains) of the
CORBA infrastructure, a structure that is concrete and abstract. While one
might see these parts as blocks connected to an Object Request Broker (ORB),
one could visualize these parts together without their distinctive relations to
the ORB as a pyramid with CORBAservices on the bottom, CORBAfacilities
in the middle, and domains on top. Another visual would be a set of circles
like a bull’s-eye with the inner circle being CORBAservices and the outside
one being domains.
Now that you are confused trying to do visuals, let’s try three definitions. The
key word is service in each definition.
• CORBAservices provide services for objects.
• CORBAfacilities provide services for applications.
• CORBA domains provide services for functions.
One of the many definitions for “service” is “work for another.” Another
definition is “an act of assistance.” Perhaps a contextual definition is that these
three CORBA components, sets of interfaces, process variables that are
defined by objects, applications, or functions.
Now that the word “service” is as clear as the Mississippi River, what is a
“domain”? Perhaps more clearly, what types of domains are being defined by
or may be defined by CORBA committees? Some potential types of domains
are management, language, security, telecommunications, electronic
commerce, financial, and transportation. Some domains may further extend
services or facilities such as security or electronic commerce from the facility
accounting.
The premise here is that an XML document can handle data and that one can
also use the concepts developed for CORBA domains as a starting point for
eventual CORBA/XML integration.
The information here is a loosely defined structure for looking at the issue of
CORBA/XML integration for domains. A number of actions have to be
completed prior to having a clearly defined model. The obvious first step is the
development of clear or clearer definitions for basic CORBA- services and
CORBAfacilities by the various CORBA development committees.
Also see Chapter 12 (Services) and Chapter 14 (Facilities) for parallel thoughts
on this type of activity. This chapter looks at the potential use of CORBA
domains and of XML with various domains through discussions of seven
interoperability issues.
<?xml version="1.0">
<DOCTYPE domains [
<!ELEMENT domains (reference, … , transaction)>
]<
The data that goes within the ellipsis are the other interoperability areas for
any CORBA domain. This chapter looks at seven interoperability areas.
Included here are brief discussions of DTD design considerations for creating
a separate DTD for each interoperability area.
Some of the interoperability areas are changed for ease of markup, such as
addressing for Network Addressing. The seven areas used in this chapter are as
follows:
• Reference
• Represent (Representation)
• Addressing (Network Addressing)
• Connect (Network Connectivity)
• Security
• Type
• Transaction
One defines any interoperability area by its scope. A scope establishes a range
of operations or a place where there is a common view of interoperability.
Why are interoperability areas (issues) used instead of a potential domain such
as telecommunications? There are two reasons. The first is the key word
“potential.” The second is that no matter what domains are developed they
have seven issues that must be resolved in the design.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Before Declaring Any Element
Before one can look at declaring an element for the document type domains,
one must consider the architecture or model for CORBA domains. This model
includes:
• Technical definition of domain
• Bridging
• Place of ORBs
• Definition of interoperability
• Architecture of interoperability
These five areas should be used in the fundamental design of the seven
components of the domains DTD. For example, one might need to declare
bridge types.
The CORBA Specification says that a domain partitions a system into
component collections that have a set of common characteristics. A domain’s
scope is a collection of objects and is a member of the domain through
association with common characteristics. In each of the following sections, a
scope definition is given for each element. For example, the common
characteristic for reference is meaning or the object reference (objref).
One can relate domains in two ways, containment and federation. First,
containment is where one domain resides within another. Second, federation is
where two or more domains are related through a mutual agreement. The
mutual administrators set up a federation.
A bridge is a mapping mechanism that serves as a kind of “translator” to
handle requests between domains. A bridge resides at the boundary between
the domains. A bridge more technically stated is an “inter-ORB bridge.”
Bridging, the action of the bridge, is to handle an invocation between a client
and a server object. Each of course is in a different domain. There are two
types of bridging:
• In-line
• Request-level
A bridge needs also to manage proxy objects. There are two proxy
management techniques:
• Reference translation
• Reference encapsulation
Everything seems to come in pairs. There are two types of request-level
bridges:
• Interface-specific
• Generic
Within the CORBA Core Specifications some interfaces have been defined
that are relevant to developing a generic request-level bridge. Five of these
interfaces are:
• CORBA Object References
• Dynamic Invocation Interface (DII)
• Dynamic Skeleton Interface (DSI)
• Interface Repositories
• Object Adapters
An ORB’s place in life is to handle messaging in a transparent manner. A
consequence of this transparency is interoperability. Any given CORBA
service can be handled separately or independently with one or more domain.
Do not expect a universal ORB. Expect vendors to develop meaningful, that
means marketable, ORBs.
One can have at least seven interoperability concerns as given above. One can
have a broad non-meaningful definition of interoperability or one can have a
meaningful one within a specific context such as the structure of CORBA.
One way to look at interoperability is to consider its elements, not XML
elements. There are at least three identified elements:
• ORB interoperability architecture
• Inter-ORB support
• General and Internet inter-ORB Protocols (GIOPs and IIOPs)
A second way to look at interoperability is through relationships. The
centerpiece is the method of selecting CORBAservices to CORBA domains.
The method created may be how one resolves the seven interoperability issues.
The ORB interoperability has two interesting keystones for its framework. The
first keystone is having either immediate or mediated bridging. The second
keystone is the implementation of half-bridges for mediated bridge domains.
When there need to be local control domains, there is the need for inter-ORB
bridge support. This support element specifies ORB APIs and conventions to
ensure the appropriate content and semantics mapping controls. This function
is not a CORBA responsibility but one for vendors or system administrators.
When one looks at the protocol issues, one needs to think about protocol issues
in general as well as CORBA specific. A specific instance is a relationship of
protocols and IDL.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
A security policy domain governs aspects as determined by the security
authority that needs to be enforced. This is where the security authority’s
scope is delimited. This is the place for rules and criteria for:
• Access control
• Accountability
• Authentication
• Delegation
Note: Two concerns are the domain’s levels of scalability and granularity.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Chapter 12
Designing an XML DTD for CORBAservices
Included in This Chapter:
• Declaring the Document Type: Services
• Declaring Element Type: Naming
• Declaring Element Type: Event
• Declaring Element Type: Persistent
• Declaring Element Type: LifeCycle
• Declaring Element Type: Concurrency
• Declaring Element Type: Externalization
• Declaring Element Type: Relationship
• Declaring Element Type: Transaction
• Declaring Element Type: Query
• Declaring Element Type: Licensing
• Declaring Element Type: Property
• Declaring Element Type: Time
• Declaring Element Type: Security
• Declaring Element Type: Trader
• Declaring Element Type: Collections
This chapter uses the premise that an XML document can handle data and that CORBA is fundamentally a
series of interfaces; thus, one can design an XML document that organizes and declares the variables that
might go into the interfaces. This chapter uses “brainstorming” to state important concepts about the
structures and values of CORBAservices interfaces that are necessary knowledge for the fundamentals for
planning, designing, and developing any XML DTD or DTDs for CORBAservices. The brainstorming
information comes from Chapter 8 and from the CORBAservices Specification (various chapters are dated
1996-1997).
The idea for a document type definition (DTD) for CORBAservices as given here is broadly structured using
the interfaces for declaring XML elements. The information given here is a high-level guideline (a way, not
the way) for looking at the issue of CORBA/XML integration. It is recognized that an object-oriented
programming language such as Java would be required to complete this integration.
In Chapter 13 the Security Service details more than the other services in this chapter. Also see Chapter 11
(Domains) and Chapter 14 (Facilities) for parallel considerations.
<?xml version="1.0">
<DOCTYPE services [
<!ELEMENT services (naming, … , collections)>
]<
The data that goes within the ellipsis are the other 13 services. Five of the service names are changed for ease
of markup (Life Cycle, Persistent Object, Concurrency Control, Object Trader, and Object Collections). The
15 services as used in this chapter are as follows:
• Naming
• Event
• Persistent
• LifeCycle
• Concurrency
• Externalization
• Relationship
• Transaction
• Query
• Licensing
• Property
• Time
• Security
• Trader
• Collections
Each of the following sections begins with a kind of brainstorming of each service based on information
from Chapter 8 and from the CORBAservices Specification. The focus of the brainstorming is to establish a
“draft” framework of the logical structure of each service. This in turn is the basis for developing a logical
XML structure and in some cases an enhanced physical structure for a service. There is one necessary entity,
the document entity.
Warning: The information given here should NOT be considered complete. It is procedural guidelines for
relating concepts from CORBA with those from XML. These declarations are commented to reflect possible
alternatives to the ones given.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
This example is mostly placeholders. One can put values of each <!Element> in a separate file. An
<!ENTITY … > signifies a container for ProxyPushConsumer data.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Declaring Element Type: Relationship
Here are some basic points one might get from brainstorming about the
Relationship Service:
• Relationships can be:
• One-to-one
• One-to-many
• Provides dynamic relationships
• Categories
• Cardinality
• Degree
• Roles
• Semantic
• Types
• Kinds of objects
• Roles
• Relationships
• Levels of service
• Base
• Graph
• Specific
• Two core interfaces
• Relationship
• Role
• Secondary interfaces (some)
• RelationshipFactory
• RoleFactory
• RelationshipIterator
• Need to have clear definitions of relationships and roles for design
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Declaring Element Type: Property
Here are some basic points one might get from brainstorming about the Property Service:
• An object can store information on another object.
• Property has a name and value
• Supports:
• Defining
• Deleting
• Enumerating
• Checking
• Property modes
• Normal
• Readonly
• Fixed_Normal
• Fixed_Readonly
• Undefined
• Interfaces that must be supported
• PropertySet
• PropertySetDef
• Other interfaces
• PropertiesIterator
• PropertyNamesIterator
• PropertySetFactory
• PropertySetDefFactory
<- - Property Service has two interfaces that must be supported - ->
<- - Has four other interfaces - ->
<!ELEMENT property (Set, SetDef)>
<- - full name is PropertySet - ->
<- - supports a set of properties - ->
<!ELEMENT Set EMPTY>
<- - full name is PropertySetDef - ->
<- - exposes a property's characteristics (metadata) - ->
<!ELEMENT SetDef EMPTY>
In this design two ideas must be taken into account. The first is an answer to the question, “Why
should information from an object be stored with another object?” The second idea is that any
property has a name and a value. One needs also to determine how the four functions (creating,
deleting, enumerating, and checking) are implemented in the basic DTD design.
Note: When Pope Gregory XIII proclaimed the Gregorian calendar to be the calendar of the Church it
was October 15, 1582 (Gregorian calendar), while the prior day was October 4, 1582 (Julian calendar).
The Gregorian calendar did not become the dating standard in Europe until the time of the Communist
Revolution.
<- - Trading Object Service has three major service interfaces - ->
<- - Has a large number of interfaces based on functionality - ->
<!ELEMENT trading EMPTY>
<!ELEMENT type (potential | considered | matched | ordered
| returned)
"potential">
<!ELEMENT function (lookup | register | link | proxy |
admin) "lookup">
<!ELEMENT preference (max | min | with | random | first)
'with'>
The keys for developing a design for the Object Trader Service are types of offers and functionality,
in particular those of the TraderComponents Interface. This example shows how to use “or” (|) in
<!ELEMENT>. The default is the value within the double quotation marks or the single quotation
marks, such as “potential” or ‘with.’
Previous Table of Contents Next
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Declaring Element Type: Collections
Here are some basic points one might get from brainstorming about the Object
Collections Service:
• Manipulates a group of objects as one
• Some collection properties
• Unordered
• Unique
• Map
• KeySet
• Set
• Multiple
• Relation
• KeyBag
• Bag
• Heap
• Ordered
• Sorted
• Unique
• Sorted Map
• Key Sorted Set
• SortedSet
• Multiple
• Sorted Relation
• Key SortedBag
• Sorted Bag
• Sequential
• Multiple
• Equality Sequence
• Sequence
• Operation types
• Creating
• Adding
• Removing
• Replacing
• Retrieving
• Inquiring
• Client selects a collection interface that offers grouping properties
that match needs.
• Collection
• OrderedCollection
• KeyCollection
• EqualityCollection
• SortedCollection
• SequentialCollection
• EqualitySequentialCollection
• EqualityKeyCollection
• KeySortedCollection
• EqualityKeySortedCollection
• There is a series of interfaces based on functions.
• Operations
• Command
• Comparator
• There are 32 interfaces for concrete collections and their factories.
• There are ten interfaces for restricted access collections and their
factories.
• There are 11 iterator interfaces.
• There are a total of 67 Object Collections interfaces.
• Required element information
• How to do comparisons
• How to test equality
• How to do checking
The design for <!ELEMENT collections (…) > should be within the grouping
interfaces such as follows:
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Chapter 13
Designing an XML DTD for the
Security Service
Included in This Chapter:
• Speaking “Policy”
• Identifying Attributes
• Using the Application Developer’s Interfaces
• Using the Administrator’s Interfaces
• Using the Implementor’s Interfaces
• Planning an XML Security Service DTD System
• Guidelines for Developing DTDs for Security
There is only one security principle; everything else is commentary. The
highest level of security is the weakest link in the system.
Within CORBA security is the mechanism or policy1 infrastructure that
defines and enforces access control on objects and their constituents. In a
broader sense the security mechanism authenticates and validates a user’s
identification and protects a system’s integrity that is its communication
component, requests and responses. This mechanism should be as transparent
to the client as possible. Simply stated, the key functions of security are:
1The OMG security specification is based on the implementation of a “local”
security policy. The framework is generic. This policy serves as a framework
for a security reference model. Developers, administrators, and implementors
determine the implementation result.
• Access control
• Administration
• Auditing
• Authentication
• Authorization
• Identification
• Non-repudiation
• Secure communication
What should be the design goals of a CORBA security service? This list
sounds like the reasons for the design goals or principles of XML. They are as
follows:
• Accountability
• Confidentiality
• Consistency
• Flexibility
• Access control
• Audit policy
• Profiles
• Interoperability
• Minimal performance overhead
• Object-oriented
• Portability
• Scalability
• Simplicity
• Technologically neutral
• Usability
• Administrators
• Developers
• End users
In the context of defining functions and establishing goals for security, one
needs to identify various types of attributes. Three broad attribute types are:
• Public
• Authenticated
• Delegated
Because of the importance of security, extensive development is going on in
CORBAservices, CORBAfacilities, and domains. Security is briefly alluded to
in Chapters 11 and 14. Security is a fundamental component of the CORBA
infrastructure.
Besides considering the importance of CORBA interfaces and related
attributes, design principles, and functions for security, there are other items
one should put in the design. They include:
• Security associations
• Server implications
The key to security association is trust. There needs to be a persistent method
for security between a client and a target object. Besides trust, there also need
to be methodologies for establishing credentials and a protected context.
Each server style has its implications for the degree of security possible. Its
object adapter determines the server style. In the design of the CORBA
Security Service, one needs to look at the functionality of least four server
types:
• Shared
• Unshared
• Per method
• Persistent
To design and develop an XML DTD2 that reflects key security functionality
and CORBA implementation of a security service, one must be knowledgeable
of two items:
2While “an XML DTD” is used here perhaps it is more practical to use the
phrase “an XML DTD system” to further enhance the protection of the
security infrastructure.
Speaking “Policy”
One can more easily comprehend the CORBA security infrastructure when one
can define the basic functionality of each policy type. Policy applies to the
objects, while security technology focuses on how to implement the
functionality.
Client invocation The access decision is either yes or no. Does the client
access have the right to invoke the access?
Target invocation The access decision is either yes or no. Does the
access target have the right to do this invocation?
Application access Domain manager determines the granularity of access.
Client invocation audit The nature of the event and criteria determines policy
control for the client.
Target invocation audit The nature of the event and criteria determines policy
control for the target.
Application audit The application may determine policy control rather
than the security domain.
Delegation The nature or type of delegating determines policy
control. Delegation includes the roles and
responsibilities of intermediaries.
Client secure This invocation’s determination includes resolutions
invocation for confidentiality, integrity, and privacy. It also
invokes authentication for the client.
Target secure This invocation’s determination includes resolutions
invocation for confidentiality, integrity, and privacy. It also
invokes authentication for the target.
Non-repudiation This optional facility provides evidence of acts by an
application in a form that cannot be repudiated at a
later time.
Construction This policy controls the creation of domains.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Identifying Attributes
There is no simple list of attributes for a security service because of local goals
and legacy hardware and software. Perhaps there are some common attributes
or attribute types. A common attribute would be a client’s identification. A
common attribute type would be level of trust. One might define an attribute as
a specific characteristic with a specific instance. An attribute type might be
defined as a generally characteristic with its own secondary characteristics.
One general thinks of read, write, and read-write levels of protection, but
perhaps there are different levels of protection such as ones for e-mail and
those for chat.
The obvious area to look at for attributes is the access control function. There
may be three types of access control attributes:
• Privilege
• Control
• Rights
Some of the privilege attributes are:
• Client’s identification
• Client’s function(s) or role(s)
• Client’s organizational affiliation(s)
• Client’s clearance level
• Client’s operational level
Some of the control attributes are:
• Control list types
• Information labels
• Sharing capabilities
Rights can be established on:
• Individual basis
• Group basis
• Functional basis
• Operational basis
The second area for identifying attributes is for the auditing function. Auditing
can be divided into broad categories: system and application. An audit
structure is usually called a policy. Auditing can involve logging events, alerts,
or alarms. An audit invocation can include types of:
• Object
• Operation
• Event
• State (success or failure)
The third area for identifying attributes is the delegation function. At least two
types of delegation schema are privilege and reference. Delegation can involve
four objects:
• Initiator
• Invoker
• Intermediary
• Receptor
When considering the privilege delegation, there are two concepts that have to
be considered: control type and delegation type. Control type comes in three
flavors:
• Privileges delegated
• Target restrictions
• Privileges used
The delegation types that are used by CORBA security interfaces include:
• None
• Simple
• Composite
• Combined
• Trace
• Time control
The fourth area for identifying attributes is the non-repudiation function. This
function makes users accountable for their actions. CORBA uses application
control rather than object invocation. The three key components of
non-repudiation are:
• Evidence
• Time
• Date
• Data origin
• Data integrity
• Proof of creation
• Proof of reception
• Action or event type
• Action or event parameters
The interface ORB has two parameters for “in” and “out” information. They
are:
• service_type
• service_information
A Credentials object has four “in” and three “out” attributes. They are:
• method
• security_name
• auth_data
• privileges
• creds
• continuation_data
• auth_specific_data
For an authentication that requires multiple operations, there are one “in,” one
“in-out,” and two “out” attributes:
• response_data
• creds
• continuation_data
• auth_specific_data
There are three Boolean attributes (true or false) to set privilege. Two are “in.”
They are:
• force_commit
• requested_privileges
• actual_privileges
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
A client application that is security-aware can perform certain operations to
specific security policy. These operations include:
• override_default_credentials
• override_default_QOP
• get_active_credentials
• get_security_features
• get_policy
• get_security_mechanism
• override_default_mechanism
• get_security_names
The Current object represents service-specific state information associated
with the current execution context. The information can use one or more of
these credential types:
• Invocation
• Own
• Received
• Non-repudiation
The Audit Channel object receives an audit record. The record must contain:
• Event type
• Actor with credentials
• Event-specific data (varies by event type)
• Time
In the delegation chain the intermediate object can do one of three actions.
These actions are:
• Delegate credentials to next object in the chain.
• Act for itself.
• Supply privileges from both initiator and self.
Warning: This section highlighted only some of the interface variables and
some of their associated variables. These data assist one in creating a
modeling process using CORBA data for designing an XML DTD with the
document type of security.
Note: One area of the model that needs development is one for explicit
management interfaces.
Note: There is one standard interface for application access, but not one for
administration.
The get_required_rights operation has three “in” and two “out” attributes.
They are:
• obj
• operation_name
• interface_name
• rights
• rights_combination
Warning: This section highlighted only some of the interface variables and
some of their associated variables. These data assist one in creating a
modeling process using CORBA data for designing an XML DTD with the
document type of security.
Warning: This section highlighted only some of the interface variables and
some of their associated variables. These data assist one in creating a
modeling process using CORBA data for designing an XML DTD with the
document type of security.
Previous Table of Contents Next
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Planning an XML Security Service DTD System
Based on the CORBA Specification, there are three views or users of the
CORBA security infrastructure. They are developers, administrators, and
implementors. There are also at least ten activities that these users need to
consider in the implementation of a CORBA security service. They are:
• Associating client and target through an ORB.
• Identifying access control decision points.
• Defining the client’s privilege attributes (a principal).
• Defining the target’s control attributes.
• Defining the privileges or controls of any intermediaries.
• Establishing policy domains.
• Identifying the role of each domain manager.
• Delegating operations to any external security mechanism.
• Determining the role and impact of the Object Transaction Service
(OTS).
• Implementing security defaults.
When one gets ready to develop an XML DTD that assists in an integration of
XML, CORBA, and the legacy environment, one must consider a number of
issues:
• What are the criteria for using an object-oriented programming
language such as Java in designing and developing this integration?
• Acknowledge that the ORB in and of itself offers minimal security
and there needs to be an infrastructure that establishes local goals for a
perceived secure level.
• Identify all the values in the CORBA Specification for a Security
ORB with its associated interfaces and operations.
• Consider the design proposal that the “gets,” “sets,” etc., are a
potential way of designing the DTD.
• What should be the level of detail of the XML DTD for designing a
CORBA Security ORB?
• Has one accounted for all the key functions of security such as
confidentiality and accountability?
• Has one ensured that the five key security services have been
implemented in the DTD design?
• Authentication
• Authorization
• Confidentiality
• Integrity
• Non-repudiation
• Has the DTD design established the places of the client and target
objects?
• Has the DTD design considered adequately all privilege and control
attributes?
• Has the DTD design taken into account the delegation roles of the
initiator, intermediaries, and final target?
• Has there been a review of the differences between Level One and
Level Two security?
• Have all the criteria of the 11 security policies of the ORB been
evaluated as to how they affect the local security infrastructure?
• Application accesses and audits
• Client and target invocation accesses
• Client and target invocation audits
• Client and target secure invocations
• Construction
• Delegation
• Non-repudiation
• Have the operations of the request and message interceptors been
considered in the design?
• Has the place of families (group with mutual characteristics) been
determined?
• Have data types been identified that are necessary for developing each
of the services?
• Have the developmental steps been defined for each type of user—the
application developer, the administrator, and the implementor?
• Can there be a common DTD template that can be used by all three
user types?
These seventeen issues reflect that the designing of an XML DTD for Security
Services may not be an easy task. In fact, the last question may be the key
design question. Should there be only one DTD? That answer is perhaps. It can
be no because there are different document types as established in other
chapters. There can be different views of the same data. The working word is
data, not text. Each individual must work out her or his own DTD; however,
there may be a common process. The detail evolves out of one’s XML
experience, security infrastructure experience, and needs. Perhaps in a later
evolution in knowledge of CORBA and of XML implications there can be an
answer of yes.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Chapter 14
Designing an XML DTD for CORBAfacilities
Included in This Chapter
• Declaring the Document Type: Facilities
• Declaring Element Type: UserIf
• Declaring Element Type: Information
• Declaring Element Type: Systems
• Declaring Element Type: Task
• Declaring Element Type: Imagery
• Declaring Element Type: InfoSuper
• Declaring Element Type: Manufacturing
• Declaring Element Type: Simulation
• Declaring Element Type: OAGI
• Declaring Element Type: Accounting
• Declaring Element Type: AppDev
• Declaring Element Type: Mapping
This chapter declares some XML elements and attribute lists for some of the 12
facilities that make up CORBAfacilities based on information from Chapter 9 and the
CORBAfacilities: Common Facilities Architecture V4.0 November 1995 Specification.
The premise here is that an XML document can handle data and that one uses the
concepts developed for CORBAfacilities as a starting point for eventual CORBA/XML
integration. This chapter is basically a “what-if” one rather than a “how-to” chapter.
The XML examples for CORBAfacilities are broadly structured using the interfaces for
declaring XML elements. The information given here is a set of brainstorming sessions
looking at the issue of CORBA/XML integration. It is recognized that a number of
applications would be required to complete this integration.
Also see Chapter 11 (Domains) and Chapter 12 (Services) for similar considerations.
This chapter looks at the potential of CORBAfacilities and the potential use of XML
with various facilities.
<?xml version="1.0">
<DOCTYPE facilities [
<!ELEMENT facilities (rendering, … , mapping)>
]<
The data that goes within the ellipsis are the other CORBAfacilities. This chapter looks
at both horizontal and vertical CORBAfacilities. There are various DTD design
considerations as creating two document types facilities-hor and facilities-ver. This
design is one possibility with the facilities given sequentially as in the Specification.
Some of the facility names are changed for ease of markup, such as rendering for
Rendering Management. The 12 facilities as used in this chapter are as follows:
• UserIf (User Interface Common Facility)
• Information (Information Management Common Facility)
• Systems (System Management Common Facility)
• Task (Task Management Common Facility)
• Imagery
• InfoSuper (Information Superhighways)
• Manufacturing
• Simulation (Distributed Simulation)
• OAGI (Oil and Gas Industry Exploration and Production)
• Accounting
• AppDev (Application Development)
• Mapping
Note: The two special CORBAfacilities, Internationalization and Security, are not
discussed in this chapter.
Each of the following 12 sections begins with a kind of brainstorming of each facility
based on information from Chapter 9 and from the CORBAfacilities Specification. The
focus of the “brainstorming” is to establish a “draft” framework of the logical structure
of each facility. This, in turn, is the basis for developing a logical XML structure and in
some cases an enhanced physical structure for a facility. There is one necessary entity,
the document entity.
Warning: The information given here should NOT be considered complete. It is ideas,
or even better, it is speculations for relating concepts from CORBA with those from
XML. These declarations are commented to reflect ideas for design.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
This is a broad sweep of the possibilities for the User Interface Facility. Where CDATA is used perhaps is the
location for identifying an applications and its location. Another area to be expanded is Desktop Management and its
functions.
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Declaring Element Type: InfoSuper
Here are some basic points one might get from brainstorming about the Information
Superhighways Facility:
• Think Internet functionality
• Six areas
• Commerce
• Resource discovery (search)
• Intermediaries
• Teleconferencing
• Experimentation
• User access
• Commercial concerns
• Advertising
• Monitoring
• Costing
• Types of intermediaries
• Broker
• Intelligent agent
• Mediator
• Trader
• Types of teleconferencing
• Collaboration
• Mentoring
• User access issues
• Interface level (novice or expert)
• Profile management
• Group association
<- - for spec2 need storage location, format and type - ->
<- - also need access application - ->
<- - identify objects as events; be able to display
response - ->
<- - consider Event Facility - ->
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Declaring Element Type: Accounting
Here are some basic points one might get from brainstorming about the Accounting
Facility:
• Specific functionality across industries
• Activities (electronic)
• Money exchange
• Payroll
• Purchases
• Sales
• Online charges
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Chapter 15
Final Thoughts, Summary, and
Conclusions
Included in This Chapter:
• Final Thoughts
• Summary
• Conclusions
This chapter is divided into three areas. Final thoughts are just ideas that have
evolved out of doing this book. The summary relies on the basic principle of
telling people what you are going to say (introduction), telling them in detail
(the body of the book), and reminding them of what you said (final chapter).
Conclusions are where one can go with this information and what actions or
consequences result from the information in the book.
Final Thoughts
The Common Object Request Broker Architecture (CORBA) and the
Extensible Markup Language (XML) are two very dynamic technologies for
handling object-oriented data. Perhaps their evolutions can have a common
path of friendship. It seems that:
• CORBA has to have further growth defining its CORBAfacilities and
domains.
• XML has to grow to handle data in multiple locations and in multiple
display formats.
It appears there is a potential for some kind of integration of CORBA and
XML. An area that must be included is modeling and the place of the Interface
Definition Language (IDL) in this “merging” of technologies.
Summary
The book began with a look at the practical implications of XML such as its
grammar and benefits. There were also three comparisons given as XML to
SGML, HTML, and Java.
The next discussion was concerned with the place and order of a production
rule because of its importance in an implementing context. There was an
overview of key XML concepts:
• Production rules overview
• Well-formed documents
• Valid documents
• Logical structures
• Physical structures
• XML processor constraints
Next there was a discussion of ten frequently asked questions about a DTD.
The rest of the book is an outgrowth of the answers from this FAQ.
Then there was a look at the fundamental process for developing a document
type definition (DTD). The ideas were extended in the chapters on developing
DTDs for CORBAservices and CORBAfacilities. This look also included
discussions on key tools for developing a DTD and XML documents—parsers,
editors, and browsers.
The next topic covered was modeling. The focus was on the Document Object
Model (DOM). It was shown how the DOM permits one to view an XML
document as a data holder and as an object of the CORBA paradigm. It was
stated that the DOM should be the API standard for handling XML documents
in applications, browsers, and editors. Also included was a four-part example
of Java code, an XML DTD, XML markup, and DOM output.
Three developing Web technologies and their implications for developing
XML applications for CORBA were then discussed:
• Distributed Component Architecture Modeling (DCAM)
• Interface Definition Language (IDL)
• Unified Modeling Language (UML)
To close out model and definitional languages there was a discussion on the
importance of Web Interface Definition Language (WIDL), a new Web
technology for conceptually developing XML applications for CORBA from
webMethods. It was stated that this technology goes hand-in-hand with the
Document Object Model (DOM) and Distributed Component Architecture
Modeling (DCAM) technologies.
The “headlines” metaphor was used to establish the fundamentals of CORBA.
This was a “search” for the components, features, functions, or parts of
CORBA that can be equated to XML elements, attributes, or entities. The
search included a look at the architecture, the ORB, domains, CORBAservices,
Security Service, and CORBAfacilities.
Next there was a brief review of the essentials of CORBAservices. This review
established descriptive information for the development for XML examples
using CORBAservices as a document type labeled services (Chapter 12).
Then there was a brief review of the essentials of CORBAfacilities. This
review was used to establish descriptive information for the development of a
document type definition (DTD) using CORBAfacilities as a document type
labeled facilities (Chapter 14).
Next was a consideration of the ten general key design and development
issues. Specific issues were also considered. These issues come in two
categories, single environment or multiple environments. A single
environment is considering CORBA itself. A multiple environment is
considering CORBA and XML integration.
The next four chapters dealt with the design issues for developing XML DTDs
for CORBA domains, CORBAservices, security as a CORBA service, and
CORBAfacilities. The discussion on the DTD CORBA domains was at a very
high level because of the level of development on domains. The discussion on
a DTD for CORBAservices presented a model filled with potentials. The
premise was that an XML document can handle data and that CORBA is
fundamentally a series of interfaces, thus, one can design an XML document
that organizes and declares the variables that might go into the interfaces. The
discussion on DTD security as a service was a look at the potentials in the
DTD for CORBAservices. The final discussion was on developing XML
examples for CORBAfacilities. This discussion was basically a “what-if” one
rather than a “how-to” chapter.
Conclusions
The major conclusion is that one needs to have experiences with both XML
and CORBA to see where object-oriented technology may go. Both of these
technologies are in stages of growth and potential.
If one wants to further the ideas given in this book, the place to begin is
CORBAservices. If one is a vendor, one should consider in the design of a
facility or a domain how XML might be used to enhance the interface or
product.
This book acknowledges the first design goal of the XML Recommendation
states “XML shall be straightforwardly usable over the Internet,” but it has
been demonstrated that XML has broad application in such as areas as
e-commerce. Taking a broad sweep, this book focused on XML design using
the structures of CORBA so one might get a new perspective on programming
in an object-oriented environment.
This book does not teach XML, but discusses design for experienced
object-oriented developers. One needs to comprehend how an analysis of an
environment, CORBA, assists in design and development of XML elements,
attributes, and entities that reflect that environment.
The potentials of CORBA and XML have not yet begun to be explored or
exploited. The future is full of possibilities!
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Part IV
Appendixes
Included in This Part:
• Appendix A—Terms and Definitions
• Appendix B—XML Alphabetical Production Rules List
• Appendix C—XML Production Rules
• Appendix D—Constraints
• Appendix E—XML Web Sites
• Appendix F—XML Markup Examples
Appendix A
Terms and Definitions
Note: When “Rule n” is referred to in this glossary, it is a reference to a
production rule in XML Recommendation 1.0 (10 February 1998). Appendix
C lists these production rules.1
Term Definition
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Appendix B
XML Alphabetical Production Rules
List
The number following each production rule refers to its number. Please see
Appendix C.
AttDef 53
AttlistDecl 52
Attribute 41
AttType 54
AttValue 10
BaseChar 85
CData 20
CDEnd 21
CDSect 18
CDStart 19
Char 2
CharData 14
CharRef 66
children 47
choice 49
CombiningChar 87
Comment 15
conditionalSect 61
content 43
contentspec 46
cp 48
DefaultDecl 60
Digit 88
doctypedecl 28
document 1
element 39
elementdecl 45
EmptyElemTag 44
EncName 81
EncodingDecl 80
EntityDecl 70
EntityDef 73
EntityRef 68
EntityValue 9
EnumeratedType 57
Enumeration 59
Eq 25
ETag 42
Extender 89
ExternalID 75
extParsedEnt 78
extPE 79
extSubset 30
extSubsetDecl 31
GEDecl 71
Iana Code 36
Ideographic 86
Ignore 65
ignoreSect 63
ignoreSectContents 64
includeSect 62
ISO639Code 35
Langcode 34
LanguageID 33
Letter 84
markupdecl 29
Misc 27
Mixed 51
Name 5
NameChar 4
Names 6
NDataDecl 76
Nmtoken 7
Nmtokens 8
NotationDecl 82
NotationType 58
PEDecl 72
PEDef 74
PEReference 69
PI 16
PITarget 17
prolog 22
PubidChar 13
PubidLiteral 12
PublicID 83
Reference 67
S3
SDDecl 32
seq 50
STag 40
StringType 55
Subcode 38
SystemLiteral 11
TextDecl 77
TokenizedType 56
UserCode 37
VersionInfo 24
VersionNum 26
XMLDecl 23
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Appendix C
XML Production Rules
Note: These rules are from Extensible Markup Language 1.0 W3C Recommendation (10
February 1998).
Warning: [24] implies that one can state version=1.0. This is incorrect; it has to be
either version='1.0' or version="1.0". The quotation marks are literals. [24] should read
VersionInfo ::= S 'version' Eq ("'"VersionNum"'" | '"' VersionNum '"').
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Appendix D
Constraints
There are two types of constraints: well-formedness and validity. They are
consequences for not following the production rules that are used to check for
XML encoding errors by a conforming XML processor. This is a processor
that follows or adheres or conformsA to the well-formedness constraints in the
Extensible Markup Language (XML) 1.0 W3 Recommendation (10 February
1998).
A well-formedness constraint is a rule that when not adhered to produces a
fatal error and a conforming XML processor must report to the application.
The processor terminates and gives a message. The processor cannot continue
to pass character data and information about the document’s logical structure
to the application in the normal way.
A validity constraint is rule that when not adhered to produces an error where
the results are unpredictable. A conforming processor may detect and report an
error and may recover from it. Validating XML processors must report the
errors at user option.
The constraints are grouped by subject. Any production rule that applies is
given at the end of each constraint.
Note: For ease of readability, what is given below in many cases is synopses
of the rules.
Well-Formedness Constraints
Element Type Match
The Name in an element’s end-tag must match the element type in the
start-tag. (Rule 39)
Entity Declared
In a document without a DTD, a document with only an internal DTD subset
which contains no parameter entity references, or a document with
“standalone='yes'”, the Name given in the entity reference must match that in
an entity declaration. Exception: Well-formed documents need not declare:
amp, lt, gt, apos, or quot. (Rule 68)
In DTD
Parameter-entity references may only appear in the DTD. (Rule 69)
Legal Character
Characters referred to using character references must match the production
for Char (Rule 2). If the character reference begins with “”, the digits and
letters up to the terminating ; provide a hexadecimal representation of the
character’s code point in ISO/IEC 10646. If it begins just with “”, the digits up
to the terminating ; provide a decimal representation. (Rule 66)
No Recursion
A parsed entity must not contain a recursive reference to itself, either directly
or indirectly. (Rule 69)
Parsed Entity
An entity reference must not contain the name of an unparsed entity. Unparsed
entities may be referred to only in attribute values declared to be of type
ENTITY or ENTITIES. (Rule 68)
Validity Constraints
Attribute Default Legal
The declared default value must meet the lexical constraints of the declared
attribute type (Rules 54 and 60)
Element Valid
An element is valid if there is a declaration matching elementdecl where the
Name matches the element type, and one of the following holds:
• The declaration matches EMPTY and the element has no content.
• The declaration matches children (Rule 47) and the child element
sequence belongs to the content model language, with optional white
space (Rule 3) between each child element.
• The declaration matches MIXED (Rule 51)and the content consists of
character data (Rule 14) and child elements whose types match names in
the content model.
• The declaration matches ANY, and the types of any child elements
have been declared. (Rule 39)
Entity Declared
In a document with an external subset or external parameter entities with
“standalone='no'”, the Name given in the entity reference must match that in
an entity declaration. For interoperability, valid documents should declare the
entities amp, lt, gt, apos, and quot in the form specified in “4.6 Predefined
Entities” of the Recommendation. (Rules 68 and 69)
Entity Name
Values of types ENTITY and ENTITIES must match the Name and Names
production (Rules 5 and 6) respectively. Each Name must match the name of
an unparsed entity declared in the DTD. (Rule 56)
Enumeration
Values of this type must match one of the Nmtoken tokens in the declaration.
For interoperability, the same Nmtoken should not occur more than once in the
enumerated attribute types of a single element type. (Rule 59)
ID
Values of type ID must match the Name production (Rule 5). ID values must
uniquely identify the elements that bear them. (Rule 56)
ID Attribute Default
An ID attribute must have a declared default of #IMPLIED or #REQUIRED.
(Rule 56)
IDREF
Values of types IDREF and IDREFS must match the Name and Names
production (Rules 5 and 6) respectively. IDEF values must match the value of
some ID attributes. (Rule 56)
Name Token
Values of types NMTOKEN and NMTOKENS must match the Nmtoken and
NmTokens production. (Rules 7, 8, and 56)
No Duplicate Types
The same name must not appear more than once in a single mixed-content
declaration. (Rule 51)
Notation Attributes
Values of this type must match one of the notation names included in the
declaration; all notation names in the declaration must be declared. (Rule 58)
Notation Declared
The Name must match the declared name of a notation (Rule 82).
The SystemLiteral is called the entity’s system identifier. The PubidLiteral is
an external identifier, public. (Rule 76)
Required Attribute
When the default declaration is #REQUIRED, the attribute must be specified
for all elements of the type in the attribute-list declaration. (Rules 52 and 60)
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Appendix E
XML Web Sites
New XML sites are being created every day. This selection is one based on mid-1999. The key three
are the big two and Robin Cover’s site, listed under individual Web sites.
Note: This book uses XML Recommendation 1.0 (10 February 1998) found at:
http://www.w3.org/TR/1998/REC-xml-19980210
The Recommendation uses the Extended Backus-Naur Form (EBNF) notation for the XML formal
grammar. To find out more information on EBNF, go to:
http://www.xml.com/xml/pub/98/10/guide5.html
The XML FAQ (Frequently Asked Questions) site is maintained by the W3C’s XML Working Group.
This is a quick way to get at some of the key issues or concerns with XML. It is found at:
http://www.ucc.ie/xml/
To learn more about document management systems and XML publishing, visit the site that belongs to
Veo Systems, Inc.
http://www.veosystems.com
One of the areas in which XML is being used is push technology. For more details on this
development area, see DataChannel’s site:
http://www.datachannel.com
Some librarians and computer specialists have undertaken a project, Dublin Core, to devise a
searchable language oriented towards documents.
http://www.uk.oln.ac.uk/metadata/resources/dc
To get more information about XML conferences, courses, and publications in general, the Graphics
Communication Association’s site is the place to go:
http://www.gca.org/conf/whatxml/files/whatisxml.htm
Microsoft has its own MSXML and parser. To find out the latest on Microsoft’s view of XML, see its
home page:
http://msdn.microsoft.com
To learn more about Virtual database (VDB) technology and how XML is involved, see Junglee’s site:
http://www.junglee.com/tech/index.html
Note: Microsoft frequently revises its pages. If this URL does not work, just use the top page. Microsoft
has many types of pages on XML; for example, to find out about the Extensible Stylesheet Language
(XSL), do a search on XSL at
http://msdn.microsoft.com
The Platform for Internet Content Selection (PICS) is a project concerned with Web site content to
control over user access:
http://www.w3.org/PICS/
Poet Software has developed an object-oriented database based on the principles of the Common
Object Request Broker Association (CORBA) model as discussed in this book. The company is also
involved in XML technology. The site includes white papers.
http://www.poet.com
For a tutorial on XML, see Architag University’s site:
http://www.sgmlu.com/
SoftQuad has developed Panorama Publisher and Panorama Viewer for multiple platforms. These
tools support XML.
http://www.softquad.com
The Unicode Consortium’s site has details on character sets, the Unicode Standard (Unicode 2.1).
http://charts.unicode.org/
A number of XML dialects have been developed. One of them is Chemical Markup Language (CML).
For details on CML, check the site of Venus Internet of London, England.
http://www.venus.co.uk/
To look at information in the electronic commerce area, a site to go to is the one that belongs to
webMethods. The company has an XML toolkit for data accessing, data handling, and data securing.
http://www.webmethods.com/
Note: webMethods has information also on Web Interface Definition Language (WIDL), which is
important to object-oriented development. For a free download of the toolkit, go to:
http://www.webmethods.com/products/QueryView
The World Wide Web Consortium looks at a variety of, and perhaps all, forms of Web technology.
One area is based on the idea that a Web resource can be represented as an object. This technology is
Resource Description Framework (RDF). For details on RDF’s grammar, tags, and attributes, see:
http://www.w3.org/TR/PR-rdf-syntax/
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
-----------
Appendix F
XML Markup Examples
The first declaration is the XML declaration (Rules 23-26). It is to be used only if the
document is well-formed, that is, the document adheres to the well-formedness constraints
given in XML Recommendation 1.0. See Appendix D, “Constraints.”
<?xml version="1.0"?>
The second declaration is the document type declaration (Rule 28), which can be followed by
markup declaration(s) (Rule 29) and element declarations (Rule 45).
<!DOCTYPE Database [
<!ELEMENT Database (Author)* >
<!ELEMENT Author (Name, Title, pubdate, pages, ISBN, price)
>
<!ELEMENT Name (LastName, FirstName) >
<!ELEMENT LastName (#PCDATA) >
<!ELEMENT FirstName (#PCDATA) >
<!ELEMENT Title (#PCDATA) >
<!ELEMENT pubdata (#PCDATA) >
<!ELEMENT pages (#PCDATA) >
<!ELEMENT ISBN (#PCDATA) >
<!ELEMENT price (#PCDATA) >
]>
<Database>
<!-- This is where the data goes (Comment, Rule 15) -->
</Database>
Example of nesting:
<para1> First level paragraph
<para2> Second level paragraph</para2>
</para1>
Example of a comment:
<?xml version="1.0"?>
<!DOCTYPE greeting SYSTEM "hello.dtd"
<greeting>Hello from the Big D</greeting>
The system identifier hello.dtd gives the URI of a DTD for the document.
Note: URI as used here is defined by Berners-Lee et al., a work in progress expected to
update IETF RFC1738 and IETF RFC1808.
<!ELEMENT br EMPTY>
<!ELEMENT p (#PCDATA|a|ul|b|i|em)*>
<!ELEMENT b (#PCDATA)>
<!ATTLIST termdef
id ID #REQUIRED
name CDATA #IMPLIED>
<!ATTLIST list
type (bullets|ordered|glossary) "ordered">
<!ATTLIST form
method CDATA #FIXED "POST">
<!ENTITY galley
SYSTEM "http://www.myplace.com/template/Galley.xml">
<!ENTITY galley
PUBLIC "-//Myplace//TEXT Standard galley
template//EN"
"http://www.myplace.com/template/Galley.xml">
<!ENTITY galley
SYSTEM "../grafix/Galley.gif"
NDATA gif>
<?xml encoding='UTF-8'?>
<?xml encoding='ISO-10646-UCS-2'?>
<?xml encoding='ISO-8859-1'?>
<?xml encoding="EUC-JP"?>
Example declarations:
<!ENTITY lt "&#60;">
<!ENTITY gt ">">
<!ENTITY amp "&&">
<!ENTITY apos "'">
<!ENTITY quot """>
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.
To access the contents, click the chapter and section titles.
Table of Contents
-----------
Index
#FIXED, 29
#IMPLIED, 29
#REQUIRED, 29
A
abstraction, 158
Accounting Facility, 236-237
ancestor, 70
application access, 204
application audit, 204
Application Development Facility, 237-239
Archive Service, 130
atomicity, 138
AttDef, 26
AttlistDecl, 26
Attr Interface (DOM), 66
Attribute, 21
attribute type, 26
AttType, 26
B
Backup/Restore Service, 130
C
CDATASection Interface (DOM), 67
Change Management Service, 130
Char, 6
character reference, 31
CharacterData Interface (DOM), 67
CharData, 6
CharRef, 31
child, 70
children, 24
choice, 24
client invocation access, 204
client invocation audit, 204
client secure invocation, 204
Collections Service, 197-199
Comment, 19
Comment Interface (DOM), 67
Concurrency Control Service, 128, 130, 132, 186-187
conditional section, 30, 49
conditionalSect, 30
consistent, 138
construction, 205
content, 22
content model, 70
contentspec, 23
context, 70
cooked model, 70
CORBA domain definition, 120-121
CORBA objects definition, 118
CORBA ORB, see ORB
CORBA security model, 207
CORBA Security Service definition 122-123
CORBAfacilities definition, 123-124
CORBAservices definition, 121-122
CORBAservices list, 128-129
CORBAservices support, 154
cp, 24
cursor, 71
D
Data Interchange Service, 130
data model, 71
DCAM obstacles, 80
DefaultDecl, 28
delegation, 204 206
descendant, 71
document, 8, 19, 48
Document Interface (DOM), 68
document type definition (DTD), 44, 46
DocumentFragment Interface (DOM), 68
DocumentTypeInterface (DOM), 68
DOM, 59-78
DOM, definition, 60-61
DOM interface hierarchy, 65
DSSSL, 13
durability, 138
E
EBNF, 5-9
element, 20
element (DOM), 71
element attribute, 25
element content, 23
Element Interface (DOM), 68
element type, 20
element type declaration, 20
elementdecl, 23
empty element, 22
EmptyElemTag, 22
EncName, 36
encoding, 36
EncodingDecl, 36
entity, 49
Entity Interface (DOM), 69
entity reference, 32
EntityDecl, 33, 35
EntityRef, 32
EntityReference Interface (DOM), 69
EnumeratedType, 27
Enumeration, 27
equivalence, 71
ETag, 22
Event Service, 128, 130-131, 183-184
Extended Backus-Naus Form, see EBNF
external entity, 34
ExternalID, 34
Externalization Service, 128, 130-131, 188
extParsedEnt, 18
extPE, 79
F
flexibility, 159
G
GEDecl, 33
I
Ignore, 30
ignoreSect, 30
ignoreSectContents, 30
Imagery Facility, 231-232
Implementation Repository Service, 130
includeSect, 30
Information Management Facility, 144-147, 223-226
Information Superhighways Facility, 232-233
inheritance, 71
initial structure model, 71
interface, 72
internal entity, 33
Internationalization Service, 130
interoperability 159
isolation, 138
L
language binding, 72
Licensing Service, 128, 130, 132, 193
Life Cycle Service, 128, 130, 132, 186
Logging Service, 130
logical structure, 20, 47
M
Manufacturing Facility 233-234
Mapping Facility, 239
method, 72
Mixed, 25
mixed content, 24
model, 72
model definition, 79
modularity, 159
N
NamedNodeMap Interface (DOM), 65
Names, 7
Naming Service, 128, 130, 132, 181-182
NDataDecl, 34
Node Interface (DOM), 66
non-repudiation, 205
notation, 49
notation declaration, 35
Notation Interface (DOM), 69
NotationDecl, 82
NotationType, 27
O
OAGI Facility, 236
Object Collections Service, 128, 130, 133
object model, 72
Object Request Broker, see ORB
Object Trader Service, 128, 130, 134
ORB, 119-120
P
parent, 72
parsed entity, 35
PEDecl, 35
PEDef, 35
PEReference, 32
persistent, 203
Persistent Object Service, 128, 130, 135, 184-185
physical structure definition, 31, 47
PITarget, 8
processing instruction, 49
ProcessingInstruction Interface (DOM), 69
processor constraints, 16
processor guidelines, 36-41
processor role, 56
production rule definition, 17
program design principles 157-158
project management practices, 160-162
Property Service, 129-130, 135, 193-194
PublicLiteral, 34
Q
Query Service, 129-130, 136, 191-192
R
reconfigurability, 159
Recovery Service, 130
Relationship Service, 129-130, 136, 189 -190
Replication Service, 130
reusability, 159
root node, 72
S
S (white space), 8
scalability, 160
security policy, 204
Security Service, 129-130, 137, 196, 201-207
seq, 24
sibling, 72
simplicity, 160
Simulation Facility, 235-236
stability, 160
STag, 21
Startup Service, 130
string comparison, 72
StringType, 26
System Management Facility, 147-148, 226-228
SystemLiteral, 7, 34
T
tag valid document, 72
target invocation access, 204
target invocation audit, 204
target secure invocation, 204
Task Management Facility 148-150, 229-231
text declaration, 35
Text Interface (DOM), 67
TextDecl, 35
Time Service, 129-130, 137, 195
TokenizedType, 26
Trader Service, 196-197
Transaction Service, 129-130, 137, 190-191
type valid document, 72
U
uncooked model, 72
unparsed entity treatment, 37
User Interface Facility, 143-144, 221-223
V
valid document, 19
validity constraint, 16
vc, 9
Vertical Facilities, 150-154
W
well-formed document, 18, 72
well-formedness constraint, 16
wfc, 9
WIDL, 90-110
WIDL definition, 90
X
XML and HTML differences, 11-12
XML and SGML differences, 11
XML background 4
XML benefits, 10
XML design policy, 15-41
XML productions
AttDef, 26
AttlistDecl, 26
Attribute, 21
AttType, 26
Char, 6
CharData, 6
CharRef, 31
children, 24
choice, 24
Comment, 19
conditionalSect, 30
contentspec, 23
cp, 24
DefaultDecl, 28
document, 8, 19, 48
element, 20
elementdecl, 23
EmptyElemTag, 22
EncName, 36
EncodingDecl, 36
EntityDecl, 33, 35
EntityRef, 32
EnumeratedType, 27
Enumeration, 27
ETag, 22
ExternalID, 34
extParsedEnt, 18
extPE, 79
GEDecl, 33
Ignore, 30
ignoreSect, 30
ignoreSectContents, 30
includeSect, 30
Mixed, 25
Names, 7
NDataDecl, 34
PEDecl, 35
PEDef, 35
PEReference, 32
PITarget, 8
PI, 49
PublidLiteral, 34
S (white space), 8
seq, 24
STag, 21
StringType, 26
SystemLiteral, 7, 34
TextDecl, 35
XML production rules, 259-267
rule 1, 8, 19, 48
rule 3, 8
rule 6, 7
rule 11, 7
rule 15, 19
rule 16, 20
rule 39, 20, 48
rule 40, 21
rule 41, 21, 48
rule 42, 22
rule 43, 22, 48
rule 44, 22, 48
rule 45, 23
rule 46, 23
rule 47, 24
rule 48, 24
rule 49, 24
rule 50, 24
rule 51, 25
rule 52, 26
rule 53, 26
rule 54, 26
rule 55, 26
rule 56, 26
rule 57, 27
rule 58, 27
rule 59, 27
rule 60, 28
rule 61, 30
rule 62, 30
rule 63, 30
rule 64, 30
rule 65, 30
rule 66, 31
rule 67, 32
rule 68, 32
rule 69, 32
rule 70, 33
rule 71, 33
rule 72, 34
rule 73, 34
rule 74, 35
rule 75, 34
rule 76, 34
rule 77, 35
rule 78, 18
rule 79, 18
rule 80, 36
rule 81, 36
rule 82, 35
rule 83, 36
XML Security Service DTD plan, 214-216
Table of Contents
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is
prohibited. Read EarthWeb's privacy statement.