xsd

How do I make a C# class with a dictionary-like member using XSD?

I'm using xsd.exe to make the C# classes for our settings. I have a setting that is per-server and per-database, so I want the class to behave like Dictionary<string, string[][]>. So I want to be able to say string serverName = "myServer"; int databaseId = 1; FieldSettings fieldSettings = getFieldSettings(); string[] fields = fieldSe...

XSD elements to a Form in ASP.NET

Is there a standard way to convert an XSD to an input form (ASP.NET C#) so that later on whenever a new field is added / removed from the XSD the field on the page automatically shows up or goes away respectively, is this something which needs to be developed in-house I assume there must be a way to serializes / deserializes and generate...

JAXB - XJC - influencing generated typesafe enum class and members

Hi there, When compiling the following simpleType with the XJC compile (from the JAXB package)... <xs:simpleType name="test"> <xs:annotation> <xs:appinfo> <jaxb:typesafeEnumClass/> </xs:appinfo> </xs:annotation> <xs:restriction base="xs:string"> <xs:enumeration value="4"> <xs:annota...

Do Spring.NET and Common.Logging XML schemas (XSD) exist?

Spring.NET 1.2.0 M1 comes with several XSD files for the <objects> node, database stuff, etc. However, it is an incomplete collection because it does not seem to include <spring> (used in App.config), <context>, or <parsers> elements. Additionally, Common.Logging doesn't appear to have any XSD's included in the source or distribution. ...

Code Synthesis doesn't seem to generate a "valid" xml tree

I've been working with code synthesis xsd to generate an xml tree to ensure constinency of the xml output to the original xsd. After initial testing, everything looked ok but when I tried entering invalid values (correct type, but outside the defined range), the values were allowed. Although the xml is well formed and conforms to the t...

How do I create a reusable "US State" type in an XML schema?

I have an XML schema that includes multiple addresses: <xs:element name="personal_address" maxOccurs="1"> <!-- address fields go here --> </xs:element> <xs:element name="business_address" maxOccurs="1"> <!-- address fields go here --> </xs:element> Within each address element, I include a "US State" enumeration: <xs:simpleType na...

How to convert xsd to human readable documentation?

We have a few XML based interfaces that is quite well documented in XSD schemas. The interfaces are now going to be publicly available and we would like to create reference documentation for them. Is there a tool that can automatically convert XSD files into some more readable format? ...

XSD change the available elements based on a previous Element Value

Is there a way to change the available elements based on a previous element value? I have some lookup 'Cause' codes but some of these only belong to certain 'Products'. I therefore want to create each products lookup cause code enumeration and let this only be available based on the product selection. Is this possible ? Many Thanks ...

right approach to handling bad xml data

I've got a little c# windows service that periodically pulls xml from a web service and stores the data in a database table. Unfortunately it's failing because the web service has occasional bad data in it - strings instead of decimals. I don't have any control over the web service (unvalidated user input from software we can't change)...

How to create XML/XSD equivalent of a DataSet or DataTable in VS2008 (or other tool)

So today I had to move some tables with data from an MS Access database into XML to be used in a web application. So I thought it would be an easy process to define the table structure as an XSD file in Visual Studio, then load in the data (for the sake of simplicity, lets say I would type it in). Well for the life of me I can't figure...

Defining Web Services - What is the requirement to make namespace definitions accessible?

Hello, I am sitting down to define my first web service and have what is probably a basic question about the accessibility requirements of namespace definitions? When a consumer of these web services identifies message elements as belonging to my namespace, must the URI reference for this namespace be available at the time the messag...

Generate classes from XSD

You are doing contract first development of web services in a SOA world. After editing an XSD file, what is the best way to automatically (re)generate .net classes from the XSD files? ...

Generating SQL Schema from XML

We are using an Oracle 11 database and a java development environment (using Eclipse) and would like to migrate several xml schemas to SQL schemas. Have looked ax xsd but really need something that we can run from ant/ Eclipse without SQL Server installed. Regards, Andy ...

JAXB - Remove 'standalone="yes"' from generated XML

Hi people, Do you know of a JAXB setting to prevent standalone="yes" from being generated in the resulting XML? <?xml version="1.0" encoding="UTF-8" standalone="yes"?> ...

XSD schema: Meta data driven generation with XSLT

I'm regularly creating an XSD schema by transforming a proprietary data model of a legacy system. This works out pretty good. However, the legacy system only allows me to specify very basic attributes of a parameter, such as the data type (int, string etc.). I would like to enhance the XSL transformation with a mechanism that allows me ...

Importing and using external schema using XML Beans

Hello, I have a bit of a problem. I wrote an API a long time ago for our production system, and it used Apache XML Beans. The schema was homogeneous (ie no imports, everything was from within the same schema), and everything worked just fine, even if the code for API handling was incredibly verbose. I've since written a far simpler a...

XSD - how can I ensure the existance of a particular element with a given attribute?

I'm trying to add extra validation to jdpl process-definition files using XSD. We have a couple of rules we want to add; but the one that's causing me problems is that there must exist one "node" element with it's "name" attribute = "Problem". so this is valid: <process-definition name='sample'> <node name="Problem"> </node> ...

Creating a dataset.designer.vb from xsd

I have an xsd, , vb, xsc, and xss file for a dataset in VS 2008 that I copied over from another VS project, however I need to make changes to the dataset. Thus I got into the xsd file, created new columns, deleted ones that aren't needed, etc., etc. However I realized when I attempted to use the new dataset I did not have the vb code b...

XSD Code Generator

Are there any Code Generators that would take a well-formed XML document, and write out an XSD schema based on how the XML document is structured? ...

XSDObjectGen.exe vs XSD.exe

Can anyone tell me what is the difference between XSDObjectGen.exe & XSD.exe? Is there any way to make XSDObjectGen.exe work in dot net 2.0? ...