On Sun 01 Sep 2013 04:19:59 AM PDT, Nicholas Devenish wrote:
> Hi All,
>
> I have been using generateDS to parse a large schema, but have found
> issues running the output when lxml is not available - to force
> this, I have commented out the try/except tree at the beginning so
> that the only import is:
>
> import xml.etree.ElementTree as etree_
> XMLParser_import_library = XMLParser_import_elementtree
>
> However, it looks like it depends Element.nsmap, which appears to be
> an lxml-construct. I get, during parsing:
>
> File "proj/parsers/bpmn/schema.py", line 19405, in parseString
> rootObj.build(rootNode)
> File "proj/parsers/bpmn/schema.py", line 907, in build
> self.buildChildren(child, node, nodeName_)
> File "proj/parsers/bpmn/schema.py", line 1045, in buildChildren
> obj_.build(child_)
> File "proj/parsers/bpmn/schema.py", line 16956, in build
> self.buildAttributes(node, node.attrib, already_processed)
> File "proj/parsers/bpmn/schema.py", line 16988, in buildAttributes
> super(tProcess, self).buildAttributes(node, attrs, already_processed)
> File "proj/parsers/bpmn/schema.py", line 14178, in buildAttributes
> value = find_attr_value_('xsi:type', node)
> File "proj/parsers/bpmn/schema.py", line 462, in find_attr_value_
> namespace = node.nsmap.get(prefix)
> AttributeError: 'Element' object has no attribute 'nsmap'
>
> How can I work around this issue? I'm running on IronPython, so lxml
> is not available.
Nick,
Sorry that I am *so* slow responding. I've been working to prepare to
teach a Python class, and that had to take priority.
And, I really don't have a solution to that problem. Code generated
by generateDS.py assumes that you have lxml. If that feature
(node.nsmap) is not in ElementTree, then I think we're stuck.
I suppose you could try to do a patch to ElementTree, but that does
not sound at all easy.
Sorry I can't be of more help. It really would be nice to be able to
support IronPython.
Dave
>
> Thanks,
>
> Nick
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> generateds-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/generateds-users
>
>
--
Dave Kuhlman
http://www.davekuhlman.org
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13.
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________
generateds-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/generateds-users