What is the use of namespace in xml file ?

Solution Unverified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Issue

1) What is the use of this namespace (xmlns="urn:jboss:deployment-structure:1.2") in jboss-deployment-structure.xml?.

2) Is this a mandatory to mention for all JBoss version ? If it's a mandatory, what version is recommended to use ?

3) If it's not a mandatory and it's not mentioned in the XML, what version will be taken up in runtime. Whether it will take jboss:deployment-structure:1.2 or jboss:deployment-structure:1.1 or anything else.

Resolution

  • The namespace xmlns="urn:jboss:deployment-structure:1.2" specifies jboss-deployment-structure.xml to follow which schema . The are various schemas present under $EAP_HOME/docs/schema/.

  • It is not mandatory to mention which schema need to follow. If xsd version is not mentioned in xml file, it will take latest version of xsd present in `$EAP_HOME/docs/schema/.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments