XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Helen HeSubject: Question on validation
Author: Helen He
Date: 08 Mar 2006 10:11 AM
Now I am comparing XMLSPY and Stylus Studio since we are planning to buy one. I got confused when I tried to validate a same xml schema file. XMLSPY says the xml file is valid, but Stylus Studio says it has 34 errors.

Since the schema is fixed, we can not modify it. Can those errors be ignored if I set up some options? Could someone help me out? I appreciate any help.

The main schema includes too many schemas. I cannot attache the whole fold since it's too large.

Here is a snippet. In Stylus Studio, it says "Base type definition does not have any attributes" when the schema tried to define a complexType named CV.

<xs:complexType name="CV">
<xs:annotation>
<xs:documentation>
Coded data, consists of a code, display name, code system,
and original text. Used when a single code value must be sent.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:restriction base="CE">
<xs:sequence>
<xs:element name="originalText" type="ED" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The text or phrase used as the basis for the coding.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="translation" type="CD" minOccurs="0" maxOccurs="0"/>
</xs:sequence>
<xs:attribute name="code" type="cs" use="optional">
<xs:annotation>
<xs:documentation>
The plain code symbol defined by the code system.
For example, "784.0" is the code symbol of the ICD-9
code "784.0" for headache.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="codeSystem" type="uid" use="optional">
<xs:annotation>
<xs:documentation>
Specifies the code system that defines the code.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="codeSystemName" type="st" use="optional">
<xs:annotation>
<xs:documentation>
A common name of the coding system.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="codeSystemVersion" type="st" use="optional">
<xs:annotation>
<xs:documentation>
If applicable, a version descriptor defined
specifically for the given code system.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="displayName" type="st" use="optional">
<xs:annotation>
<xs:documentation>
A name or title for the code, under which the sending
system shows the code value to its users.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:restriction>
</xs:complexContent>
</xs:complexType>



Here is the definition of base complexType named "CE"

<xs:complexType name="CE">
<xs:annotation>
<xs:documentation>
Coded data, consists of a coded value (CV)
and, optionally, coded value(s) from other coding systems
that identify the same concept. Used when alternative
codes may exist.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:restriction base="CD">
<xs:sequence>
<xs:element name="originalText" type="ED" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The text or phrase used as the basis for the coding.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="qualifier" type="CR" minOccurs="0" maxOccurs="0"/>
<xs:element name="translation" type="CD" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
A set of other concept descriptors that translate
this concept descriptor into other code systems.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="code" type="cs" use="optional">
<xs:annotation>
<xs:documentation>
The plain code symbol defined by the code system.
For example, "784.0" is the code symbol of the ICD-9
code "784.0" for headache.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="codeSystem" type="uid" use="optional">
<xs:annotation>
<xs:documentation>
Specifies the code system that defines the code.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="codeSystemName" type="st" use="optional">
<xs:annotation>
<xs:documentation>
A common name of the coding system.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="codeSystemVersion" type="st" use="optional">
<xs:annotation>
<xs:documentation>
If applicable, a version descriptor defined
specifically for the given code system.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="displayName" type="st" use="optional">
<xs:annotation>
<xs:documentation>
A name or title for the code, under which the sending
system shows the code value to its users.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:restriction>
</xs:complexContent>
</xs:complexType>

Postnext
Minollo I.Subject: Question on validation
Author: Minollo I.
Date: 08 Mar 2006 10:34 AM
Helen,
without seeing all the XML Schemas you are dealing with, we can't help you; the fragments you have attached are missing base type definitions.

Can you zip all the schemas and send them to us at stylus-field-report@progress.com

Also, it's not clear to me if you are receiving errors when validating the schema itself or when validating an XML document against that XML Schema; which one is the case?

Thanks,
Minollo

Postnext
Helen HeSubject: Question on validation
Author: Helen He
Date: 08 Mar 2006 11:14 AM
Hi,

I just sent a zip file to that email address. Please take a look.

I think those errors come from the schema itself since I got errors when I validated the XML document, then I tried to validate the schema itself, here comes those exact errors.

Thank you for your help,
Helen

Postnext
Alberto MassariSubject: Question on validation
Author: Alberto Massari
Date: 08 Mar 2006 03:28 PM
Hi Helen,
thanks for the schema files. Xerces-C is indeed getting confused by the recursive structure of some definitions, and probably by the restrictions involving mixed elements; we'll report these problems to the Xerces team.
We tried other validators (Microsoft System.Xml, MSXML, Xerces-J2.5, Xerces-J 2.8, XSV, SQC) and we got mixed reports, probably an indication that the schema writer exercized troublesome parts of the schema specs.
(BTW, this is not the first time we see such pattern, hence our approach to ship a number of them, allowing the user to also plug in their preferred one)

Given that you must use the schema as is, I suggest that you use XSV or Xerces-J 2.8 to validate your XML samples, as they don't report any error in the schema itself.

In order to use XSV you must click on the arrow next to the validation button in the toolbar and select the XSV 2.10-1 entry; to use Xerces-J 2.8 (released 10 days ago) you will have to first download it from http://www.apache.org/dist/xml/xerces-j/Xerces-J-bin.2.8.0.zip and unpack it (e.g. C:\xerces-2_8_0), then take the attached custom validator definition and place it in the <stylus_dir>\bin\Custom Validation Engines. At that point a new entry "Xerces-J 2.8" will appear in the list of the available validators.

Hope this helps,
Alberto


UnknownXerces_J_2_8.xml
Xerces-J 2.8 custom validator

Postnext
Helen HeSubject: Question on validation
Author: Helen He
Date: 09 Mar 2006 01:07 PM
Originally Posted: 09 Mar 2006 10:14 AM
Hi, Alberto Thank you very much. This is very helpful and now I know what's going on. I tried both way. XSV works very well, but I had a little trouble on adding Xerces-J 2.8. After putting Xerces_J_2_8.xml under folder Custom Validation Engines, I start Stylus, I cannot find Xerces-J2.8 entry by clicking the arrow next to the validation button. Then I click menu "Tools", go down to Options --> General --> Custom Validation Engines, I can find Xerces-J 2.8 entry at the upper right panel. I try to modify Xerces_J_2_8.xml and set SupportsXSD="true", then I can find Xerces-J 2.8 entry under that arrow, but when I tried to validate a schema, I got an error message "There was an error during validation of ${SchemaURLFile} Reason = no protocol: ${SchemaURLFile}" I tried several ways but it looks I didn't get right configuration. Could you please help me out? Appreciate your help, Helen

Postnext
Alberto MassariSubject: Question on validation
Author: Alberto Massari
Date: 09 Mar 2006 11:28 AM
Hi Helen,
I'm sorry, it was my mistake.
The configuration file I posted contains an error: you should remove the ${SchemaURLFile} switch from the command line.

Alberto

Posttop
Helen HeSubject: Question on validation
Author: Helen He
Date: 09 Mar 2006 12:56 PM
Hi, Alberto

It works now.

Thank you very much,
Helen

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.