473,398 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

non deterministic schema problem

Hello!
I have a problem with a schema. I don't know what i can do in a
simple way.
I have a message in a file text. I describe its structure using xml
schema.

<xs:complexType name="MyMessageType">
<xs:complexContent>
<xs:extension base="sg:FieldsType">
<xs:sequence maxOccurs="unbounded">
<xs:element name="field1" type="skt:field1type"/>
<xs:element name="field2" type="skt:field2type" minOccurs="0"/>
..
..
<xs:element name="fieldn" type="skt:fieldntype"/>
<xs:sequence maxOccurs="unbounded">
<xs:element name="fieldx" type="skt:fieldxtype"
minOccurs="0"/>
<xs:element name="field1" type="skt:field1type" />
</xs:sequence>
<xs:element name="fieldx" type="skt:fieldxtype"
minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

An error appear when i declared both fieldx optionals (minOccurs="0).
I have a separate file with the all the fields description.
I need this schema for a message captured in a text file in which the
fields order is very important and the same status characteristic
(optional or required) to be declared in this way.

Can you help me? Or suggest something. I don't want to complicate
things too much because I'm new in xml.

Thanks.
Jul 20 '05 #1
1 1364
In article <f6**************************@posting.google.com >,
c_********@hotmail.com <c_********@hotmail.com> wrote:
<xs:sequence maxOccurs="unbounded">
<xs:element name="field1" type="skt:field1type"/>
<xs:element name="field2" type="skt:field2type" minOccurs="0"/>
..
..
<xs:element name="fieldn" type="skt:fieldntype"/>
<xs:sequence maxOccurs="unbounded">
<xs:element name="fieldx" type="skt:fieldxtype" minOccurs="0"/>
<xs:element name="field1" type="skt:field1type" />
</xs:sequence>
<xs:element name="fieldx" type="skt:fieldxtype" minOccurs="0"/>
</xs:sequence>


If I understand correctly, after fieldn you want

(fieldx?, field1)+, fieldx?

That appears to match the same sequences as

fieldx?, (field1, fieldx?)+

which is deterministic.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: c_capatana | last post by:
I come back because my example was not OK. i want this: <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="fieldx" type="skt:fieldxtype" minOccurs="0"/> <xs:element name="aa"...
0
by: Gijs | last post by:
I wish to allow any of the following five sequences to specify the date of an historical event. <EventDate>1677-06-21</EventDate> or <EventDate modifier="approximately">1677-06-01</EventDate>...
0
by: Philippe Poulard | last post by:
hi, i try to design a schema language, and i encoutered the famous well-known problem : valid documents are : <page></page> <page><odd/></page> <page><odd/><even/></page>...
0
by: Sahatra Kumara | last post by:
I have the schema that was written by other people. This schema seems to be wrong. Altova XML SPY 2005 and .Net have found out the block of schema definition that contains error, namely...
5
by: rox.scott | last post by:
The following article says the .NET SOM will not allow what it calls "non-deterministic" schemas...
3
by: jacksuyu | last post by:
In XMLSpy, I got error message in my xsd: This schema doesn't appear to be valid by itself:<xs:element ref='MyConfig'> makes the content model non-deterministic. If I remove the minOccurs and...
9
by: plahey | last post by:
I have been dabbling in Python for a while now. One of the things that really appeals to me is that I can seem to be able to use C++-style RAII idioms to deal with resource management issues. ...
13
by: LordHog | last post by:
Hello all, I have a little application that needs to poll a device (CAN communications) every 10 to 15 ms otherwise the hardware buffer might overflow when there are message burst on the bus. I...
4
by: Tangleman | last post by:
I have a schema that defines a programming language for a script that drives a sequentially executing process. It defines the structure of a script that has to interact with a pre-existing,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.