473,769 Members | 3,383 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

'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="unbo unded">
<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="unbo unded">
<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 1779

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

Similar topics

0
1249
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 subsequent productions. For e.g., for vertex V1 and its edges leading to V4 and V7, I would get: <!ELEMENT P1 (V1, (P4 | P7)) > For the following part of the graph I can't come up with the two content models because I always run into illegal...
3
1961
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
1495
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> <xs:restriction base="xs:token"> <xs:enumeration value="volume_number"/> <xs:enumeration value="page_range"/>
3
2017
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
1034
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
1475
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 (the actual date string) or the <Today /> element. I can write schema to validate either one off the options seperately but cannot write it in a way which allows either one off the options.
0
2707
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 a arry an then convert it to a jpeg i opend the web like: wr = (HttpWebRequest)WebRequest.Create("http://XXXXXX");
2
1108
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 ref="lAlias120001"> <Qualifier><!]></Qualifier>
5
1795
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 Derived extends Base) <!-- Base.xsd --> .... <xsd:complexType name = "Base" abstract = "true"> <attribute name = "revision" type = "xsd:string"/>
0
9586
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10043
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8869
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3956
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.