The expression seems to be a valid python expression
>>> import re
>>> r = re.compile(r"[\w*#+]*")
>>> r.findall('foo bar baz')
['foo', '', 'bar', '', 'baz', '']
>>>
--Karl
Karl Putland
Senior VoIP Engineer
*SimpleSignal*
3600 S Yosemite, Suite 150
Denver, CO 80237
One Number Rings All My Phones: 303-242-8608
SimpleSignal.com <http://www.simplesignal.com/> |
Blog<http://www.simplesignal.com/blog>
| Facebook <http://www.facebook.com/SimpleSignal?ref=ts> |
Twitter<http://twitter.com/simplesignal>
On Thu, Jan 31, 2013 at 6:31 PM, Karl Putland <k...@simplesignal.com> wrote:
> The expression in the xsd appears valid, however it fails. Schema attached.
>
>
> fails on XBIngress(match='all', action1='none', digits1='',
> action2='none', digits2='')
>
>
> Traceback (most recent call last):
> File "./siptrunk.py", line 559, in <module>
> SansayXMLBuilder().main()
> File "./siptrunk.py", line 553, in main
> self.build_resource()
> File "./siptrunk.py", line 398, in build_resource
> resource = self.build_ip_resource(trunk_record)
> File "./siptrunk.py", line 352, in build_ip_resource
> rtid=trunk_record['route_table_id_number']
> File "./siptrunk.py", line 268, in resource_factory
> 'ingress1' : self.schema.resources.XBIngress(match='all',
> action1='none', digits1='', action2='none', digits2=''),
> File "/Library/Python/2.7/site-packages/pyxb/binding/basis.py", line
> 1705, in __init__
> fu.set(self, iv)
> File "/Library/Python/2.7/site-packages/pyxb/binding/content.py", line
> 561, in set
> value = self.__elementBinding.compatibleValue(value,
> is_plural=self.isPlural())
> File "/Library/Python/2.7/site-packages/pyxb/binding/basis.py", line
> 1406, in compatibleValue
> return self.typeDefinition()._CompatibleValue(value, **kw)
> File "/Library/Python/2.7/site-packages/pyxb/binding/basis.py", line
> 285, in _CompatibleValue
> return cls(value)
> File "/Library/Python/2.7/site-packages/pyxb/binding/basis.py", line
> 786, in __init__
> self.xsdConstraintsOK()
> File "/Library/Python/2.7/site-packages/pyxb/binding/basis.py", line
> 918, in xsdConstraintsOK
> return self.XsdConstraintsOK(self)
> File "/Library/Python/2.7/site-packages/pyxb/binding/basis.py", line
> 912, in XsdConstraintsOK
> if not f.validateConstraint(value):
> File "/Library/Python/2.7/site-packages/pyxb/binding/facets.py", line
> 186, in validateConstraint
> return self._validateConstraint_vx(value)
> File "/Library/Python/2.7/site-packages/pyxb/binding/facets.py", line
> 436, in _validateConstraint_vx
> if pe.matches(value):
> File "/Library/Python/2.7/site-packages/pyxb/binding/facets.py", line
> 393, in matches
> self.__compiledExpression = re.compile(self.__pythonExpression)
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py",
> line 190, in compile
> return _compile(pattern, flags)
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py",
> line 245, in _compile
> raise error, v # invalid expression
> sre_constants.error: bad character range
>
>
>
> --Karl
>
> Karl Putland
> Senior VoIP Engineer
>
> *SimpleSignal*
> 3600 S Yosemite, Suite 150
> Denver, CO 80237
> One Number Rings All My Phones: 303-242-8608
>
> SimpleSignal.com <http://www.simplesignal.com/> |
> Blog<http://www.simplesignal.com/blog>
> | Facebook <http://www.facebook.com/SimpleSignal?ref=ts> |
> Twitter<http://twitter.com/simplesignal>
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
pyxb-users mailing list
pyxb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyxb-users