xsd

How do I import XSD files into IntelliJ IDEA 9.0.1?

I am new to IntelliJ and to creating XSD files. In the "Create Project" wizard, there is no option to create an XML project. Do I create a Java project and then try to import the files? ...

How can I validate XML against an XSD with distinct imports and namespaces?

Hi there!! I am trying to validate a few XML files and I'm failing due to various issues with the XSD definition and the namespaces... This is public info, so no problem sharing data: the main XSD is at http://bioinformatics.ua.pt/euadr/euadr_types.xsd and it imports another XSD at the same location named common_types.xsd, I've validat...

How to transform a XML Schema Design (XSD) with XSLT 2.0

What is a good approach to handle different namespaces when transforming XSD files with import statements? Is there an example of XSLT (1.0 or 2.0) Stylesheet that transforms XSD files with include multiple imports and namespaces? ...

ignoring elements order in xml validation against xsd

Hi, Ia processing an email and saving some header inside a xml document. I also need to validate the document against a xml schema. As the subject suggest, I need to validate ignoring the elements order but, as far as I read this seems to be impossible. Am I correct? If I put the headers in a<xsd:sequence>, the order obviously matter....

XML Schema - how do you conditionally require address elements? (street, city, state, etc)

If an address can be composed of child elements: Street, City, State, PostalCode...how do you allow this XML: <Address> <Street>Somestreet</Street> <PostalCode>zip</PostalCode> </Address> and allow this: <Address> <City>San Jose</City> <Street>Somestreet</Street> <State>CA</St...

XML/XSD intellisense not working in Visual Studio 2010

I am working on xml and xsd files in VS 2010 but intellisense isn't working. Intellisense is working for the same files in VS 2008, however. When I type '<xs:' options like "attribute", "complexType", "simpleType", or "element" do not appear. Is there some difference between the VS 2008 and VS 2010 that I'm missing? I add an xsd file ...

JPA/JDO entity to XML XSD generator.

I am using JDO or JPA on GAE plugin in Eclipse. I am using smartgwt datasource, accepting an xsd. I would like to be educated how to generate an XSD from my jdo/jpa entity, vice versa. Is there a tool to do it? While datanucleas does all its magic enhancing in the Eclipse background, would I be able to somehow operate in a mode that w...

BizTalk Web Reference - generated XSD has "lost" information from WSDL.

I am using BizTalk 2006 R2 to generate a web reference from a WSDL file. Comparing the generated XSD to the WSDL, it is apparent that a lot of information has been lost. Consider the following extract from the WSDL: <s:element form="unqualified" minOccurs="0" maxOccurs="4" name="Applicant"> <s:complexType> <s:sequence> <s:...

Automatically generate XSD to C# in Visual Studio IDE

I am running Visual Studio 2010. I have a XSD schema and want to use xsd.exe tool to generate appropriate C# file. I have done this successfully from a command line but now I want to do the same from IDE. Is there some well-known route for this? I have managed to use a pre-build event but I hate to have the tool running on each build. N...

Java xsd validation of xml without namespace

Hi, I want to validate an xml file against an xsd schema. The xml files root element does not have any namespace or xsi details. It has no attributes so just . I have tried the following code from http://www.ibm.com/developerworks/xml/library/x-javaxmlvalidapi.html with no luck as I receive cvc-elt.1: Cannot find the declaration of el...

Where is the definition of Global_NS in a BizTalk schema?

I'm trying to use a distinguished property but I get an error "Cannot implicitly convert type ... to Global_NS ... " I've googled/bing'ed but I've found only 4 references, none of which help I can't see anywhere that this is set :-( I've been trying to remove the tempuri namespaces from a WCF service and all seemed OK, until I tried...

how could I generate xsd dynamically...

Hello I want to generate a xsd file dynamically, I don't want to use jaxb because it creates alot of files when I use schemagen and I want the schema in one file only. any idea? thx al ...

Validating and filling default values in XML based on XSD in Python

How do I fill the default value in my XML during validation against XSD? If my attribute is not defined as use="require" and have default="1", it could be possible to fill these default values from the XSD to the XML. Example: Original XML: <a> <b/> <b c="2"/> </a> XSD scheme: <xs:element name="a"> <xs:complexType> <xs:sequence...

How to compare attributes with each other

I have a Range element like <Range min="-5.0" max="5.0" /> which is described in an XML schema as the type RangeType <complexType name="RangeType"> <attribute name="min" use="required" type="double" /> <attribute name="max" use="required" type="double" /> </complexType> Is it possible to use XML-Schema to require the max at...

XSD Date or no date validation

The following seems to work for MM-YYYY format but I now have a case where it can either be blank or have a date. Is this possible or should I push to only include the attribute in the XML if there is a date and make the attribute optional? <xs:attribute name="edition_date" use="required"> <xs:simpleType> <xs:restriction base="A...

Validate XSD with XML .

I want to know how to validate XML with XSD . XML is not of an element type but a complex type . Since validator class's validate method compare only element type. So basically I want to valide XSD's complex type with an XML. e.g. Basic XSD below xs:element name="Customer"> <xs:complexType> <xs:sequence> <xs:element name...

Does the WCF framework support the XSD IDREF restriction?

A nice feature in XSD is the IDREF restriction, e.g.: <xs:restriction base="xs:IDREF"> <xs:pattern value="[0-9a-zA-Z\-]+"/> </xs:restriction> I used this restriction with great benefit in a Java JAXWS-project. An object serialized in a SOAP XML datamodel can hold a reference (pointer) to another object in the same SOAP message. I w...

Create xml type with no body

Hopefully this is an easy question. How can I define an XML type such that the type doesn't have a body. As an example I can define the Foo type as follows... <xs:complexType name="Foo"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="id" type="xs:integer" use="required"/> </xs:ex...

Traceability with XSD

I am trying to let my XML schema handle a little traceability functionality as I'm gathering requirements while I read through some functional specifications. (Not ideal for requirement management, but at least its a start.) What I'm doing is creating a <functionalSpec> tag for each functional specification I am currently reading throug...

map xml element to xsd complexType based on attribute

Assume there exists an XML instance document that looks like this: <root> <object type="foo"> <!-- ... --> </object> <object type="bar"> <!-- ... --> </object> </root> My goal is to have a small (static) schema that verifies proper <element type="xxx" /> syntax for objects, and another schema (more pro...