I include the below xsd file:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="http://www.xxxx.com/schemas/2005/06/messages" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.xxxx.com/schemas/2005/06/messages" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation...
Is it possible to specify the value of a tag or attribute should not be like some_value ?
I have a strange requirement, where the xsd isn't aware of the values being sent to it. The value of that particular tag can be a string with any value except one value ( say data_migration).
The sender should be acknowledged with the error, if t...
I have a deserialized xml c# objet.
I need to iterate through the oject to display all items, in this case there's just one, and display the name, colors and sizes for each item.
The xml:
<?xml version="1.0" encoding="utf-8"?>
<Catalog Name="Example">
<Items>
<Item Name="ExampleItem">
<Colors>
<Color Name="Black" Va...
Imagine I have a recursive algebraic data type like this (Haskell syntax):
data Expr = Zero
| One
| Add Expr Expr
| Mul Expr Expr
I'd like to represent this in XML, and I'd like an XSD schema for it.
I have figured out how to achieve this syntax:
<Expr>
<Add>
<Expr>
<Zero/>
</Expr>
<...
Here is my first attempt at validating XML with XSD.
The XML file to be validated:
<?xml version="1.0" encoding="utf-8" ?>
<config xmlns="Schemas" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="config.xsd">
<levelVariant>
<filePath>SampleVariant</filePath>
</levelVariant>
<levelVariant>
...
Hallo, I have a very long XSD scheme. And the validation process (via PHP) is taking 10 seconds.
Do you have some ideas how I can improve performance?
The XSD file is not changes often, but I can not change it, it is external.
the XML validated is about 500 lines.
Any ideas on XSD validation performance?
Thanks.
...
I try to refer with an xsd:keyref from within a node/subnode structure to a global table that is child of the xml root element.
Here is an example xml
<?xml version="1.0" encoding="UTF-8"?>
<Root xmlns="http://www.example.org/keyTest"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.example.org/keyTe...
I am writing a WCF REST service, and I am needing to generate my XSD's which provide the information for my models.
What is the easiest way of doing this?
It would be nice to have it generate the validation within the XSD too, if possible?
...
I have the following schema, which I use to ensure that a person's PhoneNumber and PhoneNumberType (Home, Work, etc.) is not longer than 10 characters. However, I want to improve this schema so that PhoneNumberType is not required if a PhoneNumber is not provided, but is required if the PhoneNumber is provided. Is there a way to do this ...
I am trying to use dom4j to validate the xml at http://www.w3schools.com/Schema/schema_example.asp using the xsd from that same page. It fails with the following error:
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'shiporder'.
I'm using the following code:
SAXReader reader = new SAXReader();
reader...
I am using a third party Web Service whose definition and implementation are beyond my control.
This web service will change in the future.
The Web Service should be used to generate an XML file which contains some of the same data (represented by the same XSD types) as the Web Service plus some extra information generated by the progra...
When I serialize an object which has a DateTime in it this is returning empty in the XML string.
Please see below for my XSD, serializable class generated from the XSD, and serialization helper class which handles the serialization of the XSD.
XSD:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="test" xmlns="" xmlns:xs="ht...
I have a xml schema file that was supplied by a vendor. At the root, the file has three main elements: Customer, ShipDate, and Items. Once I have added the XSD file to my project, I am not able to access the ShipDate attribute. I am not sure how to handle this. I tried creating a new element for the ShipDate similar to the other elements...
Hello,
I recently generate two versions of Java classes generated by JAXB. So I get two packages :
V1_0 and V2_0
I notice that I have only one ObjectFactory generated. The problem is that this ObjectFactory is specific to a version (here it's specific to my version v1_0).
So the question is : Could I configure JAXB to allow to make on...
I have the following type structure:
Foo (abstract)
Bar extends Foo
Baz extends Foo
Bar1 extends Bar
Baz1 extends Baz
I have two elements I'd like to restrict the types of:
Is this possible in XSD?
...
I have several "main" XSD documents, which import "supporting" XSD documents. These schema documents happen to be from the HR-XML 3.0 specification, in particular related to Background Screening.
For the purposes of code-generation and convenient single-file schema to reference in my WSDL, I am trying to "flatten" the schema. The import...
I'm looking for a free alternative to all the XML/XSD editors around here (that are relatively expensive--at least for me). I totally fail to find one.
I need it to allow me to edit xsd files to help in writting an xml-based language specification. I need it to be visual to help with the design, making it clear. Other features are less ...
I'm using dom4j to load an xml file which references an xsd. If the xml file references the xsd http://foo/bar.xsd, how can I tell dom4j to instead use an xsd file located in the classpath? I was hoping that I could open an inputstream to the local xsd and then pass that to dom4j to use when it encounters that url.
The next best thing w...
I am trying to get a list of elements with a specific xsd type with lxml 2.x and I can't figure out how to traverse the xsd for specific types.
Example of schema:
<xsd:element name="ServerOwner" type="srvrs:string90" minOccurs="0">
<xsd:element name="HostName" type="srvrs:string35" minOccurs="0">
Example xml data:
<srvrs:ServerOwner...
What is the correct syntax for XSD schema to define the following restriction:
In the list of elements we have to specify that attribute can contain value of "c" unlimited number of times, but value of "b" - the zero or only one time.
For example, the correct xml looks like this:
<root>
<elem atr="c">111</elem>
<elem atr="c">222</elem...