[ http://issues.apache.org/jira/browse/TUSCANY-705?page=comments#action_12434141 ] Geoff Winn commented on TUSCANY-705: ------------------------------------
There's a bit more to this. The patch supplied works on XP when built with MSVC 7.1. However, when built with MSVC 6 one of the standard tests fails producing invalid XML (the tag and part of a namespace attribute are omitted). I am looking into this. > XMLHelperImpl::createDocument() gives invalid XML when the element has > xsi:nil=true > ----------------------------------------------------------------------------------- > > Key: TUSCANY-705 > URL: http://issues.apache.org/jira/browse/TUSCANY-705 > Project: Tuscany > Issue Type: Bug > Components: C++ SDO > Affects Versions: Cpp-current > Environment: WinXP > Reporter: Caroline Maynard > Priority: Critical > Attachments: bug8506.patch, bug8506.patch > > > See http://pecl.php.net/bugs/bug.php?id=8506 for the test example. > The schema is: > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > targetNamespace="http://ConvertedStockQuote"> > <xs:element name="getQuote"> > <xs:complexType> > <xs:sequence> > <xs:element name="ticker" type="xs:string" nillable="true"/> > </xs:sequence> > </xs:complexType> > </xs:element> > </xs:schema> > When the ticker element's value is not nil, the output is: > <?xml version="1.0" encoding="UTF-8"?> > <getQuote xmlns="http://ConvertedStockQuote" xsi:type="getQuote" > xmlns:tns="http://ConvertedStockQuote" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <ticker>IBM</ticker> > </getQuote> > but when it is nil, my user gets: > <?xml version="1.0" encoding="UTF-8"?> > <getQuote xmlns="http://ConvertedStockQuote" xsi:type="getQuote" > xmlns:tns="http://ConvertedStockQuote" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <getQuote xmlns="http://ConvertedStockQuote" xsi:nil="true"/> > </getQuote> > I've attached a proposed patch. I removed the namespace URI to be consistent > with the non-nil case, apologies if this is incorrect. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]