xsl-list
[Top] [All Lists]

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?

2015-06-12 08:28:13
Martin Honnen wrote:

        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.

Yes!

That did it. Here's how it now appears in the HTML:

<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema";
                          name="Title"
                          type="xs:string"
                          minOccurs="0"/>

Thanks Martin and Ken!

/Roger
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>