xsd

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. ...

Java API to parse XSD schema file

Anybody knows Java API to parse XSD schema file? I found XSOM (https://xsom.dev.java.net) but I doesn't seem to maintained anymore. ...

XML Schema, One of each child element?

I want to define a schema that allows child elements to occur in any order, similar to <choice minOccurs="0" maxOccurs="unbounded"> but will allow only one of each element, similar to <sequence minOccurs="1" maxOccurs="1"> can this be done? for example <Root> <ele1> <ele3> <ele2> </Root> <!--Valid--> And as below: <Root> <el...

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 ...

SOAP Response Schema Validation

Short version: I'm trying to write an XSD that will validate my SOAP service's responses. I feel compelled to just import http:// schemas.xmlsoap.org/soap/envelope/ instead of redefining the SOAP elements like Envelope, Head, and Body, but that xmlsoap.org schema definition of Body is too broad for my use--as soon as I import the SOAP ...

How do I write a Lambda statement for this Linq to XML function?

I am working with this XSD file. The portion of the XML that is relevant to this question is here: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="https://wsmrc2vger.wsmr.army.mil/rcc/manuals/106-11" targetNamespace="https://wsmrc2vger.wsmr.army.mil/rcc/manuals/106-11" ...

get elements of xs:choice on XML Beans

I have a schema that looks like <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="a" type="a" /> <xs:element name="b" type="b" /> </xs:choice> XML Beans generates the two methods getAArray() and getBArray(), which return A and B elements separately, losing their ordering. I tried to let types a and b extend th...

PHP DOMDocument validate against referenced XSI schema

Hello! I have a problem validating a given XML file in PHP. This works with a given $myFile xsi schema: function validate($file){ $xsi = $myFile; if(@!$this->dom->schemaValidate($xsi)){ $warning = error_get_last(); throw new Exception ('XML validation of file "'.$this->file.'" failed: '.$warning['message']); ...

Using .NET XmlSerializer for xml with different polymorphic roots.

I have XML docs with different roots coming from one source. I have a XSD schema just like described in this question, with the abstract='true' root element 'BaseElem' of a Base type, plus additional root elements Elem1, Elem2, ... that extend the Base type and use substitutionGroup='BaseElement' attribute. xsd.exe generates BaseElem an...

Is there an XSD for XSD's, a Meta-XSD?

Does there exist an Xml schema that will validate other XML schemas? What I want to do is take such a meta-schema (if it exists) and run it through XSD.EXE so that I can use C# classes to read an arbitrary XML schema and analyze it. ...

Can I configure XJC bindings to generate collections as Set instead of List

Given a schema such as this: <xs:element name="Group" type="GroupType"/> <xs:complexType name="GroupType"> <xs:sequence> <xs:element type="OptionsType" name="Options" maxOccurs="1" minOccurs="1"/> <xs:element type="PageContainerType" name="PageContainer" maxOccurs="unbounded" minOccurs="0"/> </xs:sequence> </xs:...

Permanently disable schema in MS Web Developer 2010 Express

I have an .xsd schema in SVN and it's copy in %VsInstallDir%\xml\Schemas. Schema folders in Web Developer settings include only %VsInstallDir%\xml\Schemas. Option "automatically download schemas and DTDs" is disabled. Problem: When I edit copy of .xsd from SVN, Web Developer automatically starts to use it and immediately clutters error ...

xsd schema file must be annotated in SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class?

Here is an example to use SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class - [STAThread] static void Main(string[] args) { try { SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class objBL = new SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class(); objBL.ConnectionString = "Provider=sqloledb;server=server;database=databas...

Axis2 with XMLBeans data binding - Problem with a java client generated from a XSD schema with anyType.

I have generated a client using Axis2 framework with XMLBeans as the data binding method. The XSD schema is the following: <xsd:schema> <xsd:element name="profile" type="anyType"/> </xsd:schema> The java object generated which takes part of the SOAP request contains getter and setter methods that allow to get and set the profile...

Are circular groups allowed by XSD schema?

For this xml: <elem1 xmlns="http://www.fixprotocol.org/ns/fast/t/1.0"&gt; <elem2> <elem2/> </elem2> </elem1> I have this schema, which seems to validate fine against w3 schema validation service, and the schema validates the above XML just fine. Sadly, xsd.exe and some other tools report it to be an error. Is that correct? Are ci...

DataContract XSD issue

I am wanting to validate a DataContract (long story short) Here is my DataContract: [DataContract(Name = User.Root, Namespace = "http://mysoft.com/schemas/registeruser.xsd")] public class RegisterUser { [DataMember(Name = User.EmailAddress)] public string EmailAddress { get; set; } [DataMember(Name = User.UserName)]...

Howto: convert WSDL to XSD?

I'm using an ASP.NET web service with some large and complex structures. I can examine the WSDL and use it to generate code for my (Delphi) application. And it all works just fine. I also have a (homemade) message viewer which captures the SOAP messages and will display it's content. I use it to capture the data sent to and from the serv...

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 ...

Serialize Partial DataContract

I have a DataContract that looks like: [DataContract(Name = User.Root, Namespace = "")] public class RegisterUser { [DataMember(Name = User.EmailAddress)] public string EmailAddress { get; set; } [DataMember(Name = User.UserName)] public string UserName { get; set; } [DataMember(Name = User.Password)] pub...