xsl-list
[Top] [All Lists]

namespace issue

2003-05-17 00:01:56

Hi all,

I have a namespace problem I can't figure out.

my xsl stylesheet declaration looks like this:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:dt="http://xsltsl.org/date-time"; >

then further on in the stylesheet i have various templates which use div tags. for example:

<xsl:template match = "E-Mail_Addresses" >
        <div class="object" id="object28">
                <xsl:apply-templates select="Type" />
                <xsl:apply-templates select="Address" />
        </div>
</xsl:template>

the xml (for the E-Mail_Addresses element) looks like:

<E-Mail_Addresses instance_uid = "34" >
        <Address >bob(_at_)somewhere(_dot_)com</Address>
        <Type >
                <option>-Select a Type-</option>
                <option value="4" >Home</option>
                <option value="3" selected="1">Work</option>
        </Type>
</E-Mail_Addresses>

the resulting xhtml looks like:

<div xmlns:dt="http://xsltsl.org/date-time"; class="object" id="object28">
        <span class="attribute" id="attribute74">Work</span>
        <span class="attribute" 
id="attribute73">bob(_at_)somewhere(_dot_)com</span>
</div>

I'm not worried about the inner spans. They're handled by other templates which seem to be doing their jobs. What I don't know is why the xmlns attribute is being inserted into the div element.

Any help would be most appreciated.
Thanks,
-jonathan kart



<Prev in Thread] Current Thread [Next in Thread>
  • namespace issue, Jonathan Kart <=