[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Singletons in a DTD

  • From: terje@i... (Terje Norderhaug)
  • To: "XML Developers' List" <xml-dev@i...>
  • Date: Thu, 13 May 1999 10:40:08 -0700

registered trademark
At 8:46 AM 5/13/99, Joshua E. Smith wrote:
>I have an element which can contain 0 or more instances of some element
>types (call these collections), and 0 or 1 instances of others (call these
>singletons), and I don't want to contrain the order.
>
>If I have collections C1, C2, C3
>and I have singletons S1, S2, S3
>
>And I declare:
>
>(S1? , S2? , S3? , (C1 | C2 | C3)*)
>
>Then the singletons, if they appear, would have to be in that order and
>would have to be first.  So that's not what I want.
>
>I suppose I could declare some combinatorics:
>
>( S1? | S2? | S3? | (S1 , S2)? | (S2 , S1)? | (S1 , S3)? blah blah blah
>
>but I'd have to mix in the C1, C2, C3, etc., too, and I have about 8
>singleton classes, so this would quickly get totally out of control.
>
>Am I missing something, or is what I want to describe not really practical
>in a DTD?  I'm perfectly comfortable leaving the singletonness out of my
>DTD (my application will detect duplication errors anyway), if that's the
>only answer.  But if there *is* a way to capture this without waiting for
>XSchema to be finished, I'd love to hear it!

The AND '&' connector in SGML covered this functionality, but isn't
included in XML. It can thus easily be described in a DTD, just not an
*XML* DTD.


-- Terje <Terje@i...> | Media Design in*Progress

   Software for Mac Web Professionals at <http://www.in-progress.com>
   Take advantage of XML with Emile, the first XML editor for Mac.



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.