XML-NAMESPACE
The XML-NAMESPACE special register is defined during XML parsing to contain the identifier of the namespace, if any, associated with the name in XML-TEXT for XML events START-OF-ELEMENT, END-OF-ELEMENT, and ATTRIBUTE-NAME, and to contain the declared namespace identifier for XML event NAMESPACE-DECLARATION.
The parser sets XML-NAMESPACE to the identifier of the namespace associated with a name before transferring control to the processing procedure when the operand of the XML PARSE statement is an alphanumeric data item and the RETURNING NATIONAL phrase is not specified in the XML PARSE statement.
To use XML-NAMESPACE, you must compile with the XMLPARSE(XMLSS) compiler option.
XML-NAMESPACE is an elementary data item of category alphanumeric. The length of XML-NAMESPACE can vary from 0 through 32,768 bytes. The length at run time is the length of the contained namespace identifier.
There is no equivalent COBOL data description entry.
When used in nested programs, this special register is implicitly defined with the global attribute in the outermost program.
- The START-OF-ELEMENT, END-OF-ELEMENT, and ATTRIBUTE-NAME XML events if there is no namespace associated with a name
- The NAMESPACE-DECLARATION XML event if the namespace is undeclared by specifying the empty string
- All other XML events
When XML-NAMESPACE is set, the XML-NNAMESPACE special register has a length of zero. At any given time, only one of the two special registers XML-NAMESPACE and XML-NNAMESPACE has a nonzero length.
Use the LENGTH function or the LENGTH OF special register to determine the number of bytes that XML-NAMESPACE contains.
XML-NAMESPACE cannot be used as a receiving item.