I have an XSL where I need to generate output along the lines of this:\[code\]<moo xmlns="http://api.example.com"> <foo>1358944586848</foo> <bar> <a>1</a> <b>2</b> <c>3</c> </bar></moo>\[/code\]I could do it like this:\[code\]<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://api.example.com"> <xsl:template match="/"> <xsl:element name="moo"> <!-- and so on -->\[/code\]However, I kind of hate using the xsl prefix in my xsl files cause I feel it clutters it up a lot. Selecting with XPath is easy anyways since you can set \[code\]xpath-default-namespace\[/code\] to whatever you're transforming from if needed. But there is no \[code\]element-default-namespace\[/code\] available as far as I can see, so how can I generate the wanted output in a good way?I know I can do this:\[code\]<stylesheet version="2.0" xmlns="http://www.w3.org/1999/XSL/Transform"> <template match="/"> <element name="moo" namespace="http://api.example.com"> <!-- and so on -->\[/code\]But then I have to set this namespace explicitly on every single element I create, or they will end up with the XSL namespace instead. So is there a clean way to create elements with a certain namespace (without a prefix) and not touching the default namespace of the xsl file?Update:Figured maybe \[code\]namespace-alias\[/code\] could do something, but can't figure out how to use it. Tried this, but doesn't seem to make any difference in the output at all:\[code\]<stylesheet version="2.0" xmlns="http://www.w3.org/1999/XSL/Transform"xmlnsut="http://api.example.com"><namespace-alias stylesheet-prefix="out" result-prefix=""/> <template match="/"> <element name="out:moo"> <!-- and so on -->\[/code\]The \[code\]namespace-alias\[/code\] thing probably isn't doing what I think it is The final solution I used, based on JLRishe's answerremove-prefixes.xsl\[code\]<?xml version="1.0" encoding="UTF-8"?><stylesheet version="2.0" xmlns="http://www.w3.org/1999/XSL/Transform"> <template match="/"> <variable name="result"> <next-match /> </variable> <apply-templates select="$result" mode="remove-prefixes" /> </template> <template match="*" priority="1" mode="remove-prefixes"> <element name="{local-name()}" namespace="{namespace-uri()}"> <apply-templates select="@* | node()" mode="remove-prefixes" /> </element> </template> <template match="@*|node()" mode="remove-prefixes"> <copy> <apply-templates select="@* | node()" mode="remove-prefixes" /> </copy> </template></stylesheet>\[/code\]subject.xsl\[code\]<!-- snip --><import href="http://stackoverflow.com/questions/14480173/remove-prefixes.xsl" /><!-- snip -->\[/code\]