If you are using a DTD with namespaces, you must register the namespace Uniform Resource Identifier (URI) in the Message Bridge GUI. In order to generate Java bound to your message definition, the URIs must be registered. Since XML Schemas support a namespace declaration, their URIs are automatically registered in the GUI.
You have to determine which elements and attributes have namespaces. Look at the DTD or go to the Select Root Element dialog box. You also have to know the URI of each namespace. When you import your DTD, Message Bridge will assume that every colon represents a namespace.
To register namespaces in DTDs
Elements with namespaces appear in the Select Root Element dialog box with colons. The Select Root Element dialog box opens when you import your DTD. See Adding a message definition for a DTD to import a DTD. Note the elements that have colons; you are required to register their URIs.
Find an element or attribute with a namespace in the graphical representation of the DTD and select it.
In the Properties panel, below the Definitions
panel, the namespace prefix appears in the Value field. Enter the
URI in the Value field of Namespace URI, for example, sybase=http://sybase.com/sybase
.
The URI is registered for all instances of the namespace when you register it for one.
Because namespaces are not supported in DTDs, you have
to get the URI from the author of the DTD. If you have an XML document
that conforms to the DTD, the URI is in the document.
Repeat steps 2 and 3 for all namespaces.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |