Subject: [xsl] Challenge: create xPath 2.0 regular expressions for each XML Schema datatype From: "Costello, Roger L." <costello@xxxxxxxxx> Date: Wed, 18 Oct 2006 07:26:46 -0400 |
Hi Folks, I would like to submit a challenge: Create xPath 2.0 regular expressions for each of the XML Schema datatypes. Examples: - the xPath expression which corresponds to integer is: ^\s*[+-]?\d+\s*$ - the xPath expression which corresponds to float is: ^\s*[+-]?\d+([eE]+?\d+)?\s*$ Datatype xPath 2.0 Regular Expression ------------------------------------------------------------- anyURI ------------------------------------------------------------- byte ------------------------------------------------------------- decimal ------------------------------------------------------------- ENTITY ------------------------------------------------------------- ENTITIES ------------------------------------------------------------- float ^\s*[+-]?\d+([eE]+?\d+)?\s*$ ------------------------------------------------------------- ID ------------------------------------------------------------- IDREFS ------------------------------------------------------------- int ------------------------------------------------------------- integer ^\s*[+-]?\d+\s*$ ------------------------------------------------------------- language ------------------------------------------------------------- long ------------------------------------------------------------- Name ------------------------------------------------------------- NCName ------------------------------------------------------------- negativeInteger ------------------------------------------------------------- NMTOKEN ------------------------------------------------------------- NMTOKENS ------------------------------------------------------------- nonNegativeInteger ------------------------------------------------------------- nonPositiveInteger ------------------------------------------------------------- normalizedString ------------------------------------------------------------- NOTATION ------------------------------------------------------------- QName ------------------------------------------------------------- positiveInteger ------------------------------------------------------------- short ------------------------------------------------------------- string ------------------------------------------------------------- token ------------------------------------------------------------- unsignedByte ------------------------------------------------------------- unsignedInt ------------------------------------------------------------- unsignedInteger ------------------------------------------------------------- unsignedLong ------------------------------------------------------------- unsignedShort ------------------------------------------------------------- Anyone up for the challenge? /Roger
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] using contains() on multi, Boge.Brett | Thread | Re: [xsl] Challenge: create xPath 2, Abel Braaksma |
Re: [xsl] a simple RTF <> XML quest, Rudolf P . Weinmann | Date | Re: [xsl] Challenge: create xPath 2, Abel Braaksma |
Month |