Questions tagged [xml-validation]

the procedure of checking an XML document against some kind of schema that describes rules that this type of document must conform to. This can often be done programmatically in eg. Java or C# and the schemas are often of the type XSD.

XML validation is the procedure of checking an XML document against some kind of schema that describes rules that this type of document must conform to. This can often be done programmatically in eg. Java or C# and the schemas are often of the type XSD.

1005 questions
4
votes
1 answer

.NET: Preventing Web Access When Validating/Reading XML Schemas?

I'm trying to prevent .NET Framework accessing the Web when validating an XML document using XML schemas, because I don't want it to rely on having the Web access all the time. For this purpose I intentionally created local hard disk copies of all…
Igor Brejc
  • 18,714
  • 13
  • 76
  • 95
4
votes
0 answers

Why do I get an Xml Validation error when running my application on one server, but not on my other server's systems?

I've deployed my ASP.Net C# application to three other systems without problem. I haven't changed the application code, or even the installer. I have also gone through and made sure that my IIS 10 settings and connections are all set up as close to…
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

Element or attribute do not match QName production

I have a schema that i have "flattened" using XML Editor. After i flatten it i get a validation error. What can i do to fix it? Error Message: F [Xerces] Element or attribute do not match QName production: …
capdragon
  • 14,565
  • 24
  • 107
  • 153
4
votes
1 answer

how to validate xml against dtd

I have a XML document:
Companyy
Lari13
  • 1,850
  • 10
  • 28
  • 55
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?
4
votes
2 answers

Having XML validation issues depending on the XML Parser used.....how do I represent the constraint to be universally accepted

I have a strange situation that has me perplexed a bit.... I have an XML data file I am trying to validate against a schema that seems to give different results depending on the parsers used. Not sure what I am doing wrong or how to better represent…
Paul
  • 59
  • 3
  • 8
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
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
1 answer

Suppress XML DTD error in Eclipse

The XML DTD for a Joomla component is not correct, it does not contain the method="install/upgrade" attribute. In eclipse it is annoying me because there is a permanent error showing for my project. Is there a way to suppress this particular XML…
jax
  • 37,735
  • 57
  • 182
  • 278
4
votes
1 answer

"Elements ... does not resolve to a(n) type definition" in validation

I am trying to create an XSD file to work as a filter to validate some XML files that will have to be processed further. Here is the XSL file:
AntonH
  • 6,359
  • 2
  • 30
  • 40
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
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

Require XML element in XSD when another element has certain value?

I need a required attribute or element only if a specific value of an enumeration is chosen. Example below:
elnapo
  • 55
  • 2
  • 7