473,903 Members | 4,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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


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 "/>

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

<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 "/>

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

Jul 20 '05 #1
0 1786

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

Similar topics

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...
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>
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"/>
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)>
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.
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.
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");
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>
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"/>
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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...
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,...
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...
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...
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.