xml-schema

XSLT to convert XML schema to HTML

I've made an XML schema but I don't know if I need an XSL stylesheet to show it in HTML. Do I need one? If I do, has anyone got an example which I could see and learn how to make one for my XML schema? ...

get a list of all schemas referenced in an XML document

In C#, how can I get a list of all XSD schemas referenced in an XML file, including those referenced via xsi:noNamespaceSchemaLocation? ...

what's the best way to automate generation of an xsd given an xml sample?

I have a chunk of xml data that's coming out of a database that I need to generate an xsd for. Got it all working using xsd.exe but all the elements are showing up as string, even things like 2079.0200. How do I get xsd.exe to guess at types? Would the XmlSchemaExporter class be able to do this? The issue here is that Visual Studio is ...

Using xsi:nil in XML

I am generating an XML file from a VB.NET app. The document was generating fine before I tried to add nillable elements. I am now testing putting in just one nil element as: <blah xsi:nil="true"></blah> Once this element is in place and I try to view the XML file in IE it is unable to display. I am receiving: > The XML page canno...

Hidden Features of XML, DTD and XML Schema

With all of the other hidden features questions on SO, how can we forget XML? What are the hidden features of XML, DTD and XML Schema? ...

Best XSD file generator

Hi, I am analyzing tools that generate XSD file from XML files. I find lot of tools in internet. XSD.exe utility that comes along with Visual Studio (xsd file.xml) Stylus Studio's XSD file generator XSD Interference tool from Microsoft XMLFox Professional Liquid XML Studio (XML Editor reverse engineering) Which of the above is best i...

how to do simple xsd with netbeans

I need to define some schemes for an API whitch have communication sending and receiving xml strings. I want to document the scheme definition to the clients who will user that API. for example <store> <name>the store</name> <products> <product> <id></id> <name></name> <price></price> ...

What are the best practices for versioning XML schemas?

I often have to design XML schemas for different XML-bases import routines. It is clear that XML schemas will evolve over time or they could contain bugs to be fixed, so it is important to capture the schema's version and to have some mechanism to bind against a specific version. Currently I have two scenarios: The bug is found within...

XML Deserialization Producing Incorrect Results

I am an XML beginner, using C# .NET 2.0/Visual Studio 2005. What I have is a data sample in XML that I'd like to convert into strongly typed data structures. I also have an XSD for that file that I ran through the Visual Studio xsd.exe to generate the code for it. I ran it against System.Xml.Serialization.XmlSerializer It did a decen...

Want to split a Schema into a common part + "private" part. How to?

I have a schema file which I would like to split in two parts. One with common fields and another with particular fields in JAXB (2.1) for reusability. How to do it? <?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; <xs:element name="content"> <xs:complexType> <xs:sequence> ...

Validating only part of XML document using schema?

Hi all, Is it possible to write a schema allowing mixing validated XML with just well-formed XML? Case in point is a data transfer application where requests consist of a bunch of meta-data (which we'd like to validate) and record-specific information (which is validated separately from the XML in the business logic, because the XML req...

wsdl return an array of complex types

hi, I have defined a web service that will return the data from my mysql data base. I have written the web service in php. Now I have defined a complex type as follows: $server->wsdl->addComplexType( 'Category', 'complexType', 'struct', 'all', '', array( 'category_parent_id' => array('name' => 'category_parent_id', 'type' => 'xsd...

XSD parser algorithm

Hi, I am working on an autocomplete plugin for xml documents. I want to know if there are any recommended algorithms to which I could refer to parse through the xsd?? The idea is to parse through xsd and construct a collection/hash of objects and then suggest the next level sub tags on < and attributes on space inside <>. Edit: The lan...

PL/SQL - XML Validation errors

I am validating an XML document against a schema. So far, all is going well, but there are some significant differences between the generated document and the schema (hence the validation). I've noticed that Oracle will stop validating after the first error is encountered. I'd like to be able to compile a list of errors and take them to ...

Missing Microsoft XML schema mystery

I downloaded the XML schema's for Office 2003 from Microsoft's download site here so I can validate Excel documents that people upload to our app. Turns out that they don't work. I receive errors where it can't resolve the type like this: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'udcxf:File' to a(n) 'element ...

How do I define (XML Schema) a list of elements with names based on the values of an enumeration?

I'm looking to do something like this: <?xml version="1.0" encoding="utf-8"?> <!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com) by Systems Management (Caleb Technologies Corp) --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; <xs:element name="Config" type="Config"/> <xs:simpleType name="FeatureNames"> ...

Registering XML Schemas in Oracle - how to get rid of leftover objects

I tried to register a schema in Oracle the other day to validate an XML document. The code I used was fairly simple: dbms_xmlschema.registerSchema(schemaURL => 'http://www.myCompany.com/schema', schemaDoc => :schemaCLOB); At first, everything seemed to work well, as far as validation goes. I noticed thoug...

XML Schema: Incorrect definition for the root element in schema

There is a schema with the following boring root element: <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; The schema is valid as far as I'm concerned, and Excel reads it no problem, for instance. However, when I try to validate stuff agaist this schema using MSXML (v3 or v4 or v6) I g...

validating xml with an arbitrary xml file

hi, in my company they have came up with their own xml that is being used as a schema for data, now i have to validate a xml according to that schema. is there any easy way to do it or i have to write from scratch? i am working with java6... thanks ...

Most Efficient Schema For This OR That, or This AND That

I'm trying to write an XML schema that allows XML to be expressed in the following ways: pets can containt both cat and dog elements: <root> <pets> <cat /> <dog /> </pets> </root> pets can contain just cat or dog elements <root> <pets> <cat /> </pets> </root> ----------- <root> <pets> <dog /> </pets> </ro...