Are we sure we want to mandate the xsi:schemaLocation? Often times you want to point to a local copy of the schema. Once you've done a JAXB binding, it's not necessary at all for the schemaLocation to be specified. One thing I've run into with specifying the schemaLocation as http://yadayadayada is that you actually have to be online to run your unmarshalling software (at least with some versions of sun's JAXB).
--- Craig L Russell <[EMAIL PROTECTED]> wrote: > Javadogs, > > Here's a change to the spec to accommodate the xsd > format for > metadata. These identify the schema namespace and > location where > the .xsd files will be posted after spec approval. > > The jdo Schema Descriptor > This describes files stored as .jdo files. > Note: The document type descriptors are descriptive, > not normative. > The xml schema in the binary distribution is > normative. > JDO vendors must support XSD and might support DTD. > If using XSD, the > declaration of the jdo element must include the > following: > <?xml version="1.0" encoding="UTF-8" ?> > <jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo > http://java.sun.com/xml/ns/jdo/jdo_2_0.xsd"> > The document type descriptor is referred by the xml, > and must be > identified with a DOCTYPE so that the parser can > validate the syntax > of the metadata file. Either the SYSTEM or PUBLIC > form of DOCTYPE can > be used. > If SYSTEM is used, the URI must be accessible; a jdo > implementation > might optimize access for the URI > "http://java.sun.com/dtd/jdo_2_0.dtd" > If PUBLIC is used, the public id should be "-//Sun > Microsystems, > Inc.//DTD Java Data Objects Metadata 2.0//EN"; a jdo > implementation > might optimize access for this id. > > The orm Schema Descriptor > This describes files stored as .orm files. > Note: The document type descriptors are descriptive, > not normative. > The xml schema in the binary distribution is > normative. > JDO vendors must support XSD and might support DTD. > If using XSD, the > declaration of the orm element must include the > following: > <?xml version="1.0" encoding="UTF-8" ?> > <orm xmlns="http://java.sun.com/xml/ns/jdo/orm" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/orm > http://java.sun.com/xml/ns/jdo/orm_2_0.xsd"> > The document type descriptor is referred by the xml, > and must be > identified with a DOCTYPE so that the parser can > validate the syntax > of the metadata file. Either the SYSTEM or PUBLIC > form of DOCTYPE can > be used. > If SYSTEM is used, the URI must be accessible; a jdo > implementation > might optimize access for the URI > "http://java.sun.com/dtd/orm_2_0.dtd" > If PUBLIC is used, the public id should be "-//Sun > Microsystems, > Inc.//DTD Java Data Objects Mapping Metadata > 2.0//EN"; a jdo > implementation might optimize access for this id. > > The jdoquery Schema Descriptor > This describes files stored as .jdoquery files. > Note: The document type descriptors are descriptive, > not normative. > The xml schema in the binary distribution is > normative. > JDO vendors must support XSD and might support DTD. > If using XSD, the > declaration of the jdoquery element must include the > following: > <?xml version="1.0" encoding="UTF-8" ?> > <jdoquery > xmlns="http://java.sun.com/xml/ns/jdo/jdoquery" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdoquery > http://java.sun.com/xml/ns/jdo/jdoquery_2_0.xsd"> > The document type descriptor is referred by the xml, > and must be > identified with a DOCTYPE so that the parser can > validate the syntax > of the metadata file. Either the SYSTEM or PUBLIC > form of DOCTYPE can > be used. > If SYSTEM is used, the URI must be accessible; a jdo > implementation > might optimize access for the URI > "http://java.sun.com/dtd/ > jdoquery_2_0.dtd" > If PUBLIC is used, the public id should be "-//Sun > Microsystems, > Inc.//DTD Java Data Objects Query Metadata 2.0//EN"; > a jdo > implementation might optimize access for this id. > > > > Craig Russell > Architect, Sun Java Enterprise System > http://java.sun.com/products/jdo > 408 276-5638 mailto:[EMAIL PROTECTED] > P.S. A good JDO? O, Gasp! > >
