xsd

Is there an elegant way to specify an XSD schemaLocation attribute in Visual Studio when the referenced schema file is in a different project/assembly?

EDIT See my solution below /EDIT I have a Visual Studio solution with two projects. Project 1 (call it ReferencedProject) contains an XML schema file (ReferencedSchema.xsd). Project 2 (call it MainProject) contains ReferencedProject as a reference. MainProject also has a schema file (MainSchema.xsd). MainSchema.xsd contains the foll...

Convert XSD to Python Class

Hy everybody, I just want to know if there is a programm that convert an XSD file to Python Class as JAXB does for Java ? Thant you. ...

Why does XSD.EXE Create Two .XSD Files, and How to Use Them?

Hello everyone, I am using the following command to generate related xsd file from my input XML file -- response.xml, my confusion is (1) why there are two xsd file output (response.xsd and response_app1.xsd), I think there should be only one of them generated? (2) If I need to generate C# class file by using xsd /classes, which xsd fil...

DTD -> XSD conversion: mixed list of two elements, one constrained

Hi, I'm trying to represent the following DTD fragment in XSD:- (A | B)* | (A | C)* | (A | D)* | ... i.e. a mixed list of any number of As and any number of one of B, C, D, ... CastorConverter spits out:- <choice> <choice minOccurs="0" maxOccurs="unbounded"> <element ref="t...

Should example xml in an xsd documentation annotation be escaped?

Lets say I have an xsd schema and I have several <annotation/> elements with <documentation/> elements in them. If I wanted to place example xml in the <documentation/> elements, should I escape the example xml? e.g.: <annotation> <documentation>Example Xml: &lt;element&gt;some text&lt;/element&gt;</documentation> </annotation> o...

NullPointerException in SchemaParsingConfig.setFeature() running Axis2 WSDL2Java

In the process of my daily work, I am trying to use the WSDL and XSD from this article: http://www.ibm.com/developerworks/webservices/library/ws-restwsdl/ as a template from which to generate some java code. My desire is to use the generated java code to in some way validate that my (to be) hand-rolled WSDL and schema are reasonably s...

Validate an XML File Against Multiple Schema Definitions

I'm trying to validate an XML file against a number of different schemas (apologies for the contrived example): a.xsd b.xsd c.xsd c.xsd in particular imports b.xsd and b.xsd imports a.xsd, using: <xs:include schemaLocation="b.xsd"/> I'm trying to do this via Xerces in the following manner: XMLSchemaFactory xmlSchemaFactory = new...

xsd wellformedness

http://www.validome.org/xml/validate/?lang=en&amp;viewSourceCode=1&amp;url=http://45143.com/finance-feed/abc.xml&amp;onlyWellFormed=1 check the url above for validator results. Line 171 in the XSD is getting truncated... feels like a stream error to me but this cant be happening as both are just rendering text files--no on the fly pars...

Anybody also epriences problems with JAXB validation, when XSD contains regular expression character class \w?

Hi, We are using JAXB 1.0.6 (the project has started with JDK1.4 and this is the last compatible version) to create XML-Files from a XSD specification. The XSD defines an attribute "email" with the following regexp pattern. <xs:simpleType name="EmailAddress"> <xs:restriction base="xs:string"> <xs:minLength value="0"/> <xs:maxLengt...

Can Keys and Keyrefs be spread across multiple XSD files?

I'm trying to mimic a relational database structure using XML. (Just in case anyone is wondering why, my reasons for using XML are: (1) The total amount of data is expected to be small, (2) I need non-programmers to be able to edit some of the input tables, and (3) I want the installation process to be as simple as possible (i.e., no da...

Survey: how are you using ID/IDREF? (or key/keyref)

I'm interested in how people use this feature: what domain, what relationships (apologies if survey questions aren't appropriate). XML represents trees naturally using containment; but it can also represent graphs, using IDREFs that refer to IDs: many elements can refer to the same element (multi-ref); and a nested element can refer to ...

block invalid elements XSD?

Hi, I have a simple XSD: <xs:element name="config"> <xs:complexType> <xs:sequence minOccurs="1" maxOccurs="unbounded"> <xs:element name="group" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> On my xml file i put this: <config> <group></group> <a></a> </config> How block the i...

How do I make an extension xsd for the web/app.config schema?

How do I make a schema for custom config sections? I tried making one, but when I used it, it said the only expected element was what I had in that schema, and complained about the standard web.config stuff, even though I was still using the normal DotNetConfig.xsd file too. ...

Can XML Schema specify co-occurance constraints?

Can an XML Schema document specify that two items must co-occur? For example, that there are two optional elements, and they are either both present or both absent. a b? c d? e # giving only {ace, abcde} # instead of all combinations: {ace, acde, abce, abcde} <element name="root"> <complexType> <sequence> ...

MVVM with XML Model and LinqToXml?

Hi, I've been reading up on the MVVM pattern, and I would like to try it out on a relatively small WPF project. The application will be single-user. Both input and output data will be stored in a "relational" XML file. A schema (XSD file) with Keys and KeyRefs is used to validate the file. I have also started to get my feet wet with Lin...

Multiple XSD schema files to C# classes

What is the best way to generate C# classes from multiple XSD schema files? Some XSD schema files may have dependency to the other, I am trying to avoid duplicated C# classes being generated. Thanks ...

XSD : model properties (name/value pairs)

I have a XML defining properties like : <properties> <property name="play_sound" value="true" /> <property name="duration" value="30" /> </properties> Is it possible, with an XML schema, specify conditions such as "if the property name is 'duration' then the value must be an integer". I think it is not possible so, what is th...

Error occurs when I open xsd schema in Visual Studio 2008

When I try to open XSD schema in my Visual Studio 2008 raises error like this: "An unexpected error occurred in the .NET Framework Data Provider for Microsoft SQL Server Compact 3.5" I don't use Microsoft SQL Server Compact 3.5 and connection strings for SQL Server 2005 are stored in XSD table adapters. Any ideas ? ...

Is there a free tool to generate a XSLT template based on one XSD file?

The tool I am looking for should be able to generate a XSLT template based upon one XSD file (target = source). Without changes to the template the execution of the XSLT would result in a XML file that is exactly the same as the source. My goal is to use the template and do minor changes to the sequence of tags in the result XML-file. Th...

Can i provide my own ArrayOfstring to svcutil?

I'm designing a system based on .NET platform, which will interact with Java EE application. I have an .xsd file, which i got from Java guys and now we are trying to change it in a way that will be suitable for my .NET system to consume. I want to get a .NET-client in "unwrapped" style in the end, and everything goes fine except one poi...