Le jeudi 10 f�vrier 2005 � 12:02 +0100, Erik Bruchez a �crit : > Erik Bruchez wrote: > > >> 2. Now, if I force this media type in the config input, I get an > >> error: "the value does not match the regular expression "[a-zA-Z > >> \-]+/[a-zA-Z\-]+".(schema: http://www.orbeon.org/oxf/xml/url)". > >> Shouldn't this pattern be laxer than it is right now? > > > > > > This definitely looks like a bug. > > > > I have to defer entering those in the bug base because it is being > > migrated to ObjectWeb right now. > > Forgot to say that if you provide me with the correct regexp, I can fix > #2 right away ;-)
OK, let's try... According to http://www.faqs.org/rfcs/rfc2045.html, content := "Content-Type" ":" type "/" subtype *(";" parameter) ; Matching of media type and subtype ; is ALWAYS case-insensitive. type := discrete-type / composite-type discrete-type := "text" / "image" / "audio" / "video" / "application" / extension-token composite-type := "message" / "multipart" / extension-token extension-token := ietf-token / x-token ietf-token := <An extension token defined by a standards-track RFC and registered with IANA.> x-token := <The two characters "X-" or "x-" followed, with no intervening white space, by any token> subtype := extension-token / iana-token iana-token := <A publicly-defined extension token. Tokens of this form must be registered with IANA as specified in RFC 2048.> parameter := attribute "=" value attribute := token ; Matching of attributes ; is ALWAYS case-insensitive. value := token / quoted-string token := 1*<any (US-ASCII) CHAR except SPACE, CTLs, or tspecials> tspecials := "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / <"> "/" / "[" / "]" / "?" / "=" ; Must be in quoted-string, ; to use within parameter values Assuming that we don't want to deal with any registration table, I think we could use something such as: <xs:pattern value='[\p{IsBasicLatin}-[	- ()<>@,;:\\"/\[\]=?]]+/[\p{IsBasicLatin}-[	- ()<>@,;:\\"/\[\]=?]]+'/> Eric -- Weblog: http://eric.van-der-vlist.com/blog?t=category&a=English ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user
