xsl-list
[Top] [All Lists]

RE: namespace issue

2004-05-17 01:21:04
Literal result elements are copied to the result tree together with all
their in-scope namespaces. You can suppress this by using
exclude-result-prefixes="dt" on xsl:stylesheet.

Michael Kay 

-----Original Message-----
From: Jonathan Kart [mailto:jkart(_at_)aktitech(_dot_)com] 
Sent: 17 May 2003 07:02
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] namespace issue


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


--+------------------------------------------------------------------
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>
  • RE: namespace issue, Michael Kay <=