W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2002

Re: is this a mixed content?

From: Anthony B. Coates <abcoates@TheOffice.net>
Date: Sun, 13 Oct 2002 21:26:13 +0100
To: xmlschema-dev <xmlschema-dev@w3.org>
Message-Id: <E180pLL-0006tL-00@FUSMTA01-LRS>

** Reply to message from Jeni Tennison <jeni@jenitennison.com> on Sun, 13 Oct
2002 09:41:48 +0100

> > How do I define a complexType for this kind of element
> >
> > <NOTE><PART_FIG_ITEM_REF>71_00_03_01_050</PART_FIG_ITEM_REF>APPLY
> > MOLYBDENUM DISULPHIDE TO ALL THREADED FASTENERS BEFORE INSTALLATION.
> > </NOTE>

> Yes, that is mixed content (a mix of text and element(s)). To define a
> complex type for the NOTE element, you should use whatever you'd use
> if it *wasn't* allowed to hold text:
[...]
> and then add a mixed="true" to the <xs:complexType> element:

Be aware, though, that text will be allowed *both* before and after the
PART_FIG_ITEM_REF element.  You cannot use a W3C XML Schema to enforce a rule
that text only appears after an element, which I suspect is what you really want
to achieve.  If at all possible, you should consider putting an extra element
around the text, so that you can then use your Schema to force the text
(element) to appear after the item reference.

	Cheers,
		Tony.
====
Anthony B. Coates, Information & Software Architect
mailto:abcoates@TheOffice.net
MDDL Editor (Market Data Definition Language)
http://www.mddl.org/
Received on Sunday, 13 October 2002 16:28:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT