XSD validations are used to validate the XML file against the stored schema.
Questions tagged [xsd-validation]
1640 questions
3
votes
1 answer
How to reference global types in XSD?
How to implement XSD inner reference to simpleType?
I am facing the error you see in the image below.
XSD

NoWar
- 36,338
- 80
- 323
- 498
3
votes
1 answer
Is it possible to trim tag value before validation in XSD?
The xml looks like:
XX905886XX58
XX905886XX58
`
I have validation in my xsd file for duplicated tag.
But, in described below XML, i would like to validate…

May12
- 2,420
- 12
- 63
- 99
3
votes
2 answers
Who is right and who does the faulty validation (Me, XMLSpy, lxml.etree or xmllint)
I have tried to validate the following XML with the afterwards following xsd file in the same folder. According to Altova XMLSpy this is completely valid but to help some collegues without licenses to find out about basic faults I have tried to…

S. Roder
- 63
- 1
- 6
3
votes
1 answer
unable to validate xml against xsd
I am new to learning XSD. I wrote a XSD file and and XML file and a program to validate the XML against XSD. When I run the program I am getting the error stating Invalid content was found starting with element 'id'. One of '{id}' is expected. Can…

zilcuanu
- 3,451
- 8
- 52
- 105
3
votes
1 answer
Generate a data entry form dynamically from XSD including validation rules
Is there anything around that can read an XSD schema and dynamically create a (Windows C#) data entry form? It would also need to read the type definitions and use them to validate the data entered. The data would then be save as an XML file.
I…

CAD bloke
- 8,578
- 7
- 65
- 114
3
votes
3 answers
XML Schema reference
I have two XML Schemas. First (A.xsd) is located in a library jar file (mylib.jar) and the second one (B.xsd) is in my project.
I want to import A.xsd into the B.xsd and validate incoming XML via Jaxb2Marshaller embedded validator.
However I'm…

Vladimir
- 9,913
- 4
- 26
- 37
3
votes
2 answers
XSD allowing both simpleType and complexType content for same element?
I have a situation where I have different XMLs that will have different types of properties. Sometimes the element HEADER could have just a node or some XMLs could have elements within the HEADER node and values inside.
Example 1 (HEADER with just…

civic.sir
- 400
- 1
- 9
- 26
3
votes
1 answer
Validate XML with multiple namespace in Java
I am trying to validate a XML document that uses multiple namespaces. I want to embed tags of the secondary namespace within a document of the primary namespace. The main/primary namespace does not "know" of the extension/secondary…

taranion
- 631
- 1
- 6
- 17
3
votes
1 answer
XSD Validation Error when mandatory element is missing from sequence complex type
I have an XSD and incorrect XML.
The XSD has a complex type with a sequence of elements. All those elements are mandatory. (The XSD is maintained by a 3rd party and can't be changed)
The incorrect XML is missing one element.
When I validate the XML…

Charlie
- 2,141
- 3
- 19
- 35
3
votes
1 answer
How to add attribute declaration in XSD for element with sequence of child elements?
This is my sample XML code:
TORONTO
That is currently using this XSD:
…

Thiwanka
- 99
- 2
- 10
3
votes
1 answer
How to impose minute restrictions on xsd:dateTime?
I have read that we can use minInclusive and maxInclusive restrictions on xsd:datetime fields. But how can I make sure that my dateTime field shall not occur more than 5 minutes into the future?
I know how to handle it in java . But I want the…

Ashish Verma
- 31
- 3
3
votes
1 answer
Validate XSD: Opening and ending tag mismatch
I'm trying to practise the transformation from XML DTDs to XSDs.
This my first try but the w3-validator throws this error for the following XSD: