XML schema error

A

Anil

Hi,

I have created one schema file and when i am trying to apply schema in word
it's applied perfectly. but i got the below error with question mark ("?") in
the XML structure view area. How can i know where is the error and how to
solve this error? Please suggest me.

XSD file:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:group name="custGroup">
<xs:sequence>
<xs:element name="customer" type="xs:string"/>
<xs:element name="orderdetails" type="xs:string"/>
<xs:element name="billto" type="xs:string"/>
<xs:element name="shipto" type="xs:string"/>
</xs:sequence>
</xs:group>

<xs:element name="order" type="ordertype"/>

<xs:complexType name="ordertype">
<xs:group ref="custGroup"/>
<xs:attribute name="status" type="xs:string"/>
</xs:complexType>

</xs:schema>

Add this schema and i just applied "order" and within that "customer". you
can see the error showing in the xml structure view area.

Thanks
Anil
 
P

Peter Jamieson

AFAICS your schema says that an order consists of a custGroup, which
consists of a sequence of a customer, orderdetails, billto and shipto.

In other words, until you add a orderdetails, billto and shipto elements
after the customer element, Word will correctly flag an error at the
"order" level.

(typically you have to insert the lement, then use right arrow to get to
a position where you can sensibly insert the next element)


Peter Jamieson

http://tips.pjmsn.me.uk
Visit Londinium at http://www.ralphwatson.tv
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top