Search

Module:Editor

Version:19.06 +

Type:String

Category:Text

 

Description

The formula 'XsdMessages' returns the error-messages that result when an xml string is validated according to an xsd schema. If the xml is valid, it returns an empty string. 

Parameters

Xsd file (before Futurama 25.12):

The full path to an Xsd file that is used to validate the xml string.

Xsd content (Futurama 25.12+):

The full content of the Xsd that is used to validate the xml string.

Xml string:

The Xml string to be validated

Namespace:

The namespace of the Xml. If omitted (that is, an empty string is defined), the (default) target namespace of the Xsd file is used. This behavior is often sufficient.

Example

Description

Suppose you want to receive the error-mesages when validating this xml string:


	4,5

against this Xsd file, which is located in 'C:\temp\check.xsd':



	
		
			
				 
			
		
	
	
		
			
				
			
		
	

Values parameters

Xsd file:

C:\temp\check.xsd

Xml string:


	4,5

Namespace:

http://www.ActuIT.nl/Futurama/WebService/Faculteit or empty string

Result

Result:

 

Remarks

 

This formula will return an exception if:

 
  • The defined xsd file does not exist or is not accessible
  • The namespace as defined in the 3rd parameter of the formula does not exist in the defined Xsd file

If the Xml string is not properly-structured xml (for example, closing tag is missing), the formula will return the message: “The XML is not well formed and cannot be validated.”

From Futurama 26.10, an xml string that contains a DTD (DOCTYPE) is no longer validated: the result is “The XML is not well formed and cannot be validated.” To validate against an xsd that imports or includes other xsd files, use XsdMessagesWithImports.

Related Topics

- Creating XSD files and using them in combination with Futurama: Xsd support in Futurama.

- IsValidXml: Checks whether an xml string is valid according to an xsd schema, and returns True or False

- IsValidXmlWithImports

- XsdMessagesWithImports

External Links

- W3Schools: XML Schema Tutorial

Feedback

If you have any questions about this subject or if you want to provide us feedback please send us an e-mail.

Updated: 2025-12-17