B.2. Metadata Elements

The XML DTD for the JDO metadata defines the various elements that can be specified in the metadata file. In most cases, default values are defined that avoid having to specify values explicitly, except where the default is not appropriate. This keeps the average metadata file short and simple.

B.2.1. File header

A metadata file requires a header that specifies the XML version and encoding along with the location of the metadata XML DTD:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jdo SYSTEM "jdo.dtd">

The DTD location can be the public URL as published by Sun Microsystems, or it can be a DTD file stored elsewhere. The JDO 1.0.1 maintenance release defines two standard locations for the DTD. The public location is ...

Get Core Java™ Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.