XSD validations are used to validate the XML file against the stored schema.
Questions tagged [xsd-validation]
1640 questions
4
votes
2 answers
Example of extending complex types in XSD?
I am trying to use data within an element without breaking this element existing contract.
Let's simplify my case:

Rotem.O
- 93
- 1
- 11
4
votes
2 answers
JSON Schema validator 'id' field
I am using a JSON Schema to validate a file. This is somehat similar to an XML XSD.
I have a few questions concerning the id field.
Does the schema still works without network connection ?
The URL in the id should be accessible from a web browser…

T code
- 447
- 2
- 7
- 12
4
votes
2 answers
Is it possible to get the type of an XML node as it was defined in XSD?
I'm parsing an XML in python. I've an XSD schema to validate the XML. Can I get the type of a particular node of my XML as it was defined in XSD?
For example, my XML (small part) is

PoltoS
- 1,232
- 1
- 12
- 32
4
votes
2 answers
How Can I create XSD from XML File using java & Eclipse?
I want to create XSD from xml document using java code.I tried with different solution using XsdGen & Xbean jar,but it won't work.You can referred this also:http://www.codesuggestions.com/java/how-to-create-xsd-from-xml-using-java-application/.
…

Akshay Kamble
- 59
- 1
- 1
- 6
4
votes
1 answer
XSD choice inside sequence
I understand and use xs:choice and xs:sequence separately but I do not understand what xs:choice inside xs:sequence mean?
…

Andrei Sibircevs
- 157
- 10
4
votes
2 answers
cvc-enumeration-valid: Value '2' is not facet-valid with respect to enumeration '[1]'. It must be a value from the enumeration
I am getting error validating with this XML:
XSD
…

Ramesh
- 340
- 1
- 7
- 21
4
votes
2 answers
Why can't I put an xs:all inside a xs:sequence?
I'm still a bit new to XML Schema, and I'm trying to do something that would look like this in Relax NG Compact:
test = element test{
element A {text},
element B {text},
(element C {text}? &
element D {text}?)
}
Which means that in the test element…

Wilzy X
- 43
- 2
4
votes
0 answers
JAXB with runtime (dynamic) xsd
Given the below structure/ background, can someone briefly outline (at a high level) a good structure to follow- coding with JAXB when xsd can be modified after compilation?
Background information:
My project currently uses JAXB (and aspectj?) to…

JavaBeast
- 766
- 3
- 11
- 28
4
votes
1 answer
How can I reuse a complex type in XSD for multiple elements?
I have been entirely unable to find any information on this, possibly due to me not having the terminology down. What I want to do is create a template element for currency, which I already have, and use it in two places under two different names…

Arran
- 147
- 1
- 2
- 11
4
votes
3 answers
cvc-complex-type.2.3: Element 'group' cannot have character [children], because the type's content type is element-only
I need to create XML from this XSD:
user7495940
4
votes
1 answer
Why Unmarshaller behaviour is not consistent?
I have created a simple webservice (spring-web) which is meant to validate the incoming XML with respect to XSD and if any validation errors occured, they should be returned to the requester.
The below code does its job...
@PostMapping(path =…

Maciej Papież
- 431
- 1
- 6
- 20
4
votes
2 answers
XSD maxLength and minLength applied to integer
I am having some trouble finding out how to tell the XSD that the data of a field has to have an minimum length of 12 digits and a maximum length of 14 digits. Is there someone who knows how to do this because minlength and maxlength can only be…

user3356007
- 393
- 1
- 6
- 20
4
votes
2 answers
How to validate an XSD schema with lxml, but ignore elements that match a given pattern?
One can use lxml to validate XML files against a given XSD schema.
Is there a way to apply this validation in a less strict sense, ignoring all elements which contain special expressions?
Consider the following example: Say, I have an…

flonk
- 43
- 1
- 4
4
votes
1 answer
Setting minOccurs and maxOccurs in XSD based on value of other XML field?
I have an XSD to validate an XML file. The structure is as follows:
2
Element 1
Element 2
The number of…

SelketDaly
- 539
- 1
- 5
- 20
4
votes
1 answer
Why does xs:choice allow multiple different xs:element in the resulting xml?
I know about this related question and I understand that my question contradicts that answer, but the following XML file validates perfectly against the following XMLSchema
my XML data:
…

Andrei
- 961
- 1
- 9
- 29