When I attempt to import an XML file into InDesign using an XSLT stylesheet, I get "DOM transformation error: Invalid namespace" and the import fails. I've tried the solution mentioned in this post, but it doesn't work for me: Namespace error when importing XML-file into InDesign. I have been unable to find any other posts that deal with this issue directly.
At its simplest, my code looks like this. I've stripped everything else away, and this still fails for me.
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/"
xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="book">
<book xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">
<xsl:apply-templates/>
</book>
</xsl:template>
</xsl:stylesheet>
Incidentally, when I transform the XML with this code outside of InDesign in a test environment, I can import the resulting XML with no issues, which leads me to believe that it's an InDesign issue rather than an XSLT issue. I've looked through my XSLT for another namespace that might not have gotten declared, but I can't find anything.
Any insight is greatly appreciated!