XSD validations are used to validate the XML file against the stored schema.
Questions tagged [xsd-validation]
1640 questions
5
votes
2 answers
In XSD how do I allow only whitespace in an element's content?
I am writing the XSD for an element that has no content, only attributes, which seems fairly straightforward:

Dave
- 3,429
- 2
- 26
- 29
5
votes
1 answer
Import complex types from another XSD
I am finding difficulty in importing and referencing a complex type from one XSD file to another. Let me illustrate my scenario with an example
Student.xsd

Aarish Ramesh
- 6,745
- 15
- 60
- 105
5
votes
3 answers
XSD schema: How to specify the number of digits in a value?
i want to limit the number of digits allowed in an element to 6:
123456
999999
000000
The field format specification is 6-digit, zero-padded, numeric.
i…

Ian Boyd
- 246,734
- 253
- 869
- 1,219
5
votes
3 answers
XML Schema to validate XML Schemas?
Does anyone know if its possible to validate an XML schema with another XML schema? If so, is there a reference implementation out there? I would like to parse a Schema doc using JAXB.

BillMan
- 9,434
- 9
- 32
- 52
5
votes
1 answer
How to reference local XSD from XML file?
I want to write a simple XML file with a custom xsd file located in the same local directory on my computer. I don't understand the necessary syntax at the beginning of the files (I have googled but XSD tutorials seem to focus on the element…

DavidA
- 2,053
- 6
- 30
- 54
5
votes
1 answer
XSD schema that allow random order
I'm try to design a XSD schema that allow elements to be in a random order and have maxOccurs="unbounded".
My XML:
…

magol
- 6,135
- 17
- 65
- 120
5
votes
2 answers
How to validate an xml file against an XSD Schema using Amara library in Python?
High bounty for the following Q:
Hello,
Here is what I tried on Ubuntu 9.10 using Python 2.6, Amara2
(by the way, test.xsd was created using xml2xsd tool):
g@spot:~$ cat test.xml; echo =====o=====; cat test.xsd; echo ====
o=====; cat test.py;…

Hamish Grubijan
- 10,562
- 23
- 99
- 147
5
votes
3 answers
Invalid XSD schema using libxmljs with nodejs
I've posted an issue on libxmljs repository and it was closed because they think that this isn't a problem at the level of the lib. So I post it here.
I'm trying to validate a XLIFF file with a XML schema provided by OASIS but I keep receiving an…

Ismael
- 320
- 4
- 15
5
votes
1 answer
Add pattern to anyURI data type in xsd
How can I guarantee that the url element starts with "http://"?

grv
- 1,013
- 2
- 12
- 19
5
votes
1 answer
Validating XML files against XSD in FireMonkey
I am developing a cross-platform application (for Windows, Mac etc.) and for 32-bit and 64-bit machines.
I have lots of XML files which I need to validate against their XSD.
Is there any way of doing this in Delphi XE3?
I have tried DTD validation…

Padam
- 117
- 1
- 7
5
votes
1 answer
Using Xerces-j to validate an XML Document
I'm trying to validate an XML document using Xerces-J.
I want the validator to pick up and resolve any associated XSD or DTD files (using schemalocation, nonamespaceschemalocationa and DOCTYPE references). It seems the loading of these resources…

Sprotty
- 5,676
- 3
- 33
- 52
5
votes
1 answer
MaxLength restriction for MultiLineText field in SDL Tridion 2011
My schema source looks like follows:

Sara C. Lorca
- 291
- 1
- 7
4
votes
2 answers
Create an XSD optional decimal element with restrictions
I've managed to create an optional decimal element using this:
but I also need to add restrictions so that if it has been entered, to…

Iain Ward
- 9,850
- 5
- 34
- 41
4
votes
1 answer
Allow sequence OR empty in XSD
Looking to figure out how to match either on a set sequence or no value. Example below of my sequence, but I'm stuck for how to get it to accept either the sequence as written, or the tag existing with no value inside it.

Matt Klaver
- 169
- 1
- 10
4
votes
1 answer
How to specify spaces in an XSD xsi:schemaLocation relative path?
I am editing an XML file in Visual Studio that references an XSD at a relative path with spaces in one of the folder names. Visual studio does not seem to be impressed.
If I remove the space names from the folder it works and I can navigate.

Derek
- 7,615
- 5
- 33
- 58