param( [string]$ProjectRoot = (Join-Path $PSScriptRoot '..'), [string]$ManifestPath = (Join-Path $ProjectRoot 'bootstrap.xml'), [string]$SchemaPath = (Join-Path $ProjectRoot 'schemas/ProjectOS.xsd') ) $ErrorActionPreference = 'Stop' $schemaPath = (Resolve-Path $SchemaPath).Path $manifestPath = (Resolve-Path $ManifestPath).Path $schemas = [System.Xml.Schema.XmlSchemaSet]::new() [void]$schemas.Add($null, $schemaPath) $settings = [System.Xml.XmlReaderSettings]::new() $settings.ValidationType = [System.Xml.ValidationType]::Schema $settings.Schemas = $schemas $reader = [System.Xml.XmlReader]::Create($manifestPath, $settings) try { while ($reader.Read()) { } } finally { $reader.Close() } Write-Output 'bootstrap.xml validates against schemas/ProjectOS.xsd.'