xsd

Alternative to xsd.exe in Visual Studio 2010

Looks like XSD.exe is not delivered as a part of Visual Studio 2010. what is the alternative being offered in VS2010? ...

Problem validating an XML file using Java with an XSD having an include

Hello! I'm using Java 5 javax.xml.validation.Validator to validate XML file. I've done it for one schema that uses only imports and everything works fine. Now I'm trying to validate with another schema that uses import and one include. The problem I have is that element in the main schema are ignored, the validation says it cannot find ...

XSD regular expression pattern in .Net causes application to hang

Processing time doubles as "Y" goes to the right. Can anybody tell me why? How to solve this problem? I have many big ID's stored in a database those can't be changed so I can't limit the size too much. using System; using System.IO; using System.Text; using System.Xml; using System.Xml.Schema; namespace TestRegex { class Program { ...

How to export data from Excel to a valid XML ?

Hi i have an excel table with some data that i would like to export in XML. This exported XML need to be valid, so after formatting it, it has to be validated against an XSD. What's the best way to do it? Obviously all the formatting and validation need to be done with Excel that is the only tool available. This excel file will be us...

XSD doesn't allow to build

I'm working on an ASP.NET project with another developer. He has added an XSD file to the solution file (.sln). He can build the application on his machine successful, while I cant build on my machine, considering that we share the exact same code. I get the following error: Error 1 Failed to generate code. Exception of type '...

XSD force to use a particular order for the elemnt with attribute.

Hi, I've an XML file like the one below <transaction name="TEST_EX" type="singletonComplex"> <vo class="svc.vo.UserProfile"> <field deepMapping="true"> <vo class="svc.vo.UserVO"> <field name="UserName" column="User_Name" type="String"/> <field name="Age" column="User_Age" type="Integer"/> </vo> </field> <fi...

XSD, restrictions and code generation

Hello, I'm working on some code generation for an existing project and I want to start from a xsd. So I can use tools as Xsd2Code / xsd.exe to generate the code and also the use the xsd to validate the xml. That part works without any problems. I also want to translate some of the restrictions to DataAnnotations (enrich Xsd2Code). For ...

XSD doesn't allow me to have unbounded inside all indicator

I'm trying to make unordered list of variables in var1 occurs twice and var2 occurs infinite times (Use case in my project is different). The element does not allow me to use maxOccurs. Is there any work around for what I'm trying to do? <?xml version="1.0" encoding="ISO-8859-1"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema...

Can one mix "referecened" and "inline" complex types in XSD?

I was wondering if mixing "referecened" and "inline" types is allowed in XSD, e.g.: <schema> <element name="library" type="departments"> <complexType> <sequence> <element name="department_name" type="string"/> </sequence> </complexType> </element> <complexType name="departements"> <sequence> <...

Can generateDS be used like xsd.exe

Can I use generateDS.py in python in a similar way that I would use xsd.exe to create C# classes from xsd? Basically, given an xsd schema I want to create a data structure, in python, fill its data in, and then render it into an xml string. perhaps pyXSD is better? oh, and yes, I'm a python newbie ...

Loading XHTML schemas to XmlSchemaSet

Hello, I'm trying to load the XHTML schemas from the W3C site (xhtml - transitional, strict & frameset) which I'm having to put into to an XmlSchemaSet. This is then used by a third party product in our application to show intelisense and validation. However when I try and "Compile" this XmlSchema set I get the following message: Th...

XSD "one or both" choice construct leads to ambiguous content model

I am trying to make a simple XSD choice construct allowing either one or both of two referenced elements, but not none. The construct is similar to below but I keep getting an ambiguity error. What am I missing? <xs:schema xmlns:xs="..."> <xs:element name="Number" type="xs:integer"/> <xs:element name="Text" type="xs:string"/> <xs:...

XSD - Restricting attribute values to another element attribute value

I have the following XML: <Content name="contentName1"> <!-- Some sub elements here --> </Content> <Sequence Name="sequenceName1"> <Content name="contentName1" /> <!-- Some sub elements here --> </Sequence> with the following XSD <xs:element maxOccurs="unbounded" name="Content"> <xs:complexType> <xs:attribute...

Nodes order in xml created from dataset

I'am filling tables in .net DataSet with data. There is a nested relation between the tables, so the exported XML (by using GetXml() method) is nested (the child rows are becoming child nodes). I 'am sending this XML to a conversion module that converts the XML from the DataSet schema (I' am using the dataset XSD file) to other schema b...

Conference Information XML Schema

I'm starting up a project where we'll be coordinating schedule, speaker, location, and event information for conferences. It seems like a fairly well-defined space, and so I just assumed that there was a schema or standard out there we could reuse. I can't seem to find one, though. The benefits would be obvious - to get my app worki...

XSD to create an element with Namespace as prefix

I want to create an XSD which can generate the following XML. <note> <email:to>[email protected]</email:to> <from>[email protected]</from> </note> How to write XSD element definition for the element. <xsd:element name="note"> <xsd:complexType> <xsd:sequence> <xsd:element name="email:to" type="xsd:string"/> <xsd:element name="from" type="xsd:str...

How do I ensure unique element values in an XML schema?

I want to ensure that there are no duplicate book titles in the following xml: <?xml version="1.0" encoding="UTF-8"?> <books xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="books3.xsd"> <book> <title>Book1</title> </book> <book> <title>Book2</title> </book> <book>...

Any hints on the xsd bloat created by a WCF web service reference in a Silverlight 3 project?

I've a Silverlight 3 based project, talking with a DB via a WCF web service. So far, so good. I'm growing more and more concerned about the sheer number of xsd and wsdl files generated in the servicereference subfolder. The increasing numbers seems to be a kind of versioning, but I'm not sure... Do you know what is it for? It seems no...

dtd vs xsd, which one to choose?

i want to use one of these to describe my xml document. i've read that xsd is better than the older dtd since it supports namespaces and data types. does this mean that i should only use xsd for all future needs and totally ignore dtd and don´t even have to bother learning its structure? ...

xsd.exe - schema to class - for use with WCF

I have created a schema as an agreed upon interface between our company and an external company. I am now creating a WCF C# web service to handle the interface. I ran the XSD utility and it created a C# class. The schema was built in BizTalk, and references other schemas, so all-in-all there are over 15 classes being generated. I p...