xsl-list
[Top] [All Lists]

RE: exclude-result-prefixes issue

2004-05-26 16:47:01
Hi Matt,

You cannot expect XSLT not to include the namespace for elements that you
explicitly use within that namespace. So the output you want is AFAIK not
possible.

Why do you want to exclude the namespace from the output, in the first
place?

HTH,
<prs/>

-----Original Message-----
From: Matt Frank [mailto:mfrank(_at_)quadrem(_dot_)com] 
Sent: Wednesday, May 26, 2004 5:56 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] exclude-result-prefixes issue

Greetings

I am having a small problem with prefixes.  I am trying to build a soap
envelope and am having trouble eliminating namespaces for elements that
include a prefix.

I have a very simple stylesheet seen below:

<?xml version = "1.0" encoding = "UTF-8"?> <xsl:stylesheet xmlns:xsl =
"http://www.w3.org/1999/XSL/Transform";
version = "1.0" xmlns:SOAP-ENV =
"http://schemas.xmlsoap.org/soap/envelope"; exclude-result-prefixes =
"SOAP-ENV">
        <xsl:template match = "/">
                <xsl:element name = "SOAP-ENV:Envelope">
                        <xsl:element name = "SOAP-ENV:Body"/>
                </xsl:element>
        </xsl:template>
</xsl:stylesheet>

The current output is:

<?xml version = "1.0" encoding = "UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV
= "http://schemas.xmlsoap.org/soap/envelope";>
        <SOAP-ENV:Body/>
</SOAP-ENV:Envelope>

I would like the output to be

<?xml version = "1.0" encoding = "UTF-8"?> <SOAP-ENV:Envelope>
        <SOAP-ENV:Body/>
</SOAP-ENV:Envelope>

Could someone please advise on the changes I need to make to get my desired
output?

Regards,

Matt



--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--