You can choose the symbol (p
, util
, jee
, beans
, ...) by yourself. These are namespaces, and they work by adding the xmlns
attribute like:
<beans xmlns:util="http://www.springframework.org/schema/util">
<!-- Content -->
</beans>
In this case we said that util:
will be used by the util schema, so you'll have to use <util:properties>
to access things from this namespace. But you could also have said xmlns:foobar="http://www.springframework.org/schema/util"
in which case you could have used things like <foobar:properties>
.
But you also need to provide the location of the XSD of that namespace by using xsi:schemaLocation
:
<beans xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<!-- Content -->
</beans>
In this case the XSD for http://www.springframework.org/schema/util
is available at http://www.springframework.org/schema/util/spring-util.xsd. The http://www.springframework.org/schema/util
part is just a label and can be chosen as well. The only thing that has to match is the XSD schema.
For more information about XML namespaces, you should look at this question and its answers.
A list of common XML schema's with Spring can be found in their documentation (33. XML Schema-based configuration). However, these only list the core schemas. Some projects (like Spring Web Services, ...) have their own namespaces like:
You can find the entire list by visiting the Index of /schema. However, like I mentioned, most of these are only used for specific Spring projects, don't just import them, read the specific documentation to find out what you need. The documentation about the constructor namespace (c:
) can be found in 7. The IoC container.