xsd

How best to test the validity of XML from a method?

I have some WCF methods that are used to transmit information from a server application to a website frontend for use in binding. I'm sending the result as an XElement that is a root of an XML tree containing the data I want to bind against. I'd like to create some tests that examine the data and ensure it comes across as expected. ...

xsd to rnc (or rng) conversion (unix command line)

A brief search shows that all available (unix command line) tools that convert from xsd (XML Schema) to rng (RelaxNG) or rnc (compact RelaxNG) have problems of some sort. First, if I use rngconv: $ wget https://msv.dev.java.net/files/documents/61/31333/rngconv.20060319.zip $ unzip rngconv.20060319.zip $ cd rngconv-20060319/ $ java -jar...

XML Schema (XSD) validation tool?

At the office we are currently writing an application that will generate XML files against a schema that we were given. We have the schema in an .XSD file. Are there tool or libraries that we can use for automated testing to check that the generated XML matches the schema? We would prefer free tools that are appropriate for commercial...

What are XML namespaces for?

This is something that I always find a bit hard to explain to others: Why do XML namespaces exist? When should we use them and when should we not? What are the common pitfalls when working with namespaces in XML? Also, how do they relate to XML schemas? Should XSD schemas always be associated with a namespace? ...

How can I create database tables from XSD files?

I have a set of XSDs from which I generate data access classes, stored procedures and more. What I don't have is a way to generate database table from these - is there a tool that will generate the DDL statements for me? This is not the same as Create DB table from dataset table, as I do not have dataset tables, but XSDs. ...

What are the advantages and disadvantages of using XML schemas?

We are utilizing the XML data type in Microsoft SQL Server 2005 for a project. Some members of the team and I feel that we should also use XSDs while members of the other camp feel that we should keep the XMLs ad hoc and not treat them as "types". The XMLs are an effort to bring structure and centrality to a number of text configuration...

JAXB Binding Customization

Hi people, While trying to generate classes from a xsd, i got this error: java.lang.IllegalArgumentException: Illegal class inheritance loop. Outer class OrderPropertyList may not subclass from inner class: OrderPropertyList My xsd define a element to group a unbounded element like this: <element minOccurs="0" name="orderProperty...

Recursion in XSD Schemas

I need to create an XSD schema that validates a tree structure of an XML document. I don't know exactly the ocurrences or depth level of the tree. XML example: <?xml version="1.0" encoding="utf-8"?> <node> <attribute/> <node> <attribute/> <node> </node> </node> </node> Which is the best way to validate...

C++ types using CodeSynthesis XSD Tree Mapping

Hi All, I'm using CodeSynthesis XSD C++/Tree Mapping utility to convert an existing xsd into c++ code we can populate the values in. This was we always make sure we follow the schema. After doing the conversion, I'm trying to get it to work so I can test it. Problem is, I'm not used to doing this in c++ and it's my first time with thi...

Xml Schema XSD TotalDigits vs. MaxInclusive

Hi, I have run across an XML Schema with the following definition. <xs:simpleType name="ClassRankType"> <xs:restriction base="xs:integer"> <xs:totalDigits value="4"/> <xs:minInclusive value="1"/> <xs:maxInclusive value="9999"/> </xs:restriction> </xs:simpleType> However, it seems to me that totalDigits is redundant. I am some...

How do i designate in XSD that an element only contains CDATA?

How can I represent the following in XSD. <price-update> <![CDATA[ arbitrary data goes here ]]> </price-update> ...

ASP.NET xsd dataset where do I put it

I am trying to convert an ASP.NET website into a web application project. The conversion has gone ok I think apart from previously I had 2 xsd files in the App_Code folder. I believe this folder is not used in web applications projects, so where would I put xsd files now. ...

From XML to XSD

If i have a complex XML file, is there a cheap or free way to get a rough approximation of an XSD from it? ...

Refactoring XSD Schemas

I'm working in a project which needs to clean up some third party XSD Schemas and I want to do some refactoring of common elements in them. There is any suitable tool to automate this? I tried by sfactor from XMLBeans but it doesn't work (it throws a weird exception which even Google can't answer!). ...

How to resolve "Could not find schema information for the element/attribute <xxx>"?

In visual studio, I have an asp.net 3.5 project that is using MS Enterprise Library 4.0 application blocks. When I have my web config file open, my Error list fills up with 99 messages with things like Could not find schema information for the element 'dataConfiguration'. Could not find schema information for the attribute 'default...

XML schema for elements with same name but different sub-structure depending on context

I try to define a schema for XML documents I receive. The documents look like: <root> <items> <group name="G-1"> <item name="I-1"/> <item name="I-2"/> <item name="I-3"/> <item name="I-4"/> </group> </items> <data> <group name="G-1" place="here"> ...

Formatting XSD scheme for peer review

I designed a data model which is represented by an XSD scheme. The data model also provides the types that are being used as web service parameters in a WSDL descriptor. I would like to send the XSD scheme around and ask the people involved to peer review the data model. What tool or presentation method would you suggest to be used as ...

getter for boolean properties with JAXB

Hi guys! I´m trying to expose services using jax-ws but the first surprise i got was that Weblogic does not support inner classes for request/response objects. After get over this situation here, i´m facing another challenge: Generate getXXX() rather than/additionally to the isXXX() Method. I need to generate this methods cause when i ...

Xsd and inheritance

I have and xsd like this < xsd:complexType name="A"> < xsd:complexContent> < xsd:sequence> < xsd:element name="options"> < xsd:complexType> < xsd:sequence> < xsd:element name="Day"> ... ...

XSD and polymorphism

I am kinda repeating this question bit the 1st time it was asked incorrectly. I have this: <xsd:complexType name="A"> <xsd:sequence> <xsd:element name="options" type="options"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="B"> <xsd:complexContent> <xsd:element name="options" t...