xmlns:xxx namespace attributes.

Hi all does anyone know how to avoid the xmls:ino attributes in the root element of the response when transforming xml’s and xsl’s??
It does not bother me in html response but it does in wml’s
any idea???
thanks

You basically need to understand why the namespace declaration is being generated. Most likely is that you are using xsl:copy to copy an element from the transformation source (i.e. the query result) that has this namespace declaration: xsl:copy on an element automatically copies the namespaces for that element. You can avoid this by using <xsl:element name=“{name()}”> instead of xsl:copy.

Mike Kay

Hello!

I’m having the same problem. But I’m using :

code:
  


<a href="# class=“VerdanaAzul”>
<xsl:value-of select=“Desc”/>




and the namespace declaration appear in the resultant tr element.

Is it possible to avoid this?

Thanks

When a literal result element like is copied, all its in-scope namespaces (i.e. the namespace declarations in the stylesheet) are copied too. You can prevent this by writing
exclude-result-prefixes=“xxx” on the xsl:stylesheet element, assuming that’s where the unwanted namespace is declared.

Mike Kay

Thanks!

Hi,
I’ve got a similar problem: I’m exporting (save as) my documents out of the database with the X-Plorer tool. What I get is for example the following:

<?xml version="1.0" encoding="UTF-8"?>


gandalf
Gandalf

088E2AFFC413144A888605B7EA11BA5DCD8097A6
gandalf@lord-of-the-rings.com
administrator



Now I’d like to process this file with XSLT, but of course XSL does not like it, since the namespace for ino is not defined in the exportet file. Does that imply that Tamino is exporting non valid XML docs?
How can I avoid this, and can get rid of the ino:id attribute?

Thanks, rene

This is actually a rather different problem, and not one that you can solve at the XSLT level. XSLT will only handle documents that are namespace-conformant, while Tamino, for historical reasons, can also handle documents that are well-formed but don’t conform to the namespaces recommendation. I’m pretty sure you can avoid this problem of the ino: namespace prefix being undeclared, but the solution is at the Tamino level not the XSLT level, and I’ll have to leave someone else to answer it.