OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] content model question

[ Lists Home | Date Index | Thread Index ]
  • To: "Morgan V. Cundiff" <mcundiff@loc.gov>,<xml-dev@lists.xml.org>
  • Subject: RE: [xml-dev] content model question
  • From: "Tom Gaven" <tgaven@vitria.com>
  • Date: Fri, 5 Apr 2002 09:16:27 -0800
  • Thread-index: AcHcw1fUmBdf45qJRX2ELTKJ2MGmWwAAiWKg
  • Thread-topic: [xml-dev] content model question

   I don't think XML Schema schemas can constrain text this way. I believe XML Schema is similar
to DTD 'mixed content' in this regards.  However, RELAX NG does have this capability:

This RELAX NG schema: (compact syntax)

start = myelement
myelement = element myelement { text, mysubelement1, mysubelement2 }
mysubelement1 = element mysubelement1 { text }
mysubelement2 = element mysubelement2 { text }

should validate your document, and only allow 'text' prior to element mysubelementt.


-----Original Message-----
From: Morgan V. Cundiff [mailto:mcundiff@loc.gov]
Sent: Friday, April 05, 2002 11:57 AM
To: xml-dev@lists.xml.org
Subject: [xml-dev] content model question

Is is possible to create an XML Schema content model for an element
containing mixed content (i.e. text and subelements) and to also specify
the sequence of the text and the subelements? For example an instance
might look like this:


The goal is to constrain the content of <myelement> so that the textblob
must occur first and then be followed by <mysubelement1> and

Thank you for your help.

Morgan Cundiff
Library of Congress

The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS