xsl-list
[Top] [All Lists]

RE: [xsl] Special characters and Transformation

2006-05-05 08:34:49
Sorry guys for the misunderstanding and thanks again for your advice.

I am a bit confused now:

This is the result from what I get with my new code:

<root xmlns="http://www.fo.com";>
        <TEXT xmlns="">
                <Tag>bla</Tag>
        </TEXT>
</root>

What I am trying to achieve is this:
<root xmlns="http://www.fo.com";>
        <TEXT>
                <Tag>bla</Tag>
        </TEXT>
</root>


I am not trying to put <TEXT> into the same namespace, I am actually
trying to get rid of the namespace completely for <TEXT>.

The code is again here for a quick reference: (Sorry for the formatting.
This is the way we have to use in the company I got meanwhile totally
used to it. :)

<?xml version="1.0" encoding="us-ascii"?> <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:f="http://www.fo.com"; exclude-result-prefixes="f">
        <xsl:output method="xml" version="1.0" encoding="us-ascii"
indent="yes"/>
        
        <xsl:template match="/">
                <xsl:apply-templates select="*"/>
        </xsl:template>
        
        <xsl:template match="f:root">
                <xsl:element name="root" namespace="http://www.fo.com";>
                        <xsl:apply-templates/>
                </xsl:element>
        </xsl:template>
        
        <xsl:template match="f:TEXT">
                <xsl:element name="TEXT">
                        <xsl:element name="Tag">
                                <xsl:value-of select="f:Tag"/>
                        </xsl:element>
                </xsl:element>
        </xsl:template>
</xsl:stylesheet>

Thanks you
Houman



--~------------------------------------------------------------------
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>
--~--