[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
> 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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|