Questions tagged [xsd-validation]

XSD validations are used to validate the XML file against the stored schema.

1640 questions
13
votes
8 answers

How to solve validation error on xsi:noNamespaceSchemaLocation in jdoconfig.xml

Since I updated today to GAE 1.7.2.1, I'm having validation errors in eclipse in all my jdoconfig.xml files. I have the default jdoconfig.xml content : [...]
mamuso
  • 3,117
  • 3
  • 30
  • 32
12
votes
1 answer

different behavior for Full Framework and .NET Core for xml schema compilation

here is my validation code: string xsdPath = "base.xsd"; XDocument doc = XDocument.Load(xmlPath); XmlSchemaSet schemas = new XmlSchemaSet(); schemas.Add("http://some.domain.org", xsdPath); schemas.Compile(); bool isValid =…
tschmit007
  • 7,559
  • 2
  • 35
  • 43
12
votes
1 answer

The difference between and in XSD?

What is the difference between and in XML Schema?
huangweiwei
  • 161
  • 1
  • 2
  • 9
11
votes
2 answers

Can a sequence of XML elements be conditional on a property?

First question (be kind!) Explanation: if a property's true, I need the type to have elements. So if an attribute is true, the XML output might be: RT 27/07/2011 And if it isn't…
struct
  • 604
  • 7
  • 13
11
votes
1 answer

XSD element substitution group example?

I'd like to be able to specify single choice type for multiple extending types. For example, say we have the sea, in the sea there are many kinds of fishes. So in XML I will write:
Slime recipe
  • 2,223
  • 3
  • 32
  • 49
11
votes
1 answer

How to link XML to XSD using schemaLocation or noNamespaceSchemaLocation?

I found some tips for this problem, but still didn't help me. Here is my XML
porandddr
  • 129
  • 1
  • 1
  • 6
10
votes
2 answers

Restricting XML Elements Based on Another Element via XSD

I believe this has to do with keyref but I'm not for sure, and I am really not sure that it can be done at all. For example, say I have myElement1 and myElement2. If there are no myElement2 in the XML file, then myElement1 must exist, otherwise it…
hmcclungiii
  • 1,765
  • 2
  • 16
  • 27
10
votes
3 answers

How to define mutually exclusive attributes in XSD?

###First the code fragment... ###What I want to…
ycomp
  • 8,316
  • 19
  • 57
  • 95
10
votes
2 answers

Error: It was detected that 'sites' has no namespace, but components with no target namespace are not referenceable from schema document

I have been working on this "advanced" schema for days with the flu and I cannot figure out why it keeps telling me that "sites" is not found. I re-read the chapter and even created a copy to experiment with (which worked before) and I do not…
Pau808
  • 213
  • 1
  • 2
  • 10
10
votes
5 answers

How to ignore the validation of Unknown tags?

One more challenge to the XSD capability,I have been sending XML files by my clients, which will be having 0 or more undefined or [call] unexpected tags (May appear in hierarchy). Well they are redundant tags for me .. so I have got to ignore their…
Rookie Programmer Aravind
  • 11,952
  • 23
  • 81
  • 114
10
votes
1 answer

Max default length xsd string

What is the default max length of xsd string if max length is not specified? https://www.w3schools.com/xml/schema_facets.asp maxLength - Specifies the maximum number of characters or list items allowed. Must be equal to or greater than…
Sharpeye500
  • 8,775
  • 25
  • 95
  • 143
9
votes
2 answers

XSD attribute NILLABLE not working

I am working on getting an xml file to validate against an XSD schema and I'm having trouble with the validations. Every time I validate I get errors saying "Schemas validity error: Element '{http://services.website.com/ProgramResponse}Population':…
sublimeike
  • 182
  • 1
  • 1
  • 10
9
votes
2 answers

XML Signature element is not declared

I created XSD using Visual StudioXML Tools. And I use following C# code to validate XML and facing this error. Error The element is not declared 'http://www.w3.org/2000/09/xmldsig#:Signature'. So my question is how to fix it because in edit mode…
NoWar
  • 36,338
  • 80
  • 323
  • 498
9
votes
1 answer

How to specify repeated elements in XSD

I have a an XSD which validates my XML file. The problem is that it works for one element, but when I have more than one it doesn't work and I can't find the problem. This is my XML file:
Dani Tome
  • 473
  • 1
  • 5
  • 16