Hi,

Iam trying to validate xml against schema, without any luck. It is
considering schemaLocation as another attribute and cribbing that it is not
declared. Same is true for all the attributes and elements. Looks like it is
not using the schema file at all.Both
schema file and xml file are in the same location. Can someone tell
me is there something wrong in my xml or schema file?. 


  * Iam using xerces-1_3_1  and I have set the features for validation as
true
  * XML root looks like this

   <?xml version="1.0" encoding="UTF-8"?>
   <Conversation 
                xmlns:xsi="http://www/w3.org/2001/XMLSchema-instance";
                xsi:schemaLocation="wsclschema.xsd"
                name="StoreFrontServiceConversation" 
                initialInteraction="Start"  finalInteraction="End" >
  
     //  Other elements I have omitted

   * Schema root is given below

        <?xml version="1.0" encoding="UTF-8"?>
        <xsd:schema  xsd:id="WSCL"
xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"; 
                xsd:targetNamespace="http://www.e-speak.net/schema/WSCL"; 
                xsd:elementFormDefault="unqualified"
xsd:attributeFormDefault="unqualified">

        <xsd:element name="Conversation">
                <xsd:complexType>
                        <xsd:sequence>
                                <xsd:element
ref="ConversationInteractions"/>
                                <xsd:element ref="ConversationTransitions"/>
                        </xsd:sequence>
                        <xsd:attribute name="name" type="xsd:string"
use="required"/>
                        <xsd:attribute name="version" type="xsd:string"
use="optional"/>
                        <xsd:attribute name="description" type="xsd:string"
use="optional"/>
                        <xsd:attribute name="targetNamespace"
type="xsd:uriReference"                                 use="optional"/>
       <xsd:attribute name="hrefSchema" type="xsd:uriReference"
use="optional"/>
                        <xsd:attribute name="initialInteraction"
type="xsd:IDREF" use="required"/>
                        <xsd:attribute name="finalInteraction"
type="xsd:IDREF" use="required"/>
                </xsd:complexType>
        </xsd:element>
         // other I have ommitted

    * The errors Iam getting are

Error:6:55: Element type "Conversation" must be declared.
Error:6:55: Attribute "xsi:schemaLocation" must be declared for element type
"Conversation".
Error:6:55: Attribute "name" must be declared for element type
"Conversation".
Error:6:55: Attribute "initialInteraction" must be declared for element type
"Conversation".
Error:6:55: Attribute "finalInteraction" must be declared for element type
"Conversation".
Error:7:29: Element type "ConversationInteractions" must be declared.
Error:8:59: Element type "Interaction" must be declared.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to