From n.e.x.g.e.n.s at gmail.com Tue Sep 18 11:19:28 2018 From: n.e.x.g.e.n.s at gmail.com (Shrikant) Date: Tue Sep 18 11:27:07 2018 Subject: [xsd-users] Codesynthesis and XPATH Message-ID: Hi I want to use Codesynthesis to parse my xml against xsd and use the created object and a given xpath(or any unique string to identify each node) to fetch the required child element. Some ideas i am having Before generation of class from xsd, have some instruction to the XSD binary to put some identifier for each element in the xsd and have this mapping information available to be passed to an API , which will fetch the required field value. Does anyone have any pointers to achieve this? I have tried using XQilla, it does the job by using the DomDocument object from already created Codesynthesis object, but it's really really slow, has slowed down the performance of our product by 10 times. So we won't be using it. Thanks From n.e.x.g.e.n.s at gmail.com Tue Sep 18 11:24:37 2018 From: n.e.x.g.e.n.s at gmail.com (Shrikant) Date: Tue Sep 18 11:32:16 2018 Subject: [xsd-users] Need to speed up performance of parser In-Reply-To: References: Message-ID: Thank you boris I checked the performance example and cached some high usage objects and did improve the performance. On Mon, Apr 9, 2018, 11:34 Boris Kolpackov wrote: > Shrikant writes: > > > We have used the cxx/tree/embedded example exactly as it is in our > > application and parsing the incoming XML and mapping the XML elements to > > internal structures. We have tried optimizing our code as much as > possible. > > But with no luck. Can anyone suggest tweaking any setParameter options > > for parser config, so that the parser performance can improve. > > The idea is to cache and reuse as much as possible. Take a look at the > 'performance' example for some ideas. > > If that still doesn't get you to your desired performance, then the > next step would be to profile your application and see if there are > any hotspots. > > Boris > From ncherednychek at initse.com Thu Sep 20 10:04:07 2018 From: ncherednychek at initse.com (Cherednychek, Nikita) Date: Thu Sep 20 11:54:04 2018 Subject: [xsd-users] anyType problem Message-ID: <79b5dc52de3a4e3ebfe95cb75b273031@SRVMAIL01.init-ka.lan> Hello, I'm searching for the solution since ours and still didn't get it, so I decided to write a mail. I have following complex Type in my xsd: There is an element "Extensions" with type "xsd:anyType". I have generated a C++ code and want to create an xml. So I create an object of the type "VehicleMonitoringDelivery_t" (example: myVehicleMonitoringDelivery) and fill it with numbers. For example: myVehicleMonitoringDelivery-> SubscriberRef("1234"); myVehicleMonitoringDelivery-> Status(true); and so on. Now I wont to fill the "Extensions" with some, let say, string. WHO CAN I DO THAT? The na?ve approach myVehicleMonitoringDelivery->Extensions("myString") doesn't work, in the generated xml a get an empty tag , although there is no errors. It would be great if you can help me. [https://intranet.init-ka.lan/SiteAssets/Logo_Signatur.jpg] Dr.rer.nat Nikita Cherednychek Software Developer Phone +49-(0)721-6100-830 Mobile +49-1525-6610-830 E-Mail ncherednychek@initse.com INIT Innovative Informatikanwendungen in Transport-, Verkehrs- und Leitsystemen GmbH K?ppelestrasse 4-10 76131 Karlsruhe Germany http://www.initse.com Gesch?ftsf?hrer: Dr.-Ing. Gottfried Greschner Dipl.-Inform.(FH) Mario Baumg?rtner Dipl.-Inform. Joachim Becker Dipl.-Kfm. Dr. J?rgen Greschner Dipl.-Ing.(FH) Klaus Janke Dipl.-Ing.(FH) Matthias K?hn Dipl.-Ing.(BA) Andreas M?rder Dipl.-Kfm. Bernhard Smolka Amtsgericht Mannheim HRB 103679 Internationale Registrierungen: 988055689MVA (Norwegen) FC027220 (UK) IRD124-186-846 (NZ) CHE-144.752.100 (CH) Vertraulichkeitshinweis: Der Inhalt dieser E-Mail ist vertraulich zu behandeln. Das Schreiben ist nur zur Kenntnis des oben genannten Empf?ngers bestimmt. Wenn Sie nicht der richtige Adressat sind, informieren Sie bitte sofort den Absender und vernichten diese Nachricht. Unerlaubte Kopien sowie unbefugte Weitergabe sind nicht gestattet. Bitte beachten Sie, dass durch diese E-Mail keine rechtsverbindlichen Willenserkl?rungen abgegeben werden. Privacy Notice: Content of this e-mail must be treated as strictly confidential. This writing is intended only for the knowledge of the above-mentioned addressee. If you are not the correct recipient please inform the sender immediately and permanently erase this message. Illegal copies as well as unauthorized passing is not permitted and strictly forbidden. Please note that by sending this mail INIT does not make any commitment and is under no obligation. -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 22941 bytes Desc: image001.jpg Url : https://codesynthesis.com/pipermail/xsd-users/attachments/20180920/0ca3517a/image001.jpg From boris at codesynthesis.com Fri Sep 21 10:16:42 2018 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Sep 21 10:24:10 2018 Subject: [xsd-users] anyType problem In-Reply-To: <79b5dc52de3a4e3ebfe95cb75b273031@SRVMAIL01.init-ka.lan> References: <79b5dc52de3a4e3ebfe95cb75b273031@SRVMAIL01.init-ka.lan> Message-ID: Cherednychek, Nikita writes: > > > > > > > > > > > > > [...] > > Now I wont to fill the "Extensions" with some, let say, string. To quote the C++/Tree Mapping Manual: "anyType allows any attributes and any content in any order. In the C++/Tree mapping this content can be represented as a DOM fragment." See Section 2.5.2, "Mapping for anyType" for details: https://codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.5.2 From jjgw at jjgordon.com Mon Sep 24 11:01:23 2018 From: jjgw at jjgordon.com (James Gordon) Date: Mon Sep 24 11:09:23 2018 Subject: [xsd-users] Newbie question Message-ID: Hi, I am trying to get started with XSD and QtCreator (Qt 5.7, mingw32). I followed instructions at: http://wiki.codesynthesis.com/Using_XSD_with_Qt_Creator I have my INCLUDEPATH and LIBS configured. I am trying to build the tree hello example, which has two 'source' files: driver.cxx and hello.xsd My .pro file looks like: SOURCES += hello.xsd \ driver.cxx If I attempt to build, I get error: "hello.hxx: no such file or directory" hello.hxx is included from driver.cxx, but obviously has to be generated from xsd I figure there must be some configuration needed for QtCreator, to tell it that xsd generation must be invoked (i.e., xsd rule included in makefile) How do I do that? Thanks James From gschrad at ll.mit.edu Mon Sep 24 11:29:39 2018 From: gschrad at ll.mit.edu (Schrader, Glenn - 1002 - MITLL) Date: Mon Sep 24 11:37:27 2018 Subject: [xsd-users] xs:double with xs:restriction Message-ID: <240bb5187a86434894de1fe5acb0c8b8@ll.mit.edu> Hello, I have a schema containing a simple data type that has the restriction with xs:double as the base type. The problem is that the output doesn't always match the pattern. For instance if the field's value is 8.0 then an output file has "8" rather than "8.0". Validating parsers flag this as an error since it doesn't match the pattern so is there a way to make this work or are pattern restrictions not supported for this case (i.e. non-string base types). Thanks From boris at codesynthesis.com Mon Sep 24 23:11:04 2018 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Sep 24 23:21:21 2018 Subject: [xsd-users] xs:double with xs:restriction In-Reply-To: <240bb5187a86434894de1fe5acb0c8b8@ll.mit.edu> References: <240bb5187a86434894de1fe5acb0c8b8@ll.mit.edu> Message-ID: Schrader, Glenn - 1002 - MITLL writes: > I have a schema containing a simple data type that has the restriction > with xs:double as the base type. The > problem is that the output doesn't always match the pattern. For instance if > the field's value is 8.0 then an output file has "8" rather > than "8.0". Validating parsers flag this as an error since it > doesn't match the pattern so is there a way to make this work or are pattern > restrictions not supported for this case (i.e. non-string base types). You can't generally serialize a value in a way that matches a regex pattern. What you can do is customize this type and provide custom serialization that produces the desired format. See examples/cxx/tree/custom/double/ for how to do this. From boris at codesynthesis.com Mon Sep 24 23:18:15 2018 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Sep 24 23:26:01 2018 Subject: [xsd-users] Newbie question In-Reply-To: References: Message-ID: James Gordon writes: > My .pro file looks like: > > SOURCES += hello.xsd \ > > driver.cxx > > I figure there must be some configuration needed for QtCreator, to tell > it that xsd generation must be invoked (i.e., xsd rule included in makefile) I am no QtCreator expert but I doubt this will be easy or even possible. I would suggest that you start with just manually compiling your schema and then adding the generated source files to the project. Once you have this working, you can look if there is a way to automate it with a pre- build step or some such. From jjgw at jjgordon.com Wed Sep 26 09:44:29 2018 From: jjgw at jjgordon.com (James Gordon) Date: Wed Sep 26 09:52:34 2018 Subject: [xsd-users] Newbie question In-Reply-To: References: Message-ID: Thanks, I went with a small app that iterated through dirs and ran xsd on relevant files. This could be made a pre-build step if needed. Problem solved. On Mon, Sep 24, 2018 at 11:18 PM Boris Kolpackov wrote: > James Gordon writes: > > > My .pro file looks like: > > > > SOURCES += hello.xsd \ > > > > driver.cxx > > > > I figure there must be some configuration needed for QtCreator, to tell > > it that xsd generation must be invoked (i.e., xsd rule included in > makefile) > > I am no QtCreator expert but I doubt this will be easy or even possible. > I would suggest that you start with just manually compiling your schema > and then adding the generated source files to the project. Once you have > this working, you can look if there is a way to automate it with a pre- > build step or some such. > -- J. James Gordon Chief Physicist Radiation Oncology Associates Fort Wayne IN