29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

When you create an XML file from a DTD or XML schema file, you will have to<br />

select a root element. With an XML schema, you also select a namespace.<br />

XML schema wizard<br />

Studio Site Developer provides the Create XML Schema wizard to take you<br />

through the process of creating a new XSD file. To create a new XML schema<br />

file, you have the following options:<br />

► To generate it from scratch, select File -> New -> Other -> XML -> XML<br />

Schema (or use the icon).<br />

► To generate it from an existing DTD or XML file:<br />

– From the context menu of a DTD (.dtd) file or an XML (.xml) file in the<br />

Navigator, select Generate -> XML Schema.<br />

– From within a DTD file open in the editor, select DTD -> Generate XML<br />

Schema.<br />

From within an XML file open in the editor, select XML -> Generate XML<br />

Schema.<br />

DTD wizard<br />

A Document Type Definition (DTD) has two purposes:<br />

► To serve as a framework and provide a set of elements and attributes that will<br />

be used in the XML “templates” used by the application to generate XML<br />

documents from raw data retrieved from the back end.<br />

► To validate incoming XML documents sent by the supplier in reply to outgoing<br />

purchase orders generated by the customer application.<br />

Studio Site Developer provides the Create DTD wizard to take you through the<br />

process of creating a new DTD file.<br />

To create a new DTD file, you have the following options:<br />

► To generate it from scratch, select File -> New -> Other -> XML -> DTD (or<br />

use the icon).<br />

► To generate it from an existing XML schema or XML file:<br />

– From the context menu of an XML schema (.xsd) file or an XML (.xml) file<br />

in the Navigator, select Generate -> DTD.<br />

– From within an XML schema file open in the editor, select XSD -><br />

Generate DTD.<br />

– From within an XML file open in the editor, select XML -> Generate DTD.<br />

Chapter 10. Working with XML 323

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!