public static function getSchema(string $xliffVersion): string
    {
        if ($xliffVersion === '1.2') {
            $xmlUri       = 'http://www.w3.org/2001/xml.xsd';
            $schemaSource = \dirname(__DIR__, 1) . \DIRECTORY_SEPARATOR . 'Resource' . \DIRECTORY_SEPARATOR . 'schemas' . \DIRECTORY_SEPARATOR . 'xliff-core' . \DIRECTORY_SEPARATOR . 'xliff-core-1.2-strict.xsd';
        } elseif ($xliffVersion === '2.0') {
            $xmlUri       = 'informativeCopiesOf3rdPartySchemas/w3c/xml.xsd';
            $schemaSource = \dirname(__DIR__, 1) . \DIRECTORY_SEPARATOR . 'Resource' . \DIRECTORY_SEPARATOR . 'schemas' . \DIRECTORY_SEPARATOR . 'xliff-core' . \DIRECTORY_SEPARATOR . 'xliff-core-2.0.xsd';
        } else {
            throw new InvalidArgumentException(\sprintf('No support implemented for loading XLIFF version [%s].', $xliffVersion));
        }

        return self::fixLocation(\file_get_contents($schemaSource), $xmlUri);
    }
public static function getSchema(string $xliffVersion): string
    {
        if ($xliffVersion === '1.2') {
            $xmlUri       = 'http://www.w3.org/2001/xml.xsd';
            $schemaSource = \dirname(__DIR__, 1) . \DIRECTORY_SEPARATOR . 'Resource' . \DIRECTORY_SEPARATOR . 'schemas' . \DIRECTORY_SEPARATOR . 'xliff-core' . \DIRECTORY_SEPARATOR . 'xliff-core-1.2-strict.xsd';
        } elseif ($xliffVersion === '2.0') {
            $xmlUri       = 'informativeCopiesOf3rdPartySchemas/w3c/xml.xsd';
            $schemaSource = \dirname(__DIR__, 1) . \DIRECTORY_SEPARATOR . 'Resource' . \DIRECTORY_SEPARATOR . 'schemas' . \DIRECTORY_SEPARATOR . 'xliff-core' . \DIRECTORY_SEPARATOR . 'xliff-core-2.0.xsd';
        } else {
            throw new InvalidArgumentException(\sprintf('No support implemented for loading XLIFF version [%s].', $xliffVersion));
        }

        return self::fixLocation(\file_get_contents($schemaSource), $xmlUri);
    }
public static function getSchema ( string $ xliffVersion ) : string { if ( $ xliffVersion === '1.2' ) { $ xmlUri = 'http://www.w3.org/2001/xml.xsd' ; $ schemaSource = \ dirname ( __DIR__ , 1 ) . \ DIRECTORY_SEPARATOR . 'Resource' . \ DIRECTORY_SEPARATOR . 'schemas' . \ DIRECTORY_SEPARATOR . 'xliff-core' . \ DIRECTORY_SEPARATOR . 'xliff-core-1.2-strict.xsd' ; } elseif ( $ xliffVersion === '2.0' ) { $ xmlUri = 'informativeCopiesOf3rdPartySchemas/w3c/xml.xsd' ; $ schemaSource = \ dirname ( __DIR__ , 1 ) . \ DIRECTORY_SEPARATOR . 'Resource' . \ DIRECTORY_SEPARATOR . 'schemas' . \ DIRECTORY_SEPARATOR . 'xliff-core' . \ DIRECTORY_SEPARATOR . 'xliff-core-2.0.xsd' ; } else { throw new InvalidArgumentException ( \ sprintf ( 'No support implemented for loading XLIFF version [%s].' , $ xliffVersion ) ) ; } return self :: fixLocation ( \ file_get_contents ( $ schemaSource ) , $ xmlUri ) ; }
Get the right xliff schema from version.

@param string $xliffVersion

@throws \Viserio\Component\Contract\Parser\Exception\InvalidArgumentException;

@return string
Get the right xliff schema from version .