473,406 Members | 2,698 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,406 software developers and data experts.

'all' element, mixed content models...HELP:(

Hi:

I'm trying to write a schema that contains information as
described below:

1. The first element is a mandatory fixed string.
2. The second element is a mixed content element that can contain
multiple occurrences of two possible elements interspersed with
regular text.

This does not seem to be possible to describe using a schema. At
first, I tried to ignore the first requirement and came up with this
to satisfy the second.

<complexType mixed="true">
<all maxOccurs="unbounded">
<element name="tag2" type="xs:string"/>
<element name="tag3" type="xs:string"/>
</all>
</complexType>

Then, I added the first element and encapsulated the whole thing in a
single complexType as in:

<complexType>
<sequence>
<element name="Version" type="xs:string"
fixed="Version_1_0.xsd"/>
<complexType mixed="true">
<all maxOccurs="unbounded">
<element name="tag2" type="xs:string"/>
<element name="tag3" type="xs:string"/>
</all>
</complexType>
</sequence>
</complexType>

XMLSPY v5.4 doesn't like this very much though. Can somebody please
suggest a workaround for this?

Thanx,
Swaroop
Jul 20 '05 #1
0 1737

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

Similar topics

0
by: Yves Forkl | last post by:
I need to transform a directed cyclic graph into a DTD. My approach is to have one element Pn for each "production" number n, with the content model comprising the starting vertex number n and the...
3
by: David Norman | last post by:
How can I create an xml schema where both of the following documents are valid? <theElement> <child>some text</child> </theElement> and <theElement>1234</theElement>
0
by: Ingrid | last post by:
Am I right in thinking that datatyping at element level ie <xs:element name="num" type="xs:integer"> and specifying a choice of attribute values ie <xs:attribute name="kind"> <xs:simpleType>...
3
by: Imiro | last post by:
Hi, Trying to validate this dtd example with xml-spy 5 pro: This works: <!ELEMENT note (#PCDATA|body)*> <!ELEMENT body (#PCDATA)> This doesnt: <!ELEMENT note (#PCDATA|body)>
0
by: edkawas | last post by:
Hi, Can the following be done? I have some elements, that can have other sub elements with mixed content. The sub elements can either be restricted via min=1, max=1 or min=1 max=unbounded.
1
by: Paul Cheevers | last post by:
Hi, I've been trying to write some schema to validate the Value element of an Eq element but to no avail. If the Value Element is off type DateTime then the node should be able to contain text...
0
by: Werner Maier | last post by:
Hi please can anybody help me to read a WEB side with Content-Type: multipart/x-mixed-replace ("Server Push") . I am a absolutly newbie with c# .net. i have problems to read the boundarys to...
2
by: DesperateDan | last post by:
As the title say, I can't aquire element's value if it hosts sub-elements. Let me explain - My XML looks like this:- <a> <infill>xxxxxx</infill> <SourceEndPoint>testdata <EndPoint> <AliasRef...
5
by: Kunal | last post by:
I'm unable to use the "xsd:all" tag in derived objects, in a hierarchical schema setup. For example, I have the following schema (that doesn't validate with XMLSpy): (UserOfDerived extends...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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:
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.