Re: [xsl] getting rid of xmlns

Subject: Re: [xsl] getting rid of xmlns
From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
Date: Sat, 26 Feb 2005 16:24:02 -0000
----- Original Message ----- From: <Jim_Albright@xxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Saturday, February 26, 2005 3:55 PM
Subject: [xsl] getting rid of xmlns

In converting from WordML to OSIS my resulting document starts with:

<?xml version="1.0" encoding="UTF-8"?>
<osis xmlns:w="";>
<osisText lang="FR">
<div type="commentary" osisID="Translator'sNotes:Ruth" annotateRef="Ruth">
<div xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:sl=""; xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:wx=""; xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns:aml=""; xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" type="main"/>

I have no use for any of the xmlns: attributes in the start of this
How do I get rid of them? They have no meaning in OSIS and there are no
references to them within the document otherwise.
I found out the hard way that xmlns is not a matchable attribute.

Thanks for all the help this list provides.

Jim Albright
704 843-0582
Wycliffe Bible Translators

Assuming the namespaces are not used in the result document you need to use exclude-result-prefixes attribute on the stylesheet element.
The value is a white-space separated list of namespace prefixes. So
<xsl:stylesheet ..... . exclude-result-prefixes="w w10" ....>


Current Thread