xsd

Mono validation of NHibernate's cfg.xml file

I'm trying to set up NHibernate in Mono, to store objects in SQLite. I've copied/pasted the example configuration file. I only have the following two lines of code: var config = new Configuration(); config.Configure(); Which result in the following ungrammatical validation exception: System.InvalidOperationException : Unexpecte...

Can I express "may / may not contain" rules spanning multiple levels in XML Schema?

I have a hierarchy of objects that are transmitted via XML. The hierarchy rules are easy to express in XML Schema by stating which element may contain which child elements. A simplifed example of the XML data would be (the actual object data is contained in attributes and omitted for brevity): <root> <channel> <router> <mess...

why the XML validator gives failed to read error about the existing xds include file

I have the following errors reported in my (scorm 2004) xml file, what is causing this error since the referenced include file imsss_v1p0util.xsd is present in the same folder. row 8 has this tag: < xs:include schemaLocation = "imsss_v1p0util.xsd"/ > parser output: Validating the XML for Wellformedness The XML is Well-formed Valid...

Sub-elements and namespaces in XSD

I've been trying to figure out how to use an XML Schema to validate XML files as I load them into an application. I've got that part working, but I can't seem to get the schema to recognise anything other than the root element as valid. For instance, I have the following XML file: <fun xmlns="http://ttdi.us/I/am/having/fun" xmlns...

How can one easily set up sproc parameters in a strongly-named DataSet in Visual Studio 2005?

I don't usually work with this type of data layer so I'm not familiar with all the terminology and it's difficult to search for answers. I have an XSD file in Visual Studio 2005, and I'm looking at the GUI editor. I created a table adapter by dragging a stored procedure onto the form. That stored procedure is basically a SELECT stateme...

what means "The matching wildcard is strict"

Validating the XML against the Controlling Documents ERROR: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'adlcp:datafromlms'. line: 21, col: 24 here is error line in my xml file: < adlcp:datafromlms>course=e7.txt;lesson=1< /adlcp:datafromlms> this is from XSD: ...

ct-props-correct error when parsing schema

Hi, I'm using the JAXB xjc tool to generate some Java interface files from xsds. I'm running into a problem where I'm getting a tonne of errors of the form: org.xml.sax.SAXParseException: ct-props-correct.4: Error for type 'COCT_MT110200CA.PayeeRole'. Duplicate attribute uses with the same name and target namespace are specified. N...

Spring custom namespaces with Maven

Hi, I wrote my own custom namespace for a Spring based project I'm working on. The project is built with maven, and I'd like to put my xsd files in the resources directory. The problem is the spring.schemas directory requires me to define where I put my xsd file. In my dev environment it will be resources/schemas/myschema.xsd. But, when...

XSD date format overriding

I am defining an XSD. I need to define an element which takes date in format yyyymmdd. How can I define a restriction in XSD to only accept this format? ...

Complex rules in XSD for elements sequence

In my XML I have 6 elements X1, X2, X3, X4, X5 and X6. The rules are as follows - X1 must be followed by X2 X2 must be followed by X3 X3 must be followed by X4 X4 must be followed by X2, X3, X4 or X5 X5 must be followed by X6 X6 can be followed by X2, X3, X4, X5 or X6 I am trying to define an XSD for this. Is it possible? I tried...

validate xml schema using msxml parser

I want to validate an XML file against an XML Schema file. It is a simple xml file. does not include namespace etc. I want to do this in c++, using MSXML 6.0. Can anyone provide me the guidance to do this Thanks ...

Reference to parent node in XSD?

Hi In current w3c version of XSD, is there a way to refer to parent node or child node, when defining rules for a particular node? To make it more clear, can i add a rule in child node that compares the parent node value and vice versa? Thanks & Regards, Pavan. ...

Is there any way to make Excel preserve XML attributes in root element?

I've been experimenting with using MS Excel 2007 to edit tabular data stored in an XML file. It does a nice job of importing and even validating the XML data against the schema (xsd file), but when I export, it drops the xmlns, xlmns:xsi, and xsi:schemaLocation attributes from the root element. It also changes the default namespace to an...

Convert XSD files to C# Serializable Class

I tried following the answer to this question, but could not get xsd.exe to happily take the XSD files and turn them into a class. Using the XSD files here: http://download.adamhaile.com/SO/XSD.zip Can anyone help me convert these to a valid C# class that can then be used to serialize an XML document to? Note: Yes, these are from an un...

How can I include a .xsd file in my nant build file?

I have a C# project in Visual Studio and I am trying to get it hooked up with Nant, CC.NET and some tests. Nant isn't compiling my project because it says it can't find one of my classes, called LocationData. The only thing I have for this class is a schema (LocationData.xsd and LocationData.xss). I have tried adding them under source...

XML Schema: Setting a default value for a complexType?

Let's say I want to set up a generic complexType like so: <xs:complexType name="button"> <xs:sequence> <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="href" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="label" type="xs:string" minOccurs="0" maxOccurs="...

Why does XSD validation always work for this file?

The following xml file always seems to validate. Not sure why, but when I remove the following ' xmlns="urn:schemas-microsoft-com:office:spreadsheet" ', it seems to throw a validation error as expected. Somehow MS is preventing validation with the added XSD office schema. So anytime that XSD Schema is included you can't validate XML usi...

Where to put a local xsd file in Jboss 4.05

Hi, I am working on Jboss 4.05 , I have an xsd file that was on jboss.com and want to have it locally on my system, I can not find the right location to put this file, when starting the jboss I get this error: Offending resource: class path resource [spring/my-context.xml]; nested exception is org.springframework.beans.factory.xml.XmlBe...

XSD generator from several XMLs

I know it is possible to generate skeleton XSD from XML. For example this post has good answers. The question is how to generate XSD based on several XMLs. The idea is that each XML might have several different occurences of optional, arrays, choice and the like. From all those examples, I would like to compose the most accurate XSD. I...

How to programmaticly generate .NET classes from XSD? (Like xsd.exe do)

I'd like to generate the classes the xsd.exe way and not the linqtoxsd way. Thanks, --Ran. ...