Schema diagnostics [message #42914] |
Fri, 30 April 2004 10:15 |
Eclipse User |
|
|
|
Originally posted by: invalid.soft-gems.net
Hi group,
I'm trying currently to get diagnostics information as described in the
FAQs but somehow I've got the feeling they do not work as expected. What I
have is an xsd file, which includes 3 other schemas. I made one of the
references invalid (non-existing file) and expected to find an entry
telling me about a missing reference but the diagnostic information from
my main schema is empty.
Additionally, XML Spy reports an error in one of my included schemas,
which I would expect to be reported too, but which also not appears.
Btw., may I ask an slightly off-topic question? Why does XML Spy consider
the following text invalid?
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://msgax1i.msg.de/afis/odie"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://msgax1i.msg.de/afis"
xmlns:io="http://msgax1i.msg.de/afis/io"
xmlns:layout="http://msgax1i.msg.de/afis/layout"
xmlns:local="http://msgax1i.msg.de/afis/localization"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:annotation>
<xs:documentation xml:lang="de">
Copyright 2004 msg systems ag. All rights reserved.
</xs:documentation>
</xs:annotation>
<xs:element name="td" type="tdType"/>
<xs:complexType name="tdType">
<xs:attribute name="colspan" type="xs:positiveInteger" default="1"/>
</xs:complexType>
<xs:element name="table" type="tableType" substitutionGroup="td"/>
<xs:complexType name="tableType">
<xs:complexContent>
=====> Error message here: undefined value for 'base' encountered.
=====> tdType is defined just a couple lines above.
<xs:extension base="tdType">
<xs:sequence>
<xs:element ref="tr" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="tr" type="trType"/>
<xs:complexType name="trType">
<xs:sequence>
<xs:element ref="td" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
For me it looks ok, however I'm a beginner with XML Schemas so I likely
overlooked an important part.
Mike
--
www.soft-gems.net
|
|
|
Re: Schema diagnostics [message #42945 is a reply to message #42914] |
Fri, 30 April 2004 11:58 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Mike,
Have a look at XSDMainTest and how it implements -validate to walk all the
resources to find all the schemas to report all the errors. The
XSDSchema.getAllDiagnostics method will only get the diagnostics that apply to
components directly contained by that schema; the included and imported schemas
are in separate resources and have their own lists of diagnostics.
You left "odie" out of your xmnls=".../odie"; I assume it should match your
target namespace.
Mike Lischke wrote:
> Hi group,
>
> I'm trying currently to get diagnostics information as described in the
> FAQs but somehow I've got the feeling they do not work as expected. What I
> have is an xsd file, which includes 3 other schemas. I made one of the
> references invalid (non-existing file) and expected to find an entry
> telling me about a missing reference but the diagnostic information from
> my main schema is empty.
>
> Additionally, XML Spy reports an error in one of my included schemas,
> which I would expect to be reported too, but which also not appears.
>
> Btw., may I ask an slightly off-topic question? Why does XML Spy consider
> the following text invalid?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema targetNamespace="http://msgax1i.msg.de/afis/odie"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns="http://msgax1i.msg.de/afis"
> xmlns:io="http://msgax1i.msg.de/afis/io"
> xmlns:layout="http://msgax1i.msg.de/afis/layout"
> xmlns:local="http://msgax1i.msg.de/afis/localization"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
> <xs:annotation>
> <xs:documentation xml:lang="de">
> Copyright 2004 msg systems ag. All rights reserved.
> </xs:documentation>
> </xs:annotation>
> <xs:element name="td" type="tdType"/>
> <xs:complexType name="tdType">
> <xs:attribute name="colspan" type="xs:positiveInteger" default="1"/>
> </xs:complexType>
> <xs:element name="table" type="tableType" substitutionGroup="td"/>
> <xs:complexType name="tableType">
> <xs:complexContent>
> =====> Error message here: undefined value for 'base' encountered.
> =====> tdType is defined just a couple lines above.
> <xs:extension base="tdType">
> <xs:sequence>
> <xs:element ref="tr" maxOccurs="unbounded"/>
> </xs:sequence>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
> <xs:element name="tr" type="trType"/>
> <xs:complexType name="trType">
> <xs:sequence>
> <xs:element ref="td" minOccurs="0" maxOccurs="unbounded"/>
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
>
> For me it looks ok, however I'm a beginner with XML Schemas so I likely
> overlooked an important part.
>
> Mike
> --
> www.soft-gems.net
|
|
|
Re: Schema diagnostics [message #42976 is a reply to message #42945] |
Fri, 30 April 2004 12:49 |
Eclipse User |
|
|
|
Originally posted by: invalid.soft-gems.net
Ed Merks wrote:
> Mike,
> Have a look at XSDMainTest and how it implements -validate to walk all the
> resources to find all the schemas to report all the errors. The
> XSDSchema.getAllDiagnostics method will only get the diagnostics that apply
to
> components directly contained by that schema; the included and imported
schemas
> are in separate resources and have their own lists of diagnostics.
> You left "odie" out of your xmnls=".../odie"; I assume it should match your
> target namespace.
I should tell you how much I appreciate your help, Ed. Thank you very
much. It appears you are almost the only one replying to the questions in
this group. Excellent work!
Mike
--
www.soft-gems.net
|
|
|
Re: Schema diagnostics [message #43059 is a reply to message #42976] |
Fri, 30 April 2004 13:39 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Mike,
You're welcome. I just don't give other people much of a chance, do I. ;-)
Mike Lischke wrote:
> Ed Merks wrote:
>
> > Mike,
>
> > Have a look at XSDMainTest and how it implements -validate to walk all the
> > resources to find all the schemas to report all the errors. The
> > XSDSchema.getAllDiagnostics method will only get the diagnostics that apply
> to
> > components directly contained by that schema; the included and imported
> schemas
> > are in separate resources and have their own lists of diagnostics.
>
> > You left "odie" out of your xmnls=".../odie"; I assume it should match your
> > target namespace.
>
> I should tell you how much I appreciate your help, Ed. Thank you very
> much. It appears you are almost the only one replying to the questions in
> this group. Excellent work!
>
> Mike
> --
> www.soft-gems.net
|
|
|
Re: Schema diagnostics [message #586384 is a reply to message #42914] |
Fri, 30 April 2004 11:58 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
Mike,
Have a look at XSDMainTest and how it implements -validate to walk all the
resources to find all the schemas to report all the errors. The
XSDSchema.getAllDiagnostics method will only get the diagnostics that apply to
components directly contained by that schema; the included and imported schemas
are in separate resources and have their own lists of diagnostics.
You left "odie" out of your xmnls=".../odie"; I assume it should match your
target namespace.
Mike Lischke wrote:
> Hi group,
>
> I'm trying currently to get diagnostics information as described in the
> FAQs but somehow I've got the feeling they do not work as expected. What I
> have is an xsd file, which includes 3 other schemas. I made one of the
> references invalid (non-existing file) and expected to find an entry
> telling me about a missing reference but the diagnostic information from
> my main schema is empty.
>
> Additionally, XML Spy reports an error in one of my included schemas,
> which I would expect to be reported too, but which also not appears.
>
> Btw., may I ask an slightly off-topic question? Why does XML Spy consider
> the following text invalid?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema targetNamespace="http://msgax1i.msg.de/afis/odie"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns="http://msgax1i.msg.de/afis"
> xmlns:io="http://msgax1i.msg.de/afis/io"
> xmlns:layout="http://msgax1i.msg.de/afis/layout"
> xmlns:local="http://msgax1i.msg.de/afis/localization"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
> <xs:annotation>
> <xs:documentation xml:lang="de">
> Copyright 2004 msg systems ag. All rights reserved.
> </xs:documentation>
> </xs:annotation>
> <xs:element name="td" type="tdType"/>
> <xs:complexType name="tdType">
> <xs:attribute name="colspan" type="xs:positiveInteger" default="1"/>
> </xs:complexType>
> <xs:element name="table" type="tableType" substitutionGroup="td"/>
> <xs:complexType name="tableType">
> <xs:complexContent>
> =====> Error message here: undefined value for 'base' encountered.
> =====> tdType is defined just a couple lines above.
> <xs:extension base="tdType">
> <xs:sequence>
> <xs:element ref="tr" maxOccurs="unbounded"/>
> </xs:sequence>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
> <xs:element name="tr" type="trType"/>
> <xs:complexType name="trType">
> <xs:sequence>
> <xs:element ref="td" minOccurs="0" maxOccurs="unbounded"/>
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
>
> For me it looks ok, however I'm a beginner with XML Schemas so I likely
> overlooked an important part.
>
> Mike
> --
> www.soft-gems.net
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Schema diagnostics [message #586424 is a reply to message #42976] |
Fri, 30 April 2004 13:39 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
Mike,
You're welcome. I just don't give other people much of a chance, do I. ;-)
Mike Lischke wrote:
> Ed Merks wrote:
>
> > Mike,
>
> > Have a look at XSDMainTest and how it implements -validate to walk all the
> > resources to find all the schemas to report all the errors. The
> > XSDSchema.getAllDiagnostics method will only get the diagnostics that apply
> to
> > components directly contained by that schema; the included and imported
> schemas
> > are in separate resources and have their own lists of diagnostics.
>
> > You left "odie" out of your xmnls=".../odie"; I assume it should match your
> > target namespace.
>
> I should tell you how much I appreciate your help, Ed. Thank you very
> much. It appears you are almost the only one replying to the questions in
> this group. Excellent work!
>
> Mike
> --
> www.soft-gems.net
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03128 seconds