Why are URLs in XML namespaces?

前端 未结 4 1680
轮回少年
轮回少年 2020-11-28 14:02

Take this line as just one example:



4条回答
  •  攒了一身酷
    2020-11-28 14:47

    The core of the problem is that namespaces have to be URIs. There is no good reason for such a thing since all it needs to be is a unique identifier to give context for the defined elements.

    Since they have to be URIs, all possibilities are senseless, because a scheme is needed (e.g. http) even though a namespace has nothing to do with such a thing.

    So to answer the question of why: like all bad ideas, someone thought it was a good idea at the time.

提交回复
热议问题