For the following XML fragment:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
What do the xmlns
, xmlns:xsi
, and xsi:schemaLocation
attributes exactly mean? How are they related? What's the :
for?
And there are 2 URLs in the xsi:schemaLocation=
- http://maven.apache.org/POM/4.0.0 (it happens to be the same as
xmlns
but it gives a 404 error when visiting.)
- http://maven.apache.org/xsd/maven-4.0.0.xsd (this is an actual XSD doc)
If 1 doesn't exist, why still put it there?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…