Re: [xsl] How to insert a snippet of XSD into HTML using serialize(), without the result containing a bunch of namespaces? Way to suppress the output of namespace declarations?

Subject: Re: [xsl] How to insert a snippet of XSD into HTML using serialize(), without the result containing a bunch of namespaces? Way to suppress the output of namespace declarations?
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 12 Jun 2015 13:13:25 -0000
Costello, Roger L. costello@xxxxxxxxx wrote:

Is there a serialization parameter to suppress the output of namespace declarations?

What is the solution to this problem?

You can try to make a copy first e.g.


<xsl:variable name="dec1" as="element(xs:element)">
<xsl:copy-of select="//xs:element[@name eq 'Title']" copy-namespaces="no"/>
</xsl:variable>


and then serialize the copy but I think the namespace declaration for the schema namespace can't be eliminated that way. The serialization is supposed to create namespace well-formed XML and serializing a name "xs:element" without binding the prefix "xs" to its namespace would result in malformed XML.

Current Thread