On Thu, 2016-10-13 at 08:18 +0200, José JORGE wrote: > Le 11/10/2016 à 22:36, Lincoln A Baxter a écrit : > > > I took a look at a (google translated) version of the referenced french > > website. I like the concept in principle. Too bad there is not an ISO > > standard format (that would be the way to go if there were one). I did > not see an actual XSD referenced -- :-( It would be nice to see an > actual sample of what the data is supposed to look like. That would > > help one understand the best approach to take. It maybe that converting > an existing report or building a new one would do it. > > Yes I also feel this is a way to go : an ISO export format. > > As for an exemple, I was told there is a site to get it from the xsd : > > [1]http://xsd2xml.com/ or [2]https://devutilsonline.com/ > xsd-xml/generate-xml-from-xsd > The needed XSD is there : [3]http://www.impots.gouv.fr/ > > portal/deploiement/p1/fichedescriptive_6706/fichedescriptive_6706. xsd. > > <snip> > > References > > 1. http://xsd2xml.com/ > 2. https://devutilsonline.com/xsd-xml/generate-xml-from-xsd > > > 3. http://www.impots.gouv.fr/portal/deploiement/p1/fichedescriptive_6706 /fichedescriptive_6706.xsd > Thanks for the links. Helps. Interesting. Doesn't look very complex. Not as complex as the GC XML file by a long shot.
First I'll say, while I attempted to translate the Element names in this XML so I could understand them, I could get get a translation for all of them, so there may be bits I'm missing. For instance, I not exactly sure what "PieceRef" or "EcritureLet" means. That said, this basically looks like a ledger extract from a single account's point of view. I'm not sure whether there is even a way to reference the balancing account's transactions in this format. It seems to be just a list of transactions. The transactions in the GC file effectively have most of this information.... I would maybe start with the "account report" to get your data, and then wrap that with the leading and trailing stuff "hard coded." If you extract the transaction data for the account(s) in question from the GC xml file, then an XML style sheet conversion might do it as well... maybe even without extracting anything. If I were doing it, I'd probably use the perl code I have the reads the CG XML file, to write out the XML that conforms to this XSD. The balancing account name could be concatenated to the transaction description if necessary. Lincoln _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel