Closed ndw closed 9 months ago
Hi,
Based on your code, you are adding ns_xsl
twice which won't have any effect. I'm assuming the last line is meant to be namespace(ns_xs)
?
Adding lots of different parameter combinations to the constructor gets messy quick so I would suggest just using the namespace()
method inside the element. If you need to add multiple, you could call the method multiple times or you could try listOf(ns1, ns2, ns3).forEach { namespace(it) }
inside the element block.
Thanks. I'll take another look. (I'm not even sure what I was thinking in the example I posted!)
Hello. I'm not that familiar with Kotlin or Kotlin DSLs. Apologies in advance if this is a stupid question.
Is it possible to generate an element with multiple namespace declarations? The constructor function seems to take only a single namespace and, while it appears to be legal to put
namespace()
calls in the body, they appear to have no effect:Perhaps the constructor could have a
namespaces
parameter that takes a list ofNamespace
s?