- From: Anthony B. Coates <abcoates@TheOffice.net>
- Date: Sun, 13 Oct 2002 21:26:13 +0100
- To: xmlschema-dev <xmlschema-dev@w3.org>
** 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 UTC