Navigatron
Navigatron

Reputation: 2105

What does this mean "xmlns:xliff"? XML

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.

Upvotes: 31

Views: 20447

Answers (3)

ManulMad
ManulMad

Reputation: 102

In the xmlns:xliff , xmlns mean XML namespace. That provide unique identification to elements and attributes in an XML document.

xliff means XML Localization Interchange File Format.

The xmlns:xliff specifies the namespace use in XLIFF Version 1.2, 2.0 and 2.1. Those XLIFF files use for the localization(language translation) purposes in most applications. There are several declared XML names

  • urn:oasis:names:tc:xliff:document:2.0

  • urn:oasis:names:tc:xliff:matches:2.0

  • urn:oasis:names:tc:xliff:glossary:2.0

  • urn:oasis:names:tc:xliff:fs:2.0

  • urn:oasis:names:tc:xliff:metadata:2.0

  • urn:oasis:names:tc:xliff:resourcedata:2.0

  • urn:oasis:names:tc:xliff:changetracking:2.0

  • urn:oasis:names:tc:xliff:sizerestriction:2.0

  • urn:oasis:names:tc:xliff:validation:2.0

The first namespace urn:oasis:names:tc:xliff:document:2.0 corresponds to the namespace of core subset of XLIFF 2.0. And any XML document that declares the namespace urn:oasis:names:tc:xliff:document:2.0 as its main namespace has as the root element and complies with the XML Schemas and the declared Constraints that are part of this specification.

Can read more about namespaces and xliff here.

Upvotes: 0

Jon Cram
Jon Cram

Reputation: 17309

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.

Upvotes: 7

inazaruk
inazaruk

Reputation: 74790

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

Upvotes: 24

Related Questions