Stylus Studio XML Editor

Table of contents

Appendices

E.1 DTD

DTD

A DTD may be used as the schema language for WSDL. It may not be embedded; it must be imported. A namespace must be assigned. DTD types may be referenced only by the element attribute information item; DTDs do not have a construct corresponding to the type attribute information item.

The prefix, dtd, used throughout the following is mapped to the namespace URI http://www.example.org/dtd/.

The dtd:import element information item references an external Document Type Definition, and has the following infoset properties:

  • A [local name] of import.

  • A [namespace name] of "http://www.example.org/dtd".

  • One or two attribute information items, as follows:

    • A namespace attribute information item as described below.

    • An optional location attribute information item as described below.

namespace attribute information item[top]

namespace attribute information item

The namespace attribute information item sets the namespace to be used with all imported element definitions described in the DTD. It has the following infoset properties:

  • A [local name] of namespace.

  • A [namespace name] that has no value.

The type of the namespace attribute information item is xs:anyURI.

The WSDL author should ensure that a prefix is associated with the namespace at the proper scope (probably document scope).

location attribute information item[top]

location attribute information item

The location attribute information item, if present, provides a hint to the processor as to where the DTD may be located. Caching and cataloging technologies may provide better information than this hint. The location attribute information item has the following infoset properties:

  • A [local name] of location.

  • A [namespace name] that has no value.

The type of the location attribute information item is xs:anyURI.

References to Element Definitions[top]

References to Element Definitions

In referring to an element definition (<!ELEMENT>) from a message part, the type attribute information item may not be used. The element attribute information item must be used. Its value must correspond to the content of the namespace attribute information item of the dtd:import element information item. The local name part must correspond to an element defined in the DTD.

Note that this pattern does not attempt to make DTDs namespace-aware. It applies namespaces externally, in the import phase.