xsd

How can I mix unbounded groups with restricted groups in a complexType?

I'm trying to create a tool that can generate XSDs for the XAML produced by serializing a type in .NET, but this is not specifically .NET related. Let's say I have a type. This type has properties and is a collection. public class MyType : Collection<CollectedType> { public PType1 PropertyOne {get;set;} public PType2 PropertyTwo...

Dynamic xsd and Biztalk 2006

Hi all, I'm sort of a biztalk newbie and we run 2006 here with plans to migrate to 2006 R2 in the future. I have a schema that I need to work with called Siri, which is public at: link text or link text for the root xsd document. I have successfully imported this schema into my biztalk project, however, I am finding it difficult to ge...

How can I convert a XML file into a XSD file, using java code ?

Hi, I am looking for an API what I can convert XML files into XSD files. In my project I am using that API's JDOM and Xerces. And I can edit my attributes and namespace, but I can't transform a xml in xsd. I have no idea to how I can start. Any suggestion? ...

XSD How To

Background: We have an application that has been in the works for over a year by a third party company and looks like we will be maintaining this in house from now on. For the most part i am very competent i can handle 99% of any issues that come up. In this project there is an XSD file acts as a pass through to a bunch of stored proc...

Analyzing XML schemas using org.eclipse.xsd and Maven2

I'm trying to implement the sample code to this article from 2002 (I know..), but cannot get the schema to load. import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; import org.eclipse.xsd.uti...

Best way to create a DB-tablestructure

DUPLICATE: http://stackoverflow.com/questions/467176/generating-sql-server-db-from-xsd And here http://stackoverflow.com/questions/263836/generating-sql-schema-from-xml I have loads and loads of xml files with data, and a schema-file (.xsd) which describes the structure of the xml. I want to store the data in a MSSQL-database so th...

xsd schema validation

Hi all, I am having an issue with xsd schema. I have a following schema defined: <xs:element name="nodes" type="nodesRootType" /> <xs:complexType name="nodesRootType"> <xs:sequence minOccurs="1" maxOccurs="unbounded"> <xs:element name="node" type="nodeType" /> </xs:sequence> </xs:complexType> <xs:complexType name="nodeTy...

Should XSD occurrence bounds be on the sequence or the element?

If I have an element with one or more subelements, should the min/maxoccurs attributes be on the xsd:sequence element, the xsd:element, both, or neither? <xsd:element name="books"> <xsd:complexType> <xsd:sequence minOccurs="1" maxOccurs="unbounded"> <!-- here? --> <xsd:element ref="book" minOccurs="1" maxOccurs="unbounded"/>...

Generate Ruby Classes from XSD

Is there a way to generate Ruby classes (maybe even ActiveResource classes) from an XSD so that they contain a way to serialize the classes to xml valid for the initial XSD? I know that soap4r has xsd2ruby but it appears that the generated ruby classes cannot be easily serialized to xml. ...

converting RELAX NG to XSD with trang while keeping external namespace elements (for use with JAXB)

I am using trang to convert a RELAX NG .rng file to an XML Schema .xsd file for use with JAXB. Is there a way to put attributes/elements in the .rng file and have them show up in the .xsd file? I have an external .xjb file that I use for JAXB settings, but there are some JAXB settings that are very closely coupled to the schema itself a...

C# What is the easiest way to create an XSD for a xml-serializable class

First of all, i am new to this topic, and after gathering a lot of background information i grew even more confused. I've got a few classes, all of them are serializable, some implement IXmlSerializable. The classes are tagged with [XmlRoot], [XmlAttribute] and so on in the appropriate places. What i am wondering about is how to create...

Xsd2code not working in VS 2008

Hi, I am trying to use Xsd2Code but the addin does not show up when I right click an xsd file in the solution explorer. The installation goes smoothly without any glitch but still I am not able to see or use the addin VS 2008. My OS is Vista x64. Any help will be much appreciated. ...

The EnforceConstraints property doesn't seem to work?

My boss has asked me to disable constraints for the dataset layer of our application. Seemed easy enough to me, since the .XSDs had the EnforceConstraints boolean. However, after turning that off I'm still getting the "Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."...

adding attributes to an xml document

I have an XML schema and an instance document I get from a customer. For example the document can be: <doc>    <carId>12</carId> </doc> And it is valid according to the schema. I would like to annotate this with my attributes: <doc>    <carId myns:valid="true">12</carId> </doc> I would like the annotated document to be va...

C# web-service client: multiple web-service methods with same (complex) return type?

Hi there, I am chipping away at building a client for a Java B2B web-service at the moment and I think I have identified the cause of a problem we have been having for quite some time. Unfortunately I'm unable to post the WSDL. Apparently my auto-generated proxy code (via wsdl.exe: have to use WSE 3.0 due to WCF not supporting password...

Webservice problem with base64 data when upgrading to JBoss 4.2.3

Hi, This is a long one du to config files... I'm running a upgrade from JBoss 4.0.5 to 4.2.3 The system I work with have a legacy webservice. It is based on J2EE webservices 1.1. It has a SLSB (EJB2) as endpoint. The WSDL file points out a schema (XSD-file) file for the definition of the parameters to the webservice. And there is a mappi...

JAXB: Anonymous simple types as enums?

When generating Java from an XSD via the XJC compiler, I always get the type java.langString for elements with anonymous simpleTypes like this: <xsd:element name="Product"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Product1"/> <xsd:enumeration value="Product2"/> <xsd:enumeration value="...

Extract a subset of XML file using XSL

I have this XML file: <Response> <errorCode>error Code</errorCode> <errorMessage>msg</errorMessage> <ResponseParameters> <className> <attribute1>a</attribute1> <attribute2>b</attribute2> </className> </ResponseParameters> </Response> And I want the output to be: <className> <attribute1>a</att...

Extract an object schema from wsdl

I have an wsdl file that describes a group of objects, but I want to extract the definition just from a subset of them, is this possible, and if so what's the best way to achieve this? My goal is to generate an XSD schema for that subset. What if you are not using the WSDL generation tools in .NET? Is there a good way to accomplish thi...

What is the practice for nesting xml namespaces?

In programming languages, I'm used to namespace foo { namespace bar { void DoIt() { } } } int main() { foo::bar::DoIt() } In a schema(xsd), I'd like to do similar things when defining complexTypes <xsd:schema targetNamespace="http://www.stackoverflow.com/foo"&gt; <xsd:complexType name="bar1">...