Importing Grammars?

373 views
Skip to first unread message

Harold DeWayne

unread,
Apr 2, 2013, 6:12:06 AM4/2/13
to bots...@googlegroups.com
Is there a mechanism to import an XSD file or an SEF file into a GRAMMAR in BOTS?

--
Harold DeWayne, CECP, RECS
NFI Industries

henk-jan ebbers

unread,
Apr 2, 2013, 6:38:30 AM4/2/13
to bots...@googlegroups.com
hi harold,

up until bots 3.0 there was a SEF to grammar tool in bots. I took it out because of the lack of good SEF files, and probably the fact that all x12 and edifact messages cna be downloaded from bots site
kinds fileld in that need.
I can send it, if you want (and it is still in the bots 2.2.1 version on soruceforge)

XSD to grammar: I developed that, but it has not seen thorough testing. I cna send it if you want it.

if you have an xml file, bot can make a grammar out of that (xml2botsgrammar.py).
(in bots 3.0 there is in import missing in that script, should add 'import logging' in start of file)

kind regads,
henk-jan


On 04/02/2013 12:12 PM, Harold DeWayne wrote:
> Is there a mechanism to import an XSD file or an SEF file into a GRAMMAR in BOTS?
>
> --
> *Harold DeWayne, CECP, RECS*
> *NFI Industries*
> --
> You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to botsmail+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Harold DeWayne, CECP, RECS

unread,
Apr 2, 2013, 10:18:45 PM4/2/13
to bots...@googlegroups.com
Thanks Henk-Jan... I would appreciate the XSD to grammar script (and the SEF to grammar script as well) if you have it... I'm not a Python programmer but I'm hacking my way through this, a little at a time.  I tried to use the xml2botsgrammar.py script on a file (after making it executable) but it failed.  I'll be looking into that further in the next day or two.



Harold.

"Good programmers rarely re-invent the wheel if they can just improve on someone else's"

Harold DeWayne, CECP, RECS

unread,
Apr 3, 2013, 6:24:17 AM4/3/13
to bots...@googlegroups.com
Got the xml2botsgrammar.py script to work... I was using the one in the bots/ directory not the bots-xml2botsgrammar.py one.  Now to try out my new grammar file.......



Harold.


On Tuesday, April 2, 2013 6:38:30 AM UTC-4, eppye wrote:

henk-jan ebbers

unread,
Apr 3, 2013, 6:36:40 AM4/3/13
to bots...@googlegroups.com
OK, good to hear.

I attached sef2bots and xsd2grammar to this email (hope gmail does not remove the attachments)
as said xsd2grammar is in an early development phase.



kind regards,
henk-jan
> > To unsubscribe from this group and stop receiving emails from it, send an email to botsmail+u...@googlegroups.com <javascript:>.
> > For more options, visit https://groups.google.com/groups/opt_out <https://groups.google.com/groups/opt_out>.
xsd2grammar.py
sef2bots.py

Daniel Furman

unread,
Mar 25, 2015, 9:20:20 AM3/25/15
to bots...@googlegroups.com
Hi, Henk-Jen.

This is my first time on the board so let me start by thanking you for all of the work on the platform, BOTS is a pleasure to use. This is one of my first python programming experiences and thanks to you and BOTS I've never had more fun programming.

I've been using an XML editor to create example files from my schemas then running those through xml2grammar.py, but chose elements in the schema make this much harder, especially when the XSD includes a few different X12 formats (850/860/832 source is from the same schema, yikes!). So I'm very interested in the xsd2grammar feature discussed here. Have there been changes made since this version?

Alexander

unread,
Sep 12, 2019, 8:52:09 AM9/12/19
to Bots Open Source EDI Translator
Hey Henk-Jan,

did you continue with the development of the xsd2grammar module?
Is there a newer version available somewhere or can you share one?

Would be happy to see an update.

Thanks & best regards
Alex

Eppye Bots

unread,
Sep 12, 2019, 5:02:06 PM9/12/19
to 'Chuck Turco' via Bots Open Source EDI Translator
i have a xsd2botsgrammar.
I can share it.
it does not work for very complicated grammars
kind regards, Henk-Jan Ebbers


Alexander

unread,
Sep 13, 2019, 5:17:44 AM9/13/19
to Bots Open Source EDI Translator
Hi Henk-Jan,

super, I would appreciate if you could send it.
I will give it a try but might not work for ZUGFeRD (2.0) as this is - I think - a rather complicated one.
But for some smaller ones it will be useful for sure.

Best regards
Alex
To unsubscribe from this group and stop receiving emails from it, send an email to bots...@googlegroups.com.

Eppye Bots

unread,
Sep 13, 2019, 1:57:19 PM9/13/19
to 'Chuck Turco' via Bots Open Source EDI Translator
filenames are hardcoded in function start()
2 different versions:
- in less records;  version more xml elements are used as 'fields'.
  that is somewhat more convenient, but disadvantage is that some xsd force a strict sequence, while bots places 'fields' first.

workaround is to have a xml file with all fields filled.

botsconfig.py (also in attachment) needs to be in same directory

kind regards, Henk-Jan Ebbers


xsd2grammar_less_records.py
xsd2grammar.py
botsconfig.py
Reply all
Reply to author
Forward
0 new messages