[libvirt] [PATCH] nwfilter: Add filter schema for nwfilter XML, extend domain XML schema

Daniel Veillard veillard at redhat.com
Tue Apr 6 21:23:32 UTC 2010


On Tue, Apr 06, 2010 at 12:28:27PM -0400, Stefan Berger wrote:
> Daniel Veillard <veillard at redhat.com> wrote on 04/06/2010 11:40:02 AM:
> 
> > Please respond to veillard
> 
> > 
> >   Ah, okay, I understand now !
> > 
> > > I had a lot of problems finding a way to require a $ as first letter 
> and I 
> > > ended up having to use the [\\$]{1} construct. Also I could not find a 
> 
> > > switch for non-case-sensitive string comparison like other regexes 
> have 
> > > (?i) or \i for example... I suppose there is none.
> > 
> >   right. We are using XML Schemas datatype here, and the regexps are
> > defined in this appendix
> >   http://www.w3.org/TR/xmlschema-2/#regexs
> > character $ has no special meaning in XML so doesn't need any escaping
> >   http://www.w3.org/TR/xmlschema-2/#nt-SingleCharEsc
> > 
> >     <param name="pattern">$[a-zA-Z0-9_]+</param>
> > 
> > should just work fine I think, can you try ? If yes that's worth fixing
> > before the push :-)
> 
> $ is the end of line indicator in regular expressions. I needs to be 
> escaped, at the least.

  Not in XML Schemas regexp, see my link search for '$' 

 as posted http://www.w3.org/TR/xmlschema-2/#regexs

----------------------------------
Note:  Unlike some popular regular expression languages (including those
defined by Perl and standard Unix utilities), the regular expression
language defined here implicitly anchors all regular expressions at the
head and tail, as the most common use of regular expressions in
·pattern· is to match entire literals.
----------------------------------

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list