ensureNamespace

open fun ensureNamespace(qName: QName): QName(source)

Ensure that the prefix of the qName is recorded (and the prefix added). This will not add the actual name anywhere, just ensures the namespace attribute if needed

Return

The QName to use. This may have a different prefix if the prefix for the parameter would be conflicting.

Parameters

qName

The name to try to ensure is valid


abstract fun ensureNamespace(qName: QName, isAttr: Boolean): QName(source)

Ensure that the prefix of the qName is recorded (and the prefix added). This will not add the actual name anywhere, just ensures the namespace attribute if needed

Return

The QName to use. This may have a different prefix if the prefix for the parameter would be conflicting.

Parameters

qName

The name to try to ensure is valid

isAttr

Ensure handling attribute default namespaces correctly