RE: How to have an attribute which contains XML

2009-11-18 Thread Leif Goodwin
Yes, that is exactly what we do. I use the setAttribute method on DOMElement instance passing name as "formula" and value as ".//activity/@status". Then I serialise the DOMDocument to a string. When I examine the string, I see that Xerces has replaced each '<' with "<" which is correct. But it lea

How to have an attribute which contains XML

2009-11-17 Thread Leif Goodwin
We have blocks of XML which represents dialog templates. Here is an example with 2 buttons and one number edit control: You can see that the element has an attribute called "formula" which contains an XQuery expression. This works fine until the XQuery expression contains someth

Re: How to validate an XML file against a schema

2009-05-13 Thread Leif Goodwin
See here for issue resolved: http://www.nabble.com/validating-xml-with-xsd-schema-td23315036.html -- View this message in context: http://www.nabble.com/How-to-validate-an-XML-file-against-a-schema-tp23505491p23522301.html Sent from the Xerces - C - Dev mailing list archive at Nabble.com. -

Re: validating xml with xsd schema

2009-05-13 Thread Leif Goodwin
g missing: > > parser->setValidationScheme(SAXParser::Val_Auto); // or Val_Always, > if you prefer > > Alberto > > Leif Goodwin ha scritto: >> Alberto. Apologies for missing your comment. (Easily done since they were >> embedded in long quo

Re: validating xml with xsd schema

2009-05-13 Thread Leif Goodwin
ke setDoSchema(true) > Finally, change the setExternalSchemaLocation to be > setExternalNoNamespaceSchemaLocation (or, if schema.xsd is using a > targetNamespace, change the argument of setExternalSchemaLocation to be > "uri schema.xsd") " > > Alberto > >

How to validate an XML file against a schema

2009-05-12 Thread Leif Goodwin
Does anyone have an example of how to validate an XML document against an XML schema in a file? I have found lots of examples online, but none of them validate as claimed, at least as far as I can see. In all cases they check the XML is well formed. We are going nuts trying to figure this out due

Re: validating xml with xsd schema

2009-05-12 Thread Leif Goodwin
We've tried the above code and it does not validate the XML file. All it does is check that it is well formed. Here is the hacked code: /* initialize xerces system before usig API: DOM, SAX, SAX2 */ try { xercesc::XMLPlatformUtils::Initialize(); } catch (const XMLExce