|
top
|
 Subject: RE: Validating XML with Schema in Stylus Studio Problem Author: (Deleted User) Date: 24 Jun 2003 09:16 AM
|
Hi Doug,
At 08.24 24/06/2003 -0400, Doug McCall wrote:
>Alberto,
>
>Attached is the zipped XML reference data I was referring to. This is the
>same reference data the MIMOSA organization offers on their site, however
>I used SQL Server XML Web services in order to extract this reference data
>in an XML format that conformed to my Schema.
>
>Again, this does validate using XML Spy, so everything should be
>valid. For some reason, though, this won't validate within Stylus Studio
>(our preferred tool so far).
>
>Let me know what you come up with. Thanks again!
The reference data you sent me has several problems:
1) its xsi:schemaLocation attribute is (as you already wrote in the
original message)
"http://www.mimosa.org/TechXMLV2-2
c:\CRIS%20v2.2%20SQL\Schemas\CRIS%20v2-2\Create%20Reference%20Data%20Schema\CRIS%20Complete%20V2.2%20Data%20Insertion.xsd",
that instructs the parser to look for the file "c:\CRIS v2.2
SQL\Schemas\CRIS v2-2\Create Reference Data Schema\CRIS Complete V2.2 Data
Insertion.xsd". Now, assuming the directory is correct, the schema file you
attached in a previous message is named "CRIS Complete V3b Data
Insertion.xsd" (the version number changes from 2.2 to 3b).
By changing this value to reflect the actual name of the schema file, the
schema is found and Stylus finds one validation error ("Unknown element
mim_cris_v22").
2) the validation error is due to the fact that the reference XML file is
written as there was a default namespace, but it is not declared; this is
fixed by adding a xmlns="http://www.mimosa.org/TechXMLV2-2" attribute to
the root element
3) after fixing the previous error, another validation error occurs,
complaining that the "row" element at line 30 is missing several required
child nodes (reg_auth_user_tag_id, user_tag_id, mobile_yn, site_type_code,
is_template), that must be fixed by either entering the missing data or by
making the tags optional.
Hope this helps,
Alberto
|
|
|
|