Quick follow-up:  This expression works:

base_attrib = re.compile(r'^{.*}base.*$')

Then:
schwa...@jslaptop:~$ python
Python 2.6.4 (r264:75706, Oct 21 2010, 03:48:43) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> base_attrib = re.compile(r'^{.*}base.*$')
>>> a='{http://www.w3.org/XML/1998/namespace}base="/path/to/sub-doc.xml";'
>>> print base_attrib.match(a)
<_sre.SRE_Match object at 0x80fa4b8>
>>>

    Thanks,
    Jack



On 11/05/10 10:07, Jack Schwartz wrote:
 Hi Dermot.

Line 334 looks incorrect to me...  The regular expression:
    '^{.*}base$'
requires that "base" be at the end of the line. This is not what you want, according to the comment on line 330: there's a filename after "base".

I did a few quick checks to validate my claims:

schwa...@jslaptop:~$ python
Python 2.6.4 (r264:75706, Oct 21 2010, 03:48:43) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> base_attrib = re.compile(r'^{.*}base$')
>>> a='{http://www.w3.org/XML/1998/namespace}base="/path/to/sub-doc.xml";'
>>> print base_attrib.match(a)
None <<--- This is "no match"
>>> print base_attrib.match("{ }base")
<_sre.SRE_Match object at 0x80fa4b8> <<--- match; "base" at the end.
>>> print base_attrib.match("{ }base=")
None <<--- No match;  "base" not at the end.
>>>

    Thanks,
    Jack




On 11/05/10 04:42, Dermot McCluskey wrote:
Hi,

Can I get a review for this fairly simple fix for ManifestParser bug:
http://monaco.sfbay/detail.jsf?cr=6997263

Webrev is at:  http://cr.opensolaris.org/~dermot/webrev-6997263/

Thanks,
- Dermot
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss


_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to