xml-schema

Is starting to use CDATA a breaking change?

For interaction with a customer's application we use XML documents. That is, we send an XML over HTTP and receive a response XML document the same way. The customer specified two XML schemata that describe the format of both the request and reply. All was working fine, until one day the customer started to use CDATA sections in the respo...

What xsd will let an element have itself as a sub element infinitely?

How can I create an xsd to give me this type of xml structure that can go on infinitely? <?xml version="1.0" encoding="utf-8" ?> <SampleXml> <Items> <Item name="SomeName" type="string"> This would be the value </Item> <Item name="SecondName" type="string"> This is the next string ...

XML Data Structure

Which one of two XML structures below do you prefer? Why? Any other suggestion is welcome :) <Parameters> <Parameter id=username>metdos</Parameter> <Parameter id=password>123</Parameter> </Parameters> or <Parameters> <username>metdos</username> <password>123</password> </Parameters> ...

Binding to an XML Schema in Objective-C (iPhone)

Hi, Is there any way (built-in, 3rd party library, etc) that I can bind to an XML Schema in Objective-C on the iPhone? Thanks, Mihai ...

How to create a valid schema in a WSDL that restrict to <|<=|>|>=

This is what I have in my schema section of my WSDL to specify the field has to be comparison operators <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:pattern value="&lt;|&gt;|&lt;=|&gt;=|="/> </xsd:restriction> </xsd:s...

Generating XML Documents from XML Schemas in C++

Is there any easy way to create at least a template XML file using XML Schema? My main interest is bounded by C++, but discussions of other programming languages are also welcome.By the way I also use QT framework. ...

How could I do something like this in a XML schema?

Hi I want to mass create some users and I want to set the users timezone automatically. However I am using timezones generated by this Dictionary<string, TimeZoneInfo> storeZoneName = TimeZoneInfo.GetSystemTimeZones().ToDictionary(z => z.DisplayName); So I need the names to be exactly like the ones this list returns. So can I put li...

.Net Xml Serialize - XSD Definition for Multiple Namespaces

The following XML was generated by serializing .Net objects: <?xml version="1.0" encoding="utf-8"?> <Request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://EPS.WebServices/WebServiceSchema" > <Method xmlns="http://EPS.Library/RequestSchema"&gt;PackPlacementUpdate&lt;/Me...

How to use the same element name for different purposes ( in XML and DTD ) ?

Hi, I Want to create a DTD schema for this xml document: <root> <student> <name> <firstname>S1</firstname> <lastname>S2</lastname> </name> </student> <course> <name>CS101</name> </course> </root> as you can see , the element name in the course contains plain text ,bu...

xml validation problem

I'm having trouble validating a schema I created. "cvc-elt.1: Cannot find the declaration of element 'category'." xsd <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; <xs:element name="list"> <xs:complexType> <xs:sequence> <xs:element name="category" type="categoryType" minO...

Is there any C++ XSLT library?

I want to transform an XSD Document into XML Document(Template), is there any C++ XSLT library? ...

JAXB adding namespace to parent but not to the child elements contained

I put together an XSD and used JAXB to generate classes out of it. Here are my XSDs- myDoc.xsd : <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns="http://www.mydoc.org" targetNamespace="http://www.mydoc.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mtp="http://www.mytypes.com" elementFormDefault="qu...

How can I create a custom NHibernate configuration property?

I'm currently working on creating a custom connection provider for HNibernate very similar to the one mentioned here. In it, they specify a separate connection string within the hibernate.cfg.xml parameters. However, when I go to add this new parameter, like so... <?xml version="1.0" encoding="utf-8" ?> <hibernate-configuration xmlns=...

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...

Underscore not accepting in xml schema for email address

Hi I have created a schema and the following pattern to check for email id: \w+([-+._]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*. However it is not accepting email id's containing underscore like [email protected]. Can you please modify this pattern so that it accepts _ too. Thanks ...

Does &amp; count as one or multiple chars in an xml file?

The XML schema I'm working with has specific character lengths for strings. So I may have a string that's like: "Jim & Mary" which is 10 chars in C# but when it is written to xml it becomes: "Jim &amp; Mary" If an XML schema said the string could only be a max of 10 chars. Would this string pass? If not, how can I test in C# for th...

How does one restrict xml with an XML Schema?

I want to restrict xml with a schema to a specific set. I read this tutorial http://www.w3schools.com/schema/schema_facets.asp This seems to be what I want. So, I'm using Qt to validate this xml <car>BMW</car> Here is the pertinent source code. QXmlSchema schema; schema.load( QUrl("file:///workspace/QtExamples/ValidateXSD/car...

In-document schema declarations and lxml

As per the official documentation of lxml, if one wants to validate a xml document against a xml schema document, one has to construct the XMLSchema object (basically, parse the schema document) construct the XMLParser, passing the XMLSchema object as its schema argument parse the actual xml document (instance document) using the const...

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...

How to validate non empty string in xml content using XML Schema in php

Source XSD:------------- <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xsd:element name="labor_invoice" type="labor_invoice_type"/> <xsd:element name="parts_invoice" type="parts_invoice_type"/> <xsd:complexType name="labor_invoice_type"> ...