You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Levine Justin-p94702 <Ju...@email.mot.com> on 2000/07/19 18:34:57 UTC

Grammar, xsd, and scheme things.

Hey,

I wrote back some time ago about having problems upgrading from Xerces
version 1.0.3 to 1.1.2 and it's been figured out that our problem is that
the new Xerces is unable to find the .xsd/grammar file when the older
version was able to.  

Is there anyway to embed this schema information -within- the xml file so
there is no need for an external xsd file as well?  

If that's impossible, does anyone have any idea why the new Xerces would be
having difficulty finding the grammar file?

Thanks.

- Justin



Re: Grammar, xsd, and scheme things.

Posted by Eric Ye <er...@locus.apache.org>.
> Hey,
>
> I wrote back some time ago about having problems upgrading from Xerces
> version 1.0.3 to 1.1.2 and it's been figured out that our problem is that
> the new Xerces is unable to find the .xsd/grammar file when the older
> version was able to.
>
> Is there anyway to embed this schema information -within- the xml file so
> there is no need for an external xsd file as well?
>
> If that's impossible, does anyone have any idea why the new Xerces would
be
> having difficulty finding the grammar file?
>

It is not that new Xerces cannot find the schema file, the problem you are
having is because Xerces 1.0.3 implements the Schema Spec Working draft
dated 12/17/99, which is already obsolete, as a matter of fact, there was no
clearly-said rules about how to reference a schema in a xml file at that
time.
Xerces 1.1.2 's schema implementation is based on the latest Schema WD dated
04/07/00, which unfortunately has been radically changed in comparison to
the 12/17/99 version.

To solve you problem, you need to use "xsi:schemaLocation" attribute or
"xsi:noTargetNamespaceSchemaLocation" in the xml file. You can find a
example "personal-schema.xml" and "personal.xsd" in the "data"  directory of
Xerces1.1.2 binary distribution, also the best place for reference is Schema
Strutures spec(04/07/00) Section. 6.3, here is the URL :
http://www.w3.org/TR/xmlschema-1/

_____


Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org