search

Home  >  Q&A  >  body text

java - Some questions about xsi:schemaLocation in xml

Baidu has several blog posts about this, and I roughly understand xmlns and xmlns:xsi.
But based on these understandings, we cannot understand the existence of schemaLocation. I would like to ask for your advice.
xmlns refers to the namespace of the xml file. The xsi in xmlns:xsi is the alias of the following URI.
xsi:schemaLocation specifies the mapping relationship between the URI and the specific xsd file.
Who will do the xsi mapping relationship? Who imported the schemaLocation attribute

When I access the corresponding link in schemaLocation in the browser, the first one is usually some descriptive stuff, and xsd is the xml stuff

Who designated the xsd file corresponding to xsi

ringa_leeringa_lee2753 days ago1093

reply all(1)I'll reply

  • 为情所困

    为情所困2017-06-23 09:15:42

    Thanks for the invitation.

    xsd(or xsi:noNamespaceSchemaLocation: No namespace
    For example:

    <CaiElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               xsi:noNamespaceSchemaLocation="CaiSchema.xsd">
        caiyongji
    </CaiElement>
    In other words, xsd, xs, xsi are like titles (p:caiyongji, p stands for programmer, translated as diaosi), used to distinguish labels
    language
    or can be understood as protocoljust like http. Attributes like schemaLocation should be built-in to the protocol.

    reply
    0
  • Cancelreply