users@jaxb.java.net

RE: Parsing xml files that have a Microsoft schema

From: Timothy Astle <tastle_at_hotmail.com>
Date: Sun, 22 Nov 2009 18:03:18 -0400

Thanks Wolfgang!


Based on some additional research, it looks like that Microsoft XDR Schema is deprecated. Customers are trying to take our XSD file to generate classes so they can interface with our product. This indicates that we've neglected this part of our product for long enough, so we'll be taking time to update our XSD file so that it uses the W3C Schema.


Cheers!


> Date: Sun, 22 Nov 2009 21:49:53 +0100
> From: wolfgang.laun_at_gmail.com
> To: users_at_jaxb.dev.java.net
> Subject: Re: Parsing xml files that have a Microsoft schema
>
> xjc is for the W3C XML Schema language only.
>
> Workarounds?
> One solution would be to find or write an equivalent W3C XML schema.
> Or code the Java classes according to the MS schema by hand (and
> annotate where necessary).
>
> -W
>
>
> On Tue, Nov 17, 2009 at 5:04 PM, Timothy Astle <tastle_at_hotmail.com> wrote:
> >
> > When I run xjc on the test.xsd below, I get the following errors:
> >
> >
> > [ERROR] s4s-elt-schema-ns: The namespace of element 'Schema' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'.
> > line 2 of file:/D:/Temp/jaxb-ri-20061211/bin/test/test.xsd
> >
> > [ERROR] s4s-elt-invalid: Element 'Schema' is not a valid element in a schema document.
> > line 2 of file:/D:/Temp/jaxb-ri-20061211/bin/test/test.xsd
> >
> > [ERROR] schema_reference.4: Failed to read schema document 'file:/D:/Temp/jaxb-ri-20061211/bin/test/test.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
> > line 2 of file:/D:/Temp/jaxb-ri-20061211/bin/test/test.xsd
> >
> >
> >
> > test.xsd
> >
> >
> > <Schema xmlns='urn:schemas-microsoft-com:xml-data'
> >
> > xmlns:dt='urn:schemas-microsoft-com:datatypes'>
> >
> > <ElementType name='test' content='textOnly' dt:type='ui4' dt:minLength='1'/>
> > </Schema>
> >
> >
> >
> >
> > I think that the SchemaFactory just cannot handle the Microsoft schema namespaces. Is this correct? If so, what is a good workaround for this?
> >
> > ________________________________
> > Windows Live: Keep your friends up to date with what you do online.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
                                               
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://go.microsoft.com/?linkid=9691816