[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: getting rid of xmlns

Subject: RE: getting rid of xmlns
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sun, 27 Feb 2005 03:15:02 -0000
get rid of xmlns
If the namespaces came from the stylesheet, use exclude-result-prefixes="w v
o" etc to avoid them finding their way into the result document.

If the namespaces came from the source document, use <xsl:element
name="{local-name()}" namespace="{namespace-uri()}"> in preference to
xsl:copy or xsl:copy-of. In XSLT 2.0 you can use xsl:copy-of select="XXX"
copy-namespaces="no" to copy an element except for any unused namespace
declarations.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Jim_Albright@xxxxxxxxxxxx [mailto:Jim_Albright@xxxxxxxxxxxx] 
> Sent: 26 February 2005 15:55
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  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="http://schemas.microsoft.com/office/word/2003/wordml">
>    <osisText lang="FR">
>       <div type="commentary" osisID="Translator'sNotes:Ruth" 
> annotateRef="Ruth">
>          <div 
> xmlns:w10="urn:schemas-microsoft-com:office:word" 
> xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core
> " xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" 
> xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHin
> t" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" 
> xmlns:aml="http://schemas.microsoft.com/aml/2001/core" 
> 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 
> document.
> 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.