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

Re: A single, all-encompassing data validation language- good

  • From: Philippe Poulard <Philippe.Poulard@s...>
  • To: Chris Scott <scott.chris@g...>
  • Date: Tue, 07 Aug 2007 23:46:29 +0200

Re:  A single
Chris Scott a écrit :
> What if we have, however, a rule like
> //@bodyType='Regular'/descendant::node()/@color =
> /Factory/Chasis[@bodyType='Regular']/Colors/Color
> under which node would we place the assertion declaration?  In plain
> english I want to make sure for every part for a regular body that
> needs a color, we have a Chasis station that can supply that color.
> We could define an enumeration every color attribute, but the
> manufacturer wants catalytic doodles in different colors than exhaust
> spinners.  We also want to make sure the Chasis people don't retire a
> color thats needed for the rear spoiler bug guard.  Finally, we
> should have this failure report to the user to go call Color
> management so they don't have to parse the rule.  Since we have
> factories in several different countries we have stylesheets that
> specify the text in the correct language.  Whew!
> So where does this assertion pertain to in the grammar?

Yes, if the grammar can built that content model dynamically.

This is still possible with the Active Schema Language, one just have to 
define a type (for "color" attributes) that build the list of available 
colors taken in the path you gave
It would look like this :

<asl:type name="available-colour"/>
     <asl:text value="{ string(.) }"/>
<asl:attribute name="color" type="available-color"/>

I didn't test bodyType but it's easy to wrap the for-each statement in a 

Some examples where content models are built dynamically :


              (. .)
|      Philippe Poulard       |
        Have the RefleX !

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.
First Name
Last Name
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.