<xsl:template match="foo">
matches the foo element in the null namespace.
<xsl:template match="*">
matches any element in any namespace.
I tried:
xmlns:null=""
...
<xsl:template match="null:*">
but it's illegal to declare a prefix for the null namespace.
So how can I match an element with any name in the null namespace?
You could try:
<xsl:template match='*[namespace-uri() = ""]'>
If the node-set is empty or has no namespace URI, an empty string is returned by the namespace-uri
function, which should achieve what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With