OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Using W3C Regular Expressions



> From: Simon St.Laurent [mailto:simonstl@simonstl.com]
> Sent: Tuesday, April 17, 2001 4:37 PM
> To: xml-dev@lists.xml.org
> 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?