package scala.xml
class UnprefixedAttribute(
val key: String,
val value: Seq[Node],
next1: MetaData)
extends Attribute
{
final val pre = null
val next = if (value ne null) next1 else next1.remove(key)
def this(key: String, value: String, next: MetaData) =
this(key, if (value ne null) Text(value) else null: NodeSeq, next)
def this(key: String, value: Option[Seq[Node]], next: MetaData) =
this(key, value.orNull, next)
def copy(next: MetaData) = new UnprefixedAttribute(key, value, next)
final def getNamespace(owner: Node): String = null
def apply(key: String): Seq[Node] =
if (key == this.key) value else next(key)
def apply(namespace: String, scope: NamespaceBinding, key: String): Seq[Node] =
next(namespace, scope, key)
}
object UnprefixedAttribute {
def unapply(x: UnprefixedAttribute) = Some(x.key, x.value, x.next)
}