macro_rules! expanded_name {
    ("", $local: tt) => { ... };
    ($ns: ident $local: tt) => { ... };
}
Expand description

Helper to quickly create an expanded name.

Can be used with no namespace as expanded_name!("", "some_name") or with a namespace as expanded_name!(ns "some_name"). In the latter case, ns is one of the symbols which the ns! macro accepts; note the lack of a comma between the ns and "some_name".

Examples


use markup5ever::ExpandedName;

assert_eq!(
    expanded_name!("", "div"),
    ExpandedName {
        ns: &ns!(),
        local: &local_name!("div")
    }
);

assert_eq!(
    expanded_name!(html "div"),
    ExpandedName {
        ns: &ns!(html),
        local: &local_name!("div")
    }
);