xsd

using XSD.exe to generate an XSD

I am building SSAS cubes using AMO in c#. For this, I want to get a list of the public properties for the classes for Server, Cube, Dimension, etc. This will be my superset from which the user must provide mandatory properties and may provide the optional ones. I am trying to generate an XSD schema. I ran the following command XSD C:\w...

Generate WCF DataContract from XSD

I want to be able to Generate WCF C# DataContract from XSD file, preferably using the xsd.exe tool. What is the easiest way for it to auto generate the [DataContract] and [DataMember] on each of my items? Or is there a better approach? I am trying to avoid having to recreate the Data Contract each time the XSD file is changed and regen...

.NET xsd importer creates unserializable class

I am using the .NET XSD.EXE importer to generate C# classes from a collection of XSD files. When I tried to serialize one of the classes to XML it failed (InvalidOperationException), and when I dug into it I discovered it one of the created classes appears to be wrong. Here is the pertinent XSD code: <xsd:complexType name="SuccessTyp...

Providing intellisense for QWhale Editor utilizing an XSD file.

Has anyone provided intellisense to the QWhale Editor with an XSD file for an XML document? The question could be generalized to what are the techniques for parsing an XSD schema to provide intellisense for an XML document. ...

C# XMLReader - Multiple child collections failing Validation with XSD schema

I have a supplied XSD. I do not know enough about XSD to begin modifying it. <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; <xs:element name="Dataset"> <xs:compl...

How to Validate in XSD the xml node value against it's neighbor xml node value

Suppose in XSD we have an element 'answer' defined: <xs:element name="answer" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:attribute name="name" use="required"> <xs:simpleType> <xs:restriction base="answer"/> </...

How do you specify an XSD that allows a range of elements in any order?

I have some XSD that looks something like this: <element name="a"> <complexType> <sequence> <element name="b" type="t:typ" minOccurs="1" maxOccurs="unbounded" /> <element name="c" type="t:typ" minOccurs="1" maxOccurs="unbounded" /> </sequence> </complexType> </element> How would I change it so that instead of a...

Is there a way to include the xsd:documentation in the C# class generated with XSD.exe?

I am using xsd.exe to generate a C# class from a collection of xsd files. The xsd file makes use of the <xsd:documentation> tag to include useful descriptions. Example: <xsd:complexType name="AddressType"> <xsd:annotation> <xsd:documentation>A formatted or free form address and its intended use.</xsd:documentation> </x...

Why does XSD say my element is not complete?

I have an XSD of this form: <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/example" xmlns:tns="http://www.example.org/example" elementFormDefault="qualified"> <complexType name="bType"> </complexType> <complexType name="aType"> ...

Scala XSD library

What are the options for querying XSD files in Scala. The standard XML library is of course one option, but has anyone made a library for working with xsds specifically? ...

How to set a property of an object as required on one operation and not required on other operation on WSDL?

For example I have these complexTypes: <!-- will be use as a request parameter --> <complextType name="enrollStudentRequest"> <sequence> <element name="student" type="Student" /> </sequence> </complexType> <!-- will be use as an operation response --> <complextType name="retrieveStudentsResponse"> <sequence> <element name="...

.xsd comments in xsd.exe generated wrapper class.

I have an xsd file in my csproj, from which xsd.exe generates a wrapper cs file. I'd like to comment the xsd file in a way, that the comments are also inserted into the generated wrapper class, so VS intellisense can be used effectively. Is this possible using xsd.exe? ...

How to specify a MessageBodyMember is required?

I'm looking for a way to specify that some MessageBodyMember is required, so that the generated schema would have minOccurs=1 instead of minOccurs=0. I have to manually edit the schema to add it, and it's really a pain. I read a few articles that say this is not possible, but they are a bit old; perhaps now there's a way or a workaround...

Convert database table structure to XSD format

Hi, Is there any way i can convert a table struture in a MySQL or Oracle database to XSD (XML Schema Definition) format ?. Thank You. ...

Why is it possible to change an XML document's namespace by setting the xmnls attribute in Java 5 but not in Java 6?

We have an XSD which validates an XML document with a namespace declared, but we would like to use it on a document without one. In Java 5, it looks like it's possible to call setAttribute() on the xmlns attribute of the root element, but this fails in Java 6 with an exception: Exception in thread "main" org.xml.sax.SAXParseException:...

XML-schema/validation: different separator for datatype double

hey, I changed the datatype of some parameters within my xsd file from string to their real type, in this case double. now I'm facing the problem that around here the comma is used as a separator and not the point as defined by the w3 (http://www.w3.org/TR/xmlschema-2/#double) causing erros all over during deserialization (C#, VS2008). ...

Set a content-typ in eclipse infocenter for *.xsd files?

We have a java server running an eclipse infocenter. The setup is standard; pretty much according to the help. One of our plugin helps have links to a XSD file and we want to be able to display that. The problem is that the XSD schema is shown as text/plain instead of text/xml. How can we set the content type of the filetypes? Edit: T...

Help with XSD element having references to other elements but don't want things nested.

I have a XSD file I'm using to generate JAXB classes for a RESTful API I am working on. I have two classes. An Appointment and a Person. A Person has an Appointment. I'd like to end up with XML like this: <Appointment> <Person id="12345">Billy Bob</Person> ... </Appointment> So, that on the far end I an just fetch Person if...

How to set PHP Date format

I need to create a date in this xsd format: "2001-10-26T21:32:52" but when I use the date function in php it replaces "T" with the Timezone (which it is supposed to do). This is the command I'm using: $time = date("y-m-dTH:i:s", time()); Which produces: '10-02-13EST10:21:03' How do I get it replace "EST" with just "T"? Thanks. ...

Manually editing BizTalk wcf-adapter schema

I am new to generating schemas in the way I am doing it now (Manually) and sort of need some help here please. I have a schema, as below, that I am not sure is even correct. What I want is a Customer record that can contain more than one Address record. What I have below does not seem correct, or is it? I am referring in particular to wh...