From jeroen.vrijnsen at philips.com Wed Nov 16 03:40:38 2016 From: jeroen.vrijnsen at philips.com (Vrijnsen, Jeroen) Date: Wed Nov 16 03:40:53 2016 Subject: [xsde-users] Bug report Message-ID: Hi Boris, Three years after date: I have recently downloaded XSD/e 3.2.0, and still bumped into this same issue. The fix below still applies. You mentioned in your reply that the bug was already fixed. Why is it then not part of the current libXSD/e download? Has it never been released? Are there still any new release plans? Kind regards, Jeroen On Wed, Jun 12, 2013 at 3:21 PM, Boris Kolpackov >wrote: > Hi Kai, > > kai jiang > writes: > > > "Could not parse file: invalid double value:schema error:384340:25" > > > > The content at rows 384340, column 25 of the XML file is as follows: > > > "-1" > > > > If I change the value "-1" to "-1.0" or "1", then the program works fine. > > > > The same content ("-1") also appears at row 628, and > there > > is no error at this position. > > I am pretty sure this is a known bug that we have already fixed. Can you > try this patch and see if it helps: > > http://www.codesynthesis.com/~boris/tmp/xsde-3.2.0-numeric-parser.tar.gz > > Simply override the files in libxsde with the ones in the archive, then > rebuild libxsde and your application. > > Boris > xsde-users Info Page - CODE SYNTHESIS TOOLS codesynthesis.com xsde-users is a technical support mailing list for CodeSynthesis XSD/e, a W3C XML Schema to C++ compiler for mobile and embedded systems. Simply send an email to xsde ... ________________________________ The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message. From boris at codesynthesis.com Wed Nov 16 10:15:33 2016 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Nov 16 10:15:42 2016 Subject: [xsde-users] Bug report In-Reply-To: References: Message-ID: Hi Jeroen, Vrijnsen, Jeroen writes: > Why is it then not part of the current libXSD/e download? Has it never > been released? Correct. Unfortunately we have been very busy in other areas. > Are there still any new release plans? Yes, there are. One of the things that kept us so busy is the work to improve the release process so that in the future we can make them as often as needed without much overhead for both sides (us and the users). Boris From samuel.friedman at cammlab.org Mon Nov 28 15:13:30 2016 From: samuel.friedman at cammlab.org (Samuel Friedman) Date: Mon Nov 28 15:14:04 2016 Subject: [xsde-users] Insert Raw XML with XSD/e serialization Message-ID: Hello! I have been working extensively with XSD/e's hybrid examples of wildcard (both with custom types and custom data). I have an a complexType that is: In short, I want to have in an element of type custom that allows me to put in any XML or plain text or combination thereof that I want. I finally managed to get just plain text inserted using serializer_base's _characters() function. Some sample code using the custom data compiler flag: common::custom *custom_test = new common::custom; // Create custom object string *hw_test = new string("hello_world"); // Make a hello world string custom_test->custom_data().push_back((void *)(hw_test)); // Insert hello world larger_element_previously_defined->custom(custom_test) // Insert custom text This creates an element: hello_world This is exactly what I want. But when I try to insert XML, the serializer escapes the XML text via genx, i.e. it converts "Hi" to "<a>Hi</a>". I want to have created: Hi and not: <a>Hi</a> I'll happily give up the extra whitespace for now if I could just get the XML inserted. Now the XML I want to insert will most likely not be defined by my XML schemas and may very well not be defined according to any XML schema (e.g. may be defined by Relax NG schemas), so using XSD/e to parse this data is not an option. (I already do this to merge XML files together that obey my XML schemas.) I'm more than willing to test that the string I want to insert is well formed XML and I would love to have some easy code to do so. But I need to be able to write everything down first. There's no reason to test for if the XML is well formed if I cannot output it. How do I get around escaping? The only way I could see this would be to create a modified versions of genx.c's genxAddText function, context.cxx's context::characters function, and elements.ixx's serialize_base::_characters function. context.cxx and elements.ixx are the ones in serializer. I feel like there should be a better way. Thank you in advance, Sam -- Dr. Samuel H. Friedman Postdoctoral Scholar - Research Associate Lawrence J. Ellison Institute for Transformative Medicine of USC USC Center for Applied Molecular Medicine University of Southern California 2250 Alcazar St, Rm 259 Los Angeles, CA 90089-9075 Phone: 323-442-2531 | FAX: 323-442-2764 Email: samuel.friedman@cammlab.org From boris at codesynthesis.com Tue Nov 29 11:25:53 2016 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Nov 29 11:26:01 2016 Subject: [xsde-users] Insert Raw XML with XSD/e serialization In-Reply-To: References: Message-ID: Hi Samuel, Samuel Friedman writes: > I'm more than willing to test that the string I want to insert is well > formed XML and I would love to have some easy code to do so. I think your best option is to setup an Expat parser (part of libxsde) to parse your XML fragment as a memory buffer and then route all the callbacks to the underlying serializer (Genx) to be serialized. You will get both well-formedness validation from parsing and Genx will "embed" your fragment seamlessly into the output (indentation, etc). There is the evolution/passthrough example that shows how to do the second part of this. Setting up Expat should be pretty straightforward. Boris From samuel.friedman at cammlab.org Tue Nov 29 13:09:29 2016 From: samuel.friedman at cammlab.org (Samuel Friedman) Date: Tue Nov 29 13:10:03 2016 Subject: [xsde-users] Insert Raw XML with XSD/e serialization In-Reply-To: References: Message-ID: Boris, That's a great idea! I had not thought about using Expat like that! I'll give this a whirl hopefully by the end of next week. Sam On Tue, Nov 29, 2016 at 8:25 AM, Boris Kolpackov wrote: > Hi Samuel, > > Samuel Friedman writes: > > > I'm more than willing to test that the string I want to insert is well > > formed XML and I would love to have some easy code to do so. > > I think your best option is to setup an Expat parser (part of libxsde) > to parse your XML fragment as a memory buffer and then route all the > callbacks to the underlying serializer (Genx) to be serialized. You > will get both well-formedness validation from parsing and Genx will > "embed" your fragment seamlessly into the output (indentation, etc). > > There is the evolution/passthrough example that shows how to do the > second part of this. Setting up Expat should be pretty straightforward. > > Boris > -- Dr. Samuel H. Friedman Postdoctoral Scholar - Research Associate Lawrence J. Ellison Institute for Transformative Medicine of USC USC Center for Applied Molecular Medicine University of Southern California 2250 Alcazar St, Rm 259 Los Angeles, CA 90089-9075 Phone: 323-442-2531 | FAX: 323-442-2764 Email: samuel.friedman@cammlab.org