Saxon.SetLanguageVersion
------------------------

Sets which language version to use for queries.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Saxon](component_Saxon.md) | [15.0](newinversion150.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |

MBS( "Saxon.SetLanguageVersion"; Version ) 

**MBS**( **"Saxon.SetLanguageVersion";** /\* Sets which language version to use for queries. \*/  
**$Version**) /\* The XPath/XQuery version to use for the next queries.e.g. "3.1" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Version | The XPath/XQuery version to use for the next queries. | "3.1" |

### Result

Returns OK or error.

### Description

Sets which language version to use for queries.  
e.g. set to "3.1".  
This setting is stored per thread, so multiple server scripts running in parallel can use different settings.  
### Examples

Set language version:

 Set Variable \[ $r ; Value: MBS ("Saxon.SetLanguageVersion"; "3.1 ") \]  
### See also

- [Saxon.GetLanguageVersion](SaxonGetLanguageVersion.md)
- [Saxon.XPathQuery](SaxonXPathQuery.md)
- [Saxon.XQuery](SaxonXQuery.md)

This function is free to use.

Created 23th December 2024 , last changed 24th February 2025

  
[Saxon.SetCurrentWorkingDirectory](SaxonSetCurrentWorkingDirectory.md) - [Saxon.SetLicense](SaxonSetLicense.md)

[HTML Version](SaxonSetLanguageVersion.shtml)