What does this mean “xmlns:xliff”? XML

2020-02-09 06:09发布

问题:

What does this mean?

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

It can be seen in Strings.xml as part of the resources folder values in Android projects.

回答1:

This is xml namespace used for xliff. Xliff is used for localization purposes. You can read more about xliff here.



回答2:

XLIFF is the OASIS XML Localisation Interchange File Format.

xmlns:xliff is an XML attribute name. The :xliff indicates we are using the xliff namespace.

urn:oasis:names:tc:xliff:document:1.2 identifies the schema location; the choice of format is at the discretion of Oasis, I'd assume it has meaning.