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

Re: Conditional statements in DTD?

  • From: rjelliffe@a...
  • To: xml-dev@l...
  • Date: Tue, 24 Mar 2009 22:35:49 +1100 (EST)

Re:  Conditional statements in DTD?
>> (Without extension functions, though, I don't
>> think Schematron can require that if @x is "yes", then @y
>> must be a prime number.)
> if(@x='yes') then
>  not(some $i in 2 to (xs:integer(@y)-1) satisfies (@y mod $i) = 0)

Even in XML 1.0

  (@x mod 2) = 0 or
  (@x mod 3) = 0 or
  (@x mod 5) = 0 or
  (@x mod 7) = 0 or
  (@x mod 11) = 0 or
  (@x mod 13) = 0 or
  (@x mod 17) = 0 or
  (@x mod 19) = 0

on the understanding that the assertion *test* may be lossy compared to
the assertion *text* (no false negatives).

In Schematron the assertion text has the primacy: you can even make
assertions for which no effective test exists, such as "This element is a
date, in any notation and calendar, but ISO 8601 is preferred."


[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.