Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Adding unused namespace in output using xslt. >Thread Next - Re: Adding unused namespace in output using xslt. Re: Adding unused namespace in output using xslt.To: NULL Date: 10/6/2008 3:20:00 PM
Jan Obrestad wrote:
> Is it possible using xslt to add a namespace declaration in the output
> document? The declaration should be with prefix, like this:
> xmlns:ge="http://earth.google.com/kml/2.0"
Sure, put it where you need it e.g.:
<xsl:template match="/">
<foo xmlns:ge="http://earth.google.com/kml/2.0">
<xsl:apply-templates/>
</foo>
</xsl:template>
Or simply doing
<xsl:stylesheet
xmlns:ge="http://earth.google.com/kml/2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/">
<foo>
<xsl:apply-templates/>
</foo>
</xsl:template>
</xsl:stylesheet>
should suffice.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
