xsl-list
[Top] [All Lists]

Re: Namespace on output node but not not in source

2005-10-18 03:40:01
Ok, it is in fact working, the namespace doesn't appear with
exclude-result-prefixes="xs". My mistake was that i still have my
original problem, so that means that it's not a XSL problem, so i'm
back to the drawing board...

Thanks for your help.

On 10/18/05, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:
The rules for a literal result element say that all its in-scope namespaces
are copied to the result tree.

However, you should be able to prevent this using exclude-result-prefixes.
If this isn't working, please supply a complete (but small!) stylesheet to
demonstrate the problem so we can see what you are doing wrong.

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

-----Original Message-----
From: António Mota [mailto:amsmota(_at_)gmail(_dot_)com]
Sent: 18 October 2005 00:59
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Namespace on output node but not not in source

Hi:

I have a xsl with a namespace declared

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
      version="1.0"
      xmlns:xs="http://www.w3.org/2001/XMLSchema";>

so i can make some lookups on a xsd file

 <xsl:variable name="tipo"
select="$schema/xs:schema/xs:element[(_at_)name=$nome]/@type"/>

and that's all i do, i don't copy any node from $schema to
the output tree.

However, this

        <xsl:template match="/">
                <table>
                        <xsl:apply-templates
select="(//Menu)[position()=$pos]"/>
                </table>
        </xsl:template>

produces a

<table xmlns:xs="http://www.w3.org/2001/XMLSchema";>
     <...>
</table>

and i don't understand why, and i don't want it there.

I add a exclude-result-prefixes="xs" but it seems it makes no
diference.

Why is this?


Thanks.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>