xsd-validation

How to use xsd schema with path withing my web-application

I am using JDOM parser that read my XML and it include validation using xsd schema. generally, in order to set the path of the xsd to the parser the syntax, according to the documentation is- SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser", true); builder.setFeature("http://apache.org/xml/featu...

XSD schema that allow random order

I'm try to design a XSD schema that allow elements to be in a random order and have maxOccurs="unbounded". My XML: <root> <key></key> <group></group> <group> <key></key> <key></key> <group> <key></key> <key></key> </group> </group> <key></key> <key></key> <group> <key></key> ...

Error when validating a XML with XSD

I'm trying to validate a XML file with XSD, but I get a "Could not find schema information for the element 'xxx'" for each element and attribute. My C# code is: public ReadeXmlFile(string FilePath) { var settings = new XmlReaderSettings { IgnoreComments = true, ValidationType = ValidationType.Schema, Check...

validating csv file with xsd schema

Hi, i have to validata a csv file using xsd schemas that is provided with the file to validate. I was thinking to validate the file with datatable but the problem is that datatable doesn't accept some restrictions like minLegth and facets that i need to control some values. Is saw xmlSchemaSet but it validates xml files and i don't kno...

XML schema and problem when deriving from mixed type...

Hi, I have following XML schema: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; <xs:element name="content" type="contentType"/> <xs:complexType name="contentType"> <xs:complexContent> <xs:extension base="versionedElementType"> ...

how to avoid sequence using XSD

i want a particular sequence to be generated in a random manner <item> <i1>abc</i1> <i2>pqr</i2> </item> now how can i make an xsd where <i1> can come before <i2> ? ...

xs:choice embedded in xs:sequence prevents the use of a union

I have the following xsd <xsd:complexType name="myID"> <xsd:choice> <xsd:element name="testID" type="priv:testID"/> <xsd:sequence> <xsd:element name="newID" type="priv:newID"/> <xsd:element name="testID" type="priv:testID" minOccurs="0"/> </xsd:sequence> </xsd:choice> </xsd:comple...

XML Schema reference

I have two XML Schemas. First (A.xsd) is located in a library jar file (mylib.jar) and the second one (B.xsd) is in my project. I want to import A.xsd into the B.xsd and validate incoming XML via Jaxb2Marshaller embedded validator. However I'm unable to make it work properly: it seems that inner XML validator of Jaxb2Marshaller does no...

XML Schema to validate XML Schemas?

Does anyone know if its possible to validate an XML schema with another XML schema? If so, is there a reference implementation out there? I would like to parse a Schema doc using JAXB. ...

Generate a data entry form dynamically from XSD including validation rules

Is there anything around that can read an XSD schema and dynamically create a (Windows C#) data entry form? It would also need to read the type definitions and use them to validate the data entered. The data would then be save as an XML file. I would prefer it was a dynamic form since the XSD could, and probably will change. I'd rather ...

Validating different sets of required attributes in an XML schema.

My requirement is to validate an xml with two different validation strategies. In strategy 1, the xml is required to have instances of an element with certain required attributes. In strategy 2, the xml is required to have instances of the same element with different required attributes. So, the idea is that there are two different sets ...