[Home] [By Thread] [By Date] [Recent Entries]
> From: Simon St.Laurent [mailto:simonstl@s...] > Sent: Tuesday, April 17, 2001 4:37 PM > To: xml-dev@l... > Subject: Using W3C Regular Expressions > > > The XML Schema: Data Types specification (PR) defines a > regular expression > language in: > http://www.w3.org/TR/xmlschema-2/#regexs > (more description in: http://www.w3.org/TR/xmlschema-0/#regexAppendix) > > One thing I don't see is discussion of splitting content > through regular > expressions. Since the W3C Regular Expressions appear to be > intended only > for pattern-matching validation, this isn't exactly > surprising, but I'm > trying to think beyond that. > > It looks like I can still do things like: > (\d{2,5})(\d{2})-(\d{2}) > > on: > > 1970-11 > > And extract 19, 70, 11. (I know that the simple match works, > thanks to > http://www.xfront.org/xml-schema/, which is pretty cool.) For this sort of simple example, this seems reasonable to me. However, I hope there is not going to be too much of a trend toward doing this sort of thing. In my mind, if a datatype has some structure to it, why not just make it a complex type and leverage XML syntax to convey that structure? Isn't that really the whole point of XML -- a standardized syntax for conveying structure?
|

Cart



