XML-NAMESPACE-PREFIX
The XML-NAMESPACE-PREFIX special register is defined during XML parsing to contain the prefix, if any, of the name in XML-TEXT for XML events START-OF-ELEMENT, END-OF-ELEMENT, and ATTRIBUTE-NAME, and to contain the local attribute name for XML event NAMESPACE-DECLARATION.
The namespace prefix is used as an alias for the complete namespace identifier.
The parser sets XML-NAMESPACE-PREFIX 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.
To use XML-NAMESPACE-PREFIX, you must compile with the XMLPARSE(XMLSS) compiler option.
XML-NAMESPACE-PREFIX is an elementary data item of category national. The length of XML-NAMESPACE-PREFIX can vary from 0 through 4,096 bytes. The length at run time is the length of the contained namespace prefix.
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 the name does not have a prefix
- The NAMESPACE-DECLARATION XML event if the declaration is for the default namespace, in which case the namespace declaration attribute name is not prefixed.
- All other XML events
When XML-NAMESPACE-PREFIX is set, the XML-NNAMESPACE-PREFIX special register has a length of zero. At any given time, only one of the two special registers XML-NAMESPACE-PREFIX and XML-NNAMESPACE-PREFIX has a nonzero length.
Use the LENGTH function or the LENGTH OF special register to determine the number of bytes that XML-NAMESPACE-PREFIX contains.
XML-NAMESPACE-PREFIX cannot be used as a receiving item.