Validating XML with XSDs … but still allow extensibility

Your issue has a resolution, but it will not be pretty. Here’s why: Violation of non-deterministic content models You’ve touched on the very soul of W3C XML Schema’s. What you are asking — variable order and variable unknown elements — violates the hardest, yet most basic principle of XSD’s, the rule of Non-Ambiguity, or, more … Read more

Bogus Eclipse warning for web.xml: “No grammar constraints (DTD or XML schema) detected for the document.”

I hate that warning too. Specially because it appears in XML files that you haven’t written but appear in your project for whatever reason (if you use MAVEN it’s hell). With Eclipse 3.5+ you can easily remove this validation rule. Go to Preferences–>XML–>XML FILES –> Validation and Select “ignore”. You may also have to do … Read more

XML Schema Validation : Cannot find the declaration of element

Thanks to everyone above, but this is now fixed. For the benefit of others the most significant error was in aligning the three namespaces as suggested by Ian. For completeness, here is the corrected XML and XSD Here is the XML, with the typos corrected (sorry for any confusion caused by tardiness) <?xml version=”1.0″ encoding=”UTF-8″?> … Read more

xsd.exe output filename

This link suggests another alternative … using a path character in specifying the input schemas resets the generated file name. So if you use the following you will be able to control your output file name. xsd.exe schema1.xsd schema2.xsd .\schema3.xsd Will force xsd.exe to generate the schema3.cs file. Note: It’s a hack but up to … Read more

nillable and minOccurs XSD element attributes

You need to decide whether you are thinking about XML as XML, or whether you are thinking about XML as a way to transmit Java (or other) object from here to there. In XML, nillable permits the construction <myelement xsi:nil=”true”/> as an indicator of an explicit absent value, like an SQL NULL. This is semantically … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)