XXE is not namespace aware for a document using a DTD as its grammar.
Being not namespace aware means that xmlns
attributes are treated as ordinary attributes with no special semantics. All element and attributes names (except xml:space
, xml:lang
, xml:base
which belong to the "http://www.w3.org/XML/1998/namespace
" namespace) have no namespace. Names like "foo:bar
" are allowed.
A DTD is considered to be a grammar if it defines at least one element type. That is, a DTD only declaring entities is not considered to be a grammar.
This dialog box is not displayable for non-namespace aware documents.
This dialog box can be used
To declare a namespace used by the name of an attribute or an element (it is required to do so before adding the element or the attribute) or used in the value of the attribute or in the textual content of the element (for example, when the document being edited is a schema).
In practice, this is very rarely needed because document templates generally contain declarations for all the namespaces they might use.
To change the ``prefix'' of a namespace.
What is called a ``prefix'' here should be called the nickname or the mnemonic of the namespace. Without nickname "xsi
" for namespace "http://www.w3.org/2001/XMLSchema-instance
", an attribute name such as "xsi:schemaLocation
" would be displayed as "{http://www.w3.org/2001/XMLSchema-instance}schemaLocation
" by the GUI of XXE, which is quite unreadable.
Real namespace prefixes only exist while the document is being loaded and while the document is being saved. Do not try to add xmlns
attributes to elements to specify them. XXE does this automatically each time the document is saved, the nicknames declared using this dialog box being used preferably to automatically generated prefixes such as ns
, ns2
, ns3
, etc.
To make a namespace the ``default'' namespace, that is the namespace for which no prefix is displayed (for element names, not for attribute names).
It is not recommended to mark a namespace as being ``default'' if some elements in the document have names without a namespace. In such case, it would be impossible to tell if name "title
" is "title
" with no namespace or is in fact "{http://www.foo.com/namespace}title
", where "http://www.foo.com/namespace
" has been marked as being the default namespace.
Procedure for declaring a namespace:
You may have to clear the form by clicking on the button
Specify the URI of the namespace in the Namespace field.
Specify the ``prefix'' of the namespace in the Prefix field.
Specifying a prefix is mandatory even if the namespace is to be marked as ``default''.
Optionally mark it as being the `default'' namespace by checking the Default toggle.
Type Enter in any field or click on the button.
Procedure for changing the declaration of a namespace:
Select the namespace declaration to be edited by clicking on its row in the table.
Specify the ``prefix'' of the namespace in the Prefix field.
Specifying a prefix is mandatory even if the namespace is to be marked as ``default''.
Optionally mark it as being the ``default'' namespace by checking the Default toggle.
Type Enter in any field or click on the button.