Subject: Re: [xsl] dateTime format string, Anyone developed an rng definition? From: Syd Bauman <Syd_Bauman@xxxxxxxxx> Date: Wed, 3 Feb 2010 10:26:51 -0500 |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] dateTime format string, A, Dave Pawson | Thread | Re: [xsl] dateTime format string, A, Dave Pawson |
Re: [xsl] reading a .xsv file in xs, a kusa | Date | [xsl] dynamically generate value fo, Mario Madunic |
Month |