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

Quantity constraints

  • To: xml-dev@l...
  • Subject: Quantity constraints
  • From: Xasima Xirohata <xasima@g...>
  • Date: Fri, 11 Nov 2005 11:59:57 +0200
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=XeFSm4vlmdyDmm2fBOHrYMz7VQSsgfnEjg1F3NbrKfdZqtFzrXpiJaoiG1/nFA3vVNR7HCMQ0/o27LdICnG8SwDrh2z5HQvVGyixC27xmrO8TxI/ZBCTVCyUbbHjHLubtqip9idw4LazpCmfQi6QJ3Vg6HpSpuZk6Z2KJLiwHrc=

names of cakes
 I wonder if there exists a way to make a constraints on the total
count of sub elements (or sub element of the certain type) of the
given type using XSchema.

For example I mean to produce the constraints looks like:
A shop pretended to be marked "Sweetly Trader" MUST has not less than
73 different names of products (e.g. different names of cakes and so
on) in assortment. It MUST have at least 10 instance (e.g. "Royal#1
Cakes",.., "Royal#9 Cakes", "Big Cakes" ) of each type from the list
ice cream type, confetti type, cakes type. If it has more than 15
different ice-creams it might be called "Sweetly Ice-cream Trader".

How to
1)	Explicitly produce this requirement using schemas.
2)	Classify what kind of *Trader the shop (described in emailed myshop
xml) is. You see that this constraint based on counters, not on
structures.


Ex:
--------------------
element IWonnaBeSweetlyTrader {
   element ice-cream {
attribute name { text },
     text
   }
   element confetti {
     attribute name { text },
     text
   } +

   element cakes {
     attribute name { text },
     text
   } +
}
-------------------

I guess that schematron seems to be good solver for this question, but
is there anything else?


--
Regards,
          ~ Xasima Xirohata ~

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.