xsd

Does anyone know where to get the XSD file describing the junitReport.xml file format expected by Hudson?

Dear ladies and sirs. I need the XSD of junitReport.xml recognized by Hudson. Does anyone know where can it be found? Thanks. ...

XSD, JaxWS, and Glassfish

I have a xsd with quite a few pattern restrictions in it and this xsd is used in our wsdl. When we deploy the ear to glassfish and bring up the wsdl and xsd in a browser all of our pattern restrictions are stripped out. Why? How can I eliminate the stripping of our restrictions. Here is a snippet: ...

Typed DataSets in WebApplication Projects.

I am converting an older C# Website Project into a Web Application Project so that we can better manage it in our source control system. I have run into a problem. The Website Project used strongly-typed-datasets (i.e. .XSD files). There is C# code written that uses these strongly typed datasets as an object. That worked fine when it wa...

XSD Schema Validation in Ruby

I have found several sources regarding how to validate an xml document against a schema, but I have an application in ruby in which I need to validate that a user supplied schema is a valid schema itself. Is there a way to that I can check this? Is there an XSD schema to validate an XSD schema? Or are there libraries or gems that do t...

What does the error "The element cannot contain white space. Content model is empty." mean?

I'm putting together an xml schema for a simple xml (see bellow for both xml and schema). But I keep getting the following error with regards to the section node: "The element cannot contain white space. Content model is empty." . Browsing the net I could not find any concise explanation as to what it means so I can fix it. Can anyone he...

How to declare a non-string element as having optional content in XML Schema

I have seen XML Schema element with attributes containing only text but I have an element that's an xs:dateTime instead. The document I'm trying to write a schema for looks like this: <web-campaigns> <web-campaign> <id>1231</id> <start-at nil="true"/> </web-campaign> <web-campaign> <id>1232</id> <start-at>2009-08-...

How do you specify the content of an element in XSD?

I have XML that looks like this: <Parameter Name="parameter name" Value="parameter value" /> which I defined in XSD like this: <xs:complexType name="Parameter"> <xs:attribute name="Name" type="xs:string" use="required" /> <xs:attribute name="Value" type="xs:string" use="required" /> </xs:complexType> but what I really want is...

Removing Optional Elements from XML when invalid

I have a piece of xml that contains optional non-enumerated elements, so schema validation does not catch invalid values. However, this xml is transformed into a different format after validation and is then handed off to a system that tries to store the information in a database. At this point, some of the values that were optional in...

XML Schema (XSD) - if one element has specific value then another element must be present and vice versa

Can I express this in an XSD? For example: One element is a required bool element named EmployedMoreThanThirteenWeeks and if the value is set to false I want the schema to require the existence of another element named EmploymentDate. And the other way around if the value is true then ideally the EmploymentDate element should be denied ...

XML element with "xsi:type" attribute does not validate. It expects a "type" attribute

I have XML that includes an element that has the attribute: xsi:type="AnswerBool". My xsd has that element and has set up an attribute with the name="type" and then restricts the enumeration values to "AnswerBool" (and others). However, when I try to validate the XML it fails. If I change the XML so that the element uses type rather than...

XmlSerialization and xsi:SchemaLocation (xsd.exe)

I used xsd.exe to generate a C# class for reading/writing GPX files. How do I get the resultant XML file to include the xsi:schemaLocation attribute eg. I want the following but xsi:schemaLocation is always missing <?xml version="1.0"?> <gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/20...

Trouble with XML Deserialization into XSD generated classes

I have a rather detailed xml file. Below is the top level nodes (I have included the ellipse as the lower level nodes are all well formed and properly filled with data): <?xml version="1.0" encoding="UTF-8"?> <config> <Models>...</Models> <Data>...</Data> </config> I have created an xsd file from using the Visual Studio 2008 ...

JAXB XJC code generation - ObjectFactory class is incomplete

Hello I generate Java classes from my XSD schema file using XJC command line tool. The ObjectFactory class generates incomplete content. It generates creation methods without JAXBElement<Type> createType decoration. What may be the reason of this? Regards Dominik ...

Having a problem utilizing xs:unique

Can anyone point me as to why the unique element in my XSD is not forcing unique-ness? This should throw an error because the last ScreenResult element does not contain a unique value for the Type attribute. I should also note that I'm truly after forcing one of each Type within ScreenResults (ScreenResult is required to exist 3 times,...

Using DateTime.TryParseExact to verify XML Schema dateTime compliance

I am trying to verify that a C# string is compliant with XML Schema dateTime format. Looking at the MSDN, it seems like "o", "s", or "u" standard format strings could all describe valid dateTimes, but I can't get DateTime.ParseExact to work for me. What am I doing wrong here? string myDate = "1999-05-31T13:20:00.000-04:00"; DateTime.Par...

Using attributes to specify element structure in XSD

I would like to specify the structure of underlying child elements based upon an xml attribute value. For example: <param type="uniform"> <high>10</high> <low>0</low> </param> <param2 type="normal"> <mean>5</mean> <stdev>2.5</mean> <param2> Is there a way to validate this type of structure using XSD? ...

XSD any element validation error with CDATA

I have an XSD with an any-element (<xs:any/>) When I create an instance of this XSD and place a CDATA section in it, I get validation errors. I also tried with attributes like: minOccurs="0" maxOccurs="unbounded" processContents="skip" I use XmlSpy for schema validation. ...

Verifying a C# string as a valid XML Schema anyURI

Is there a better way to verify that a C# string is a valid xs:anyURI than the following? public bool VerifyAnyURI(string anyUriValue) { bool result = false; try { SoapAnyUri anyUri = new SoapAnyUri(anyUriValue); result = true; } catch (Exception) { } return result; } This constructor d...

Is it possible to validate XML against an XSD in Silverlight 3?

Is seems like all the commonly-used classes for XMLValidation, for example XmlValidatingReader, are absent (or present "for interface compatibility only") in Silverlight. Is there any way to validate XML against an XSD schema in Silverlight? ...

How can I embed complex types into wsdl definition?

Hi, WCF generates complex types as external xsd files. How can I embed these definitions into wsdl? Because Delphi WSDL importer cannot import the complex types in the xsd files. Thank you. ...