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

Re: dateTime format string, Anyone developed an rng d

Subject: Re: dateTime format string, Anyone developed an rng definition?
From: Syd Bauman <Syd_Bauman@xxxxxxxxx>
Date: Wed, 3 Feb 2010 10:26:51 -0500
Re:  dateTime format string
> http://www.w3.org/TR/xslt20/#format-date defines
>   format-dateTime( $value    as xs:dateTime?,
>                    $picture  as xs:string,
> 		     $language as xs:string?,
> 		     $calendar as xs:string?,
> 		     $country  as xs:string?) as xs:string?
> The picture string is fairly regular.
> Has anyone produced a relaxng expression which captures it please?

I hadn't, but just took a crack at it. I think

 xsd:token { pattern =
 "(([^\[\]]|\[\[|\]\])+|\[[YMDdFWwHhPmsfZzCE](((\p{Nd}|\p{Nl}|\p{No}|\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo})+|N|n|Nn)[to]?)?(,([0-9]+|\*)(-[0-9]+|\*)?)?\])+"
 }

does the job, (Note xsd:token, not xsd:string, as I wrote this
presuming the string to be matched has already been run through
normalize-space().) Not very well tested. See
http://dev.stg.brown.edu/staff/Syd_Bauman/temp/format-dateTime-picture-validate.tgz.

Current Thread

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