
Thanks Eliot, I will join the XSL mail list in future solutions. John
-----Original Message----- From: Eliot Kimber [mailto:ekimber@reallysi.com] Sent: Thursday, 22 January 2009 10:45 AM To: Hockaday John Subject: Re: [oXygen-user] How to switch off automatic generation of attributes in XSL [SEC=UNCLASSIFIED]
On 1/21/09 5:38 PM, "John.Hockaday@ga.gov.au" <John.Hockaday@ga.gov.au> wrote:
Hi,
My friend and colleague sent me some XSL which he asked me to validate the output XML. The output includes namespaces for the XSDs but also some of the namespaces that he used for functions that generated some of the element content. For example, xmlns:util="java:java.util.UUID" to generate a UUID for the gmd:fileIdentifier element. If he removes these namespaces from the XSL of course the transformation fails. If he includes them the transformation is successful but I don't see how to get rid of the namespaces and attributes for the unwanted namespaces in the output XML.
For example I don't want the xmlns:dif, xmlns:fn, xmlns:util namespaces as attributes in the root element and I also don't want the xmls:srv attribute in the elements.
How do I get rid of this content?
This is really a question for the XSL mailing list, but the answer is:
<xsl:stylesheet version="2.0" exclude-result-namespaces="util fn dif" ...>
MarkMail.org is your friend for getting quick answers to XSLT questions (and lots of other questions).
Cheers,
Eliot
---- Eliot Kimber | Senior Solutions Architect | Really Strategies, Inc. email: ekimber@reallysi.com <mailto:ekimber@reallysi.com> office: 610.631.6770 | cell: 512.554.9368 2570 Boulevard of the Generals | Suite 213 | Audubon, PA 19403 www.reallysi.com <http://www.reallysi.com> | http://blog.reallysi.com <http://blog.reallysi.com> | www.rsuitecms.com <http://www.rsuitecms.com>