xsl-list
[Top] [All Lists]

[XSD] Possible to ignore case in pattern restric tion?

2003-02-18 07:16:00

Hi,

Take a looke at this schema which defines a simpleType for email-addresses
Now i wonder if it's possible to have the pattern be case-IN-sensitive??

Normally I would do something like: ([a-z]{4}/i/)

But would that work (read is it supported by any w3 standard)??


<?xml version="1.0" encoding="iso-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
        <xs:simpleType name="email">
                <xs:restriction base="xs:string">
                        <xs:whiteSpace value='collapse'/>
                        <xs:pattern value="(
                                [a-z0-9]
                                ([a-z0-9_\.]*)
                                @
                                ([a-z0-9_\.]*)
                                ([.]([a-z]{2}|
                                
(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro)))
                        )"/>
                </xs:restiction>
        </xs:simpleType>
</xs:schema>

If not then I foresee a typing hell makeing the domain names case-insensitive


/Rasmus

---------------------------------------------------------------------------
Danmarks Statistik (Statistics Denmark)
Sejrogade 11, DK-2100 Kobenhavn O
Tel. +45 39173917, Fax +45 39173999
dst(_at_)dst(_dot_)dk, www.dst.dk
---------------------------------------------------------------------------

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>